[R] How to recover t-statistics?

Remington, Richard rnews at kernstat.com
Fri Feb 27 21:08:24 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


Joseph

One option is

out <- lm(y~x)
summary(out)$coef
#              Estimate Std. Error  t value  Pr(>|t|)
# (Intercept)         ?          ?        ?         ?
#          x          ?          ?        ?         ?

# now you want the 3rd column
summary(out)$coef[,3]


Richard

-- 

Richard E. Remington III
Statistician
KERN Statistical Services, Inc.
PO Box 1046
Boise, ID 83701
Tel: 208.426.0113
KernStat.com




More information about the R-help mailing list