[R] lm diagnostics and qr (fwd)

Jean Eid jeaneid at chass.utoronto.ca
Thu Jun 26 16:58:01 CEST 2003



I have been struggling to find some informaation on what lm exactly does.
I know it uses the QR decomp. However, I was recently faced with a
somewhat badly scaled matrix and summary(lm) said
	Coefficients: ( 4 not defined because of singularities)
does anyone know how lm chooses these 4 coef. is it forward building of
the model --> drop last when qr sends a non full rank design matrix?


My other question is on the regression diagnostics particularly plotting
Cook's distance. what is the rule to decide on outliers. If I read the
plot correctly, the labeled distances (vertical lines) are outliers. But I
have gotten cook's distance and compared them to qf(0, p, n-p) ( the
median of the F distribution with paramaters p=# of variables in design,
number of obs.-p) but does not give same answer.

Lastly, the qr function is supposed to take the LAPACK package in its
default but it seems to default LINPACK. The following appears only when
qr(x, LAPACK=T)
attr(,"useLAPACK")
[1] TRUE


Thank you for all your help,
Jean




More information about the R-help mailing list