Re: [R] On p-values presented in the summary of Linear Models

2013-02-07 Thread S Ellison
On 8 Feb 2013, at 01:24, "Antonio Silva" wrote: > # Two-sided p-value should be estimated with > dt(t,summary(fit1)$df[2]) # isn't it? No, on two counts. > First, dt is the density; you need pt, the cumulative probability, not dt. Second, pt(t, ...) would calculate the one sided lower tail pro

Re: [R] On p-values presented in the summary of Linear Models

2013-02-07 Thread Antonio Silva
OK, I found the answer: 2*pt(t,summary(fit1)$df[2]) Thanks anyway ... 2013/2/7 Antonio Silva > Dear list members > > I have a doubt on how p-values for t-statistics are calculated in the > summary of Linear Models. > > Here goes an example: > > x <- rnorm(100,50,10) > y <- rnorm(100,0,5) > fi

Re: [R] On p-values presented in the summary of Linear Models

2013-02-07 Thread Kevin E. Thorpe
On 02/07/2013 08:22 PM, Antonio Silva wrote: Dear list members I have a doubt on how p-values for t-statistics are calculated in the summary of Linear Models. Here goes an example: x <- rnorm(100,50,10) y <- rnorm(100,0,5) fit1<-lm(y~x) summary(fit1) summary(fit1)$coef[2] # b summary(fit1)$coe

[R] On p-values presented in the summary of Linear Models

2013-02-07 Thread Antonio Silva
Dear list members I have a doubt on how p-values for t-statistics are calculated in the summary of Linear Models. Here goes an example: x <- rnorm(100,50,10) y <- rnorm(100,0,5) fit1<-lm(y~x) summary(fit1) summary(fit1)$coef[2] # b summary(fit1)$coef[4] # Std. Error summary(fit1)$coef[6] # t-sta