[R] variances of values predicted using a lm object

Liaw, Andy andy_liaw at merck.com
Thu Feb 12 20:51:49 CET 2004

In case you haven't read ?predict.lm, please do, and if you did, please do
it yet again.  Look for the `se.fit' and `interval' arguments.


> From: Rajarshi Guha
> Hi,
>   is there a function in R that will give me the variances of a
> predicted values obtained using predict.lm().
> If no function is available I would need to calculate them myself -
> which involves taking the inverse of X'X (' indicating transpose)
> where X is my model matrix. I know that calculating an 
> inverse directly
> is not a good idea in general - could anybody suggest a way 
> around this?
> Thanks,
> -------------------------------------------------------------------
> Rajarshi Guha <rxg218 at psu.edu> <http://jijo.cjb.net>
> GPG Fingerprint: 0CCA 8EE2 2EEB 25E2 AB04 06F7 1BB9 E634 9B87 56EE
> -------------------------------------------------------------------
> If you believe in telekinesis, raise my hand.

Notice:  This e-mail message, together with any attachments,...{{dropped}}

More information about the R-help mailing list