Hi,
I've been trying to script a quadratic fit using a matrix instead of fit model. This might just be my lack of understanding of matrix math...but I don't how JMP is fitting my data. For the following Variables X and Y, I want to fit the data using
X, X*X, and Y
The fit model module gives me the following output:
22.4221618758449 + 0.0545925476534461 * :Y + (:X - 6.51578947368421) * ((:X
-6.51578947368421) * -0.0568980754963725) + -0.0988212800731804 * :X
My first question is what is Fit Model doing that's leading to the -6.515789 transformation of X^2? (vs just using the squared values of the X column)
I guess my second question would be if I wanted to adapt the matrix fit to it, why is it outputing the same parameters for X^2 and Y..even though I didn't transform my X^2 with that -.651589 term?
Output of thte code below:
Intercept =20.006524922
X=0.6426504827
Y=0.0545925477
X^2=-0.056898075 1
Thanks for any insight on why fit model isn't matching the matrix math... thanks
xVals2=Column(dt,"X")<<GETASMATRIX></GETASMATRIX>
JMP is centering the X^2 term (subtracting the mean of X from the values of X) before squaring. This is a common technique used with quadratic terms because it can dramatically reduce the correlation of X and X^2. It doesn't change the parameter estimate, but it does decrease the standard error for the X^2 parameter estimate. That means it will be easier to detect significant curvature.
This transformation does change the intercept value, as well as its interpretation. If you do some algebra and FOIL the (X-Xbar)*(X-Xbar)*beta2 part of the model, the Fit Model result will match yours. The models will produce the same prediction.