[R] Extract summary stats to table

Greg Snow Greg.Snow at imail.org
Tue Oct 5 17:32:54 CEST 2010


Write a function that does your analysis and returns the values of interest in a vector.  Then run the function multiple times using replicate or sapply and the results will be put into a matrix for you.

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
801.408.8111


> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of Chris Mcowen
> Sent: Tuesday, October 05, 2010 5:47 AM
> To: r-help at r-project.org
> Subject: [R] Extract summary stats to table
> 
> 
> Dear List,
> 
> I am looking to run a host of models (60) with three methods - lmer,glm
> and lrm.
> 
> Is there a way to output the key stats into a table that i can copy to
> excel?
> 
> I.e for lmer i would want AIC,BIC etc
>     for lrm i would want Brier score, r2, c-value etc
> 
> At present i am running the models from a script and then copying
> across the values into a excel spreadsheet however this is time
> consuming and i imagine their must be a trick?
> 
> I had thought of setting up a data frame and populating it with the
> scores but i am not very experienced and am unsure of how to do it?
> 
> Thanks
> 
> Chris
> 
> ______________________________________________
> 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