[R] Definition of t-value
Dimitris.Rizopoulos at med.kuleuven.be
Sat Jan 13 20:14:37 CET 2007
Out <- lm(A ~ data$B + data$C + data$D)
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
summ.Out <- summary(Out)
X <- model.matrix(Out) # the design matrix
var.betas <- solve(crossprod(X)) * summ.Out$sigma^2
# standard errors
I hope it helps.
School of Public Health
Catholic University of Leuven
Address: Kapucijnenvoer 35, Leuven, Belgium
Quoting algorithms at gmx.de:
> 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
> which reads:
> 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
> Thank you very much,
> R-help at stat.math.ethz.ch mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help