python specify weights for linear regression
If you're doing a linear regression, and you know some of the weights, you can essentially mathematically reduce it to a simpler regression. For instance assume you have the following regression
z = ax + by
Given z, x, y it's relatively easy to set up a linear regression. If you want the user to specify (a) rather than having the system solve for it, then your expression becomes
z' = by where z' = z - ax, where a is a coefficient that is specified by your end user.
model = sm.OLS(Predicted_Z, Actual_Z)
results = model.fit()
print(results.summary())
I have a few linear regression models and due to underlying reasons need to need have the weights for a set regression to be user-defined. is it possible to get an OLS summary based user-defined weights rather than the linear regression weights it finds itself?