[R] fast lm se?
Liaw, Andy
andy_liaw at merck.com
Fri Jan 8 14:44:18 CET 2010
From: ivo welch
>
> dear R experts---I am using the coef() function to pick off
> the coefficients
> from an lm() object. alas, I also need the standard errors
> and I need them
> fast. I know I can do a "summary()" on the object and pick
> them off this
> way, but this computes other stuff I do not need. Or, I can
> compute (X'
> X)^(-1) s^2 myself. Has someone written a fast se() function?
>
> incidentally, I think this would make a nice addition to the
> R base. I
> presume it is not uncommon for a statistician also to want to
> use the se of
> coef estimates.
Not sure if this is much faster, but you can try
sqrt(diag(vcov(lm.object))).
Andy
> pointers appreciated.
>
> regards,
>
> /iaw
> ----
> Ivo Welch (ivo.welch at brown.edu, ivo.welch at gmail.com)
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.
>
Notice: This e-mail message, together with any attachme...{{dropped:10}}
More information about the R-help
mailing list