[Rd] variance of a scalar (PR#546)
Fri, 19 May 2000 19:51:26 +1000
At 10:04 AM 5/19/00 +0100, Prof Brian Ripley wrote:
>> On Fri, 19 May 2000, Prof Brian Ripley wrote:
>> I thought that might be the reason. There is no mention of using n-1
>> rather than n in the denominator on the help page. Perhaps that might be
>Um. What professional statistics package uses n, then? Are you
>suggesting that there is serious room for doubt?
S-PLUS, actually. Not in this context, of course, but princomp() when
given a data matrix uses n as the divisor for the variance matrix. Amazing
stuff. This in turn is translated into the eigenvalues (principal
variances) of course. I was really puzzled about this while I was trying
to explain to one of my colleagues what a simple generic calculation
principal components really was and I was getting the same coefficients as
princomp but slightly different variances. In a flash of inspiration I
tried multiplying them by n/(n-1) and hey presto!
Of course the case for an n-1 divisor is much less convincing in this
context because even though it gives an unbiased (REML, maximum marginal
likelihood, ...) estimator of the variance, the eigenvalues are certainly
not unbiased estimators of the eigenvalues of the population variance
matrix (but it can't hurt, either!).
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: firstname.lastname@example.org