Reputation: 21
Ques: What is the p-value for the two-tail test(assuming 5% confidence interval) of the hypothesis that the equation intercept is zero?
I have calculated the t value(1.257) for a data set with 51 observations in a linear regression model. Its Degree of freedom is 49.Now how can I calculate the p value based on the above information in R?
Upvotes: 0
Views: 5422
Reputation: 33488
You probably want to use the cumulative distribution function pt
.
t <- 1.257
df <- 49
2 * (1 - pt(q = abs(t), df = df))
[1] 0.2147125
or alternatively:
2 * pt(q = abs(t), df = df, lower=FALSE)
Upvotes: 2