# [R] Definition of t-value

Dimitrios Rizopoulos Dimitris.Rizopoulos at med.kuleuven.be
Sat Jan 13 20:14:37 CET 2007

```try this

Out <-  lm(A ~ data\$B + data\$C + data\$D)
summary(Out)

moreover, by typing 'summary.lm' in your R console you may see how the
t-values are computed; check also ?summary.lm.

Another way, though less efficient, to obtain the standard errors is
the following

summ.Out <- summary(Out)
X <- model.matrix(Out) # the design matrix
var.betas <- solve(crossprod(X)) * summ.Out\$sigma^2
# standard errors
sqrt(diag(var.betas))

I hope it helps.

Best,
Dimitris

----
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven

Tel: +32/(0)16/336899
Fax: +32/(0)16/337015
Web: http://med.kuleuven.be/biostat/
http://www.student.kuleuven.be/~m0390867/dimitris.htm

Quoting algorithms at gmx.de:

> Hello,
>
> I'd like to ask for the exact definition of the t-value, which R
> uses in its summaries of a linear model for judging the importance
> of an independent variable in explaining the dependent variable.
> I searched the documentation, some groups, and the web for quite a
> long time, but the best I could come up with is the following from
>
>
>
> Measure of the statistical significance of an independent variable b
>  in explaining the dependent variable y. It is determined by
> dividing  the estimated regression coefficient b by its standard
> error Sb.  That is
>
> t-Value = b/Sb
>
> Thus, the t-statistic measures how many standard errors the
> coefficient is away from zero. Generally, any t-value greater than
> +2 or less than - 2 is acceptable. The higher the t-value, the
> greater the confidence we have in the coefficient as a predictor.
> Low t-values are indications of low reliability of the predictive
> power of that coefficient.
>
>
> My problem is that I do not know how to compute the standard error
> Sb of some regression coefficient, when I have done nothing more
> than to use the lm command in this manner:
>
> Out = lm(A~ data\$B + data\$C + data\$D)
>
>
> Does anyone know in detail, how R computes the t-value displayed in
> summaries?
>
>
> Thank you very much,
>
> Peter
> --
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help