Skip to content

Getting p-value from summary output

4 messages · Allie818, Dennis Murphy, Bill Venables +1 more

#
I can get this summary of a model that I am running:

summary(myprobit)

Call:
glm(formula = Response_Slot ~ trial_no, family = binomial(link = "probit"), 
    data = neg_data, na.action = na.pass)

Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-0.9528  -0.8934  -0.8418   1.4420   1.6026  

Coefficients:
             Estimate Std. Error z value Pr(>|z|)
(Intercept) -0.340528   0.371201  -0.917    0.359
trial_no    -0.005032   0.012809  -0.393    0.694

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 62.687  on 49  degrees of freedom
Residual deviance: 62.530  on 48  degrees of freedom
AIC: 66.53

Number of Fisher Scoring iterations: 4

But I would like to get the p-value [column heading Pr(>|z|)] for the
esimate.
I can get the coefficient estimates with myprobit$coefficients. Is there
something similar to get the p-value?

Thank you in advance.
#
Hi Alice,

You can use

pvals <- summary(myprobit)$coefficients[, "Pr(>|z|)"]

Notice that if the p-value is very small, the printed version is abbreviated, but the object itself has full precision (not that it matters).

Bill Venables. 

-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Allie818
Sent: Friday, 11 February 2011 9:46 AM
To: r-help at r-project.org
Subject: [R] Getting p-value from summary output


I can get this summary of a model that I am running:

summary(myprobit)

Call:
glm(formula = Response_Slot ~ trial_no, family = binomial(link = "probit"), 
    data = neg_data, na.action = na.pass)

Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-0.9528  -0.8934  -0.8418   1.4420   1.6026  

Coefficients:
             Estimate Std. Error z value Pr(>|z|)
(Intercept) -0.340528   0.371201  -0.917    0.359
trial_no    -0.005032   0.012809  -0.393    0.694

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 62.687  on 49  degrees of freedom
Residual deviance: 62.530  on 48  degrees of freedom
AIC: 66.53

Number of Fisher Scoring iterations: 4

But I would like to get the p-value [column heading Pr(>|z|)] for the
esimate.
I can get the coefficient estimates with myprobit$coefficients. Is there
something similar to get the p-value?

Thank you in advance.