>I have some question about the usage of the regression subroutines "regline"
>and "regcoef". Once we got the regression coefficient between X and Y, how
>we get Y_hat(the predicted value of y) based on the linear regression model
>Y_hat=Beta0 + Beta1*X. I can identify Beta1 is the return value of the
>subroutines above. Where can I find anything about Beta0?
regline: http://www.ncl.ucar.edu/Document/Functions/Built-in/regline.shtml
Sometime ago the "yintercept" attribute was added to regline.
The documentation was not updated to reflect this. Sorry.
yReg = rc*x + rc_at_yintercept
Please see Example 1
Note: the y-intercept [x=0] could be calculated from the other
returned attributes.
yReg = rc*(x-rc_at_xave) + rc_at_yave
yintercept = 0.974561*(0-2165.0) + 2125.278 = 15.35229
^
rc x=0 xave yave
========
regCoef: http://www.ncl.ucar.edu/Document/Functions/Built-in/regCoef.shtml
Well, as can be ascertained by the function name "regCoef",
it was meant to return the regression coefficient only.
The 3 quantities we thought would be useful for statistical
evaluation: tval, rstd and npts were also returned.
I guess we could include the yintercept in a future release.
Comment: the yintercept is just a constant that shifts the
estimated value up or down on an x-y plot.
My experience with usage of the regression coef is as follows.
Note in the above that (x-rc_at_xave) is an anomaly (say, xAnom)
You could get the projection of the regression coeffients
upon the data by using the anomalies of the "x" grid
yProjection = rc*xAnom
========
D
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Jan 11 2006 - 17:44:35 MST
This archive was generated by hypermail 2.2.0 : Thu Jan 12 2006 - 09:08:16 MST