On 7/07/2008, at 11:05 AM, Moshe Olshansky wrote:

Another possibility is to use explicit formula, i.e. if you are doing linear regression like y = a*x + b then the explicit formulae are:

a = (meanXY - meanX*meanY)/(meanX2 - meanX^2)
b = (meanY*meanX2 - meanX*meanXY)/(meanX2 - meanX^2)

where meanX is mean(x), meanXY is mean(x*y), meanX2 is mean(x^2), etc.


My understanding is that such formulae, while ``algebraically correct'' are
highly unstable numerically and hence should be avoided.

Others who are wiser and more knowledgeable than I may wish to comment or
correct me.

        cheers,

                Rolf Turner

######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to