Hello, how can I retrieve electively data from a summary file, for instance I would like to get the Pr of Coefficients Thanks> summary (plasma_glm_1)Call: glm(formula = ESR ~ fibrinogen, family = binomial(), data = plasma) Deviance Residuals: Min 1Q Median 3Q Max -0.9298 -0.5399 -0.4382 -0.3356 2.4794 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) -6.8451 2.7703 -2.471 0.0135 * fibrinogen 1.8271 0.9009 2.028 0.0425 * --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 (Dispersion parameter for binomial family taken to be 1) Null deviance: 30.885 on 31 degrees of freedom Residual deviance: 24.840 on 30 degrees of freedom AIC: 28.84 Number of Fisher Scoring iterations: 5 [[alternative HTML version deleted]]
Try names(summary (plasma_glm_1)) You can extract named components individually, just as you would for any other R object. Sarah On Mon, Jul 8, 2013 at 7:57 AM, Hermann Norpois <hnorpois at gmail.com> wrote:> Hello, > > how can I retrieve electively data from a summary file, for instance I > would like to get the Pr of Coefficients > Thanks >> summary (plasma_glm_1) > > Call: > glm(formula = ESR ~ fibrinogen, family = binomial(), data = plasma) > > Deviance Residuals: > Min 1Q Median 3Q Max > -0.9298 -0.5399 -0.4382 -0.3356 2.4794 > > Coefficients: > Estimate Std. Error z value Pr(>|z|) > (Intercept) -6.8451 2.7703 -2.471 0.0135 * > fibrinogen 1.8271 0.9009 2.028 0.0425 * > --- > Signif. codes: 0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1 > > (Dispersion parameter for binomial family taken to be 1) > > Null deviance: 30.885 on 31 degrees of freedom > Residual deviance: 24.840 on 30 degrees of freedom > AIC: 28.84 > > Number of Fisher Scoring iterations: 5 > > [[alternative HTML version deleted]] > >-- Sarah Goslee http://www.functionaldiversity.org
1. It's a summary **object**, not a file. 2. ?summary.glm 3. Read "An Introduction to R" and ?"[" to learn how to work with lists and extraction functions, which are essential. 4. Also methods(print) stats:::print.summary.glm ## for code of how object is printed Cheers, Bert On Mon, Jul 8, 2013 at 4:57 AM, Hermann Norpois <hnorpois at gmail.com> wrote:> Hello, > > how can I retrieve electively data from a summary file, for instance I > would like to get the Pr of Coefficients > Thanks >> summary (plasma_glm_1) > > Call: > glm(formula = ESR ~ fibrinogen, family = binomial(), data = plasma) > > Deviance Residuals: > Min 1Q Median 3Q Max > -0.9298 -0.5399 -0.4382 -0.3356 2.4794 > > Coefficients: > Estimate Std. Error z value Pr(>|z|) > (Intercept) -6.8451 2.7703 -2.471 0.0135 * > fibrinogen 1.8271 0.9009 2.028 0.0425 * > --- > Signif. codes: 0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1 > > (Dispersion parameter for binomial family taken to be 1) > > Null deviance: 30.885 on 31 degrees of freedom > Residual deviance: 24.840 on 30 degrees of freedom > AIC: 28.84 > > Number of Fisher Scoring iterations: 5 > > [[alternative HTML version deleted]] > > > ______________________________________________ > 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. >-- Bert Gunter Genentech Nonclinical Biostatistics Internal Contact Info: Phone: 467-7374 Website: http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm