[R] How to output glm summary to csv file

Charles C. Berry cberry at tajo.ucsd.edu
Tue Jun 17 06:09:44 CEST 2008

On Tue, 17 Jun 2008, Chua Siang Li wrote:

>   Hello there.  I am new to R.
>   I want to output the coefficients and their significance value (Pr(>|z|)
>   into a csv file.  I managed to do it for the "coefficients" but not their
>   significances.  Pls help.  Thanks.
>   mylogit<-      glm(response~price,      family=binomial(link="logit"),
>   na.action=na.pass)
>   summary(mylogit)


 	write.csv( coef( summary( mylogit ) ), <etc> )



>   write.csv(c(mylogit$coefficients), file="result.csv")
>   write.csv(I(summary(mylogit)), file="result.csv", append=T)  #neither does
>   this shows Pr(>|z|)
> ______________________________________________
> 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.

Charles C. Berry                            (858) 534-2098
                                             Dept of Family/Preventive Medicine
E mailto:cberry at tajo.ucsd.edu	            UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/  La Jolla, San Diego 92093-0901

More information about the R-help mailing list