[R] Getting p-value from summary output

Bill.Venables at csiro.au Bill.Venables at csiro.au
Fri Feb 11 03:16:21 CET 2011


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.
-- 
View this message in context: http://r.789695.n4.nabble.com/Getting-p-value-from-summary-output-tp3300503p3300503.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list