Message Boards Message Boards

2
|
5477 Views
|
2 Replies
|
4 Total Likes
View groups...
Share
Share this post:

Multivariate Linear Regression [Constraining to a specific constant]

Posted 10 years ago
POSTED BY: Jeffrey Korum
2 Replies
POSTED BY: Jeffrey Korum
Posted 10 years ago

I think one way is to just subtract 6.9 from your y and fit your regression to new y's:

 ystar = y - 6.9

Put this ystar in your J data matrix, call new data matrix with ystar, Jstar

Then fit the regression to ystar without a constant using the option IncludeConstantBasis -> False

LinearModelFit[Jstar, {x1, x2, x3, x4}, {x1, x2, x3, x4}, IncludeConstantBasis -> False]

Your "constrained" model is then the coefficients from above regression with the intercept 6.9 as required.

POSTED BY: Peter Crosbie
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract