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
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
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
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
4 matches
Mail list logo