# [R] Linear model

kayj kjaja27 at yahoo.com
Wed Feb 11 21:36:19 CET 2009

```I want to know how accurate are the p-values when you do linear regression in
R?

I was looking at the variable x3 and the t=10.843 and the corresponding
p-value=2e-16 which is the same p-value for the intercept where the t-value
for the intercept is 48.402.

I tried to calculate the p-value in R and I got 0

x<-2*(1-pt(10.843,2838))
> x
[1] 0

> G<-lm(y~x1+x2+x3+x4+x5)
> summary(G)

Call:
lm(formula = y ~ x1 + x2 +x3 + x4 + x5)

Residuals:
Min       1Q   Median       3Q      Max
-14.3172  -3.2197  -0.2913   2.6938  23.3602

Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept)  22.9461     0.4741  48.402  < 2e-16 ***
x1           -0.1139     0.3734  -0.305  0.76031
x2           -0.0405     0.1936  -0.209  0.83437
x3           2.0165     0.1860  10.843  < 2e-16 ***
x4           0.5313     0.1782   2.982  0.00289 **
x5           0.5879     0.1779   3.305  0.00096 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 4.724 on 2838 degrees of freedom
(138 observations deleted due to missingness)
Multiple R-squared: 0.05279,    Adjusted R-squared: 0.05112
F-statistic: 31.63 on 5 and 2838 DF,  p-value: < 2.2e-16

Thanks for the help

--
View this message in context: http://www.nabble.com/Linear--model-tp21963370p21963370.html
Sent from the R help mailing list archive at Nabble.com.

```