[R] How to recover t-statistics?

Sundar Dorai-Raj sundar.dorai-raj at pdf.com
Fri Feb 27 20:51:04 CET 2004


Joseph J. Gazaille wrote:

> Hi!
>  
> I'm doing Monte Carlo analyses of the distribution 
> of the t-statistics of the parameters of models evaluated 
> with the lm( ) function.
>  
> Is there an easy way to recover the t-statistics
> (similarly to using coef to recover the coefficients)?
>  
> Thanks,
>  
> joseph

Try

tstat <- summary(fit)$coef[, "t value"]

or

tstat <- coef(fit)/sqrt(diag(vcov(fit)))

-sundar




More information about the R-help mailing list