Quantcast

Is there a way to export regression output to an excel spreadsheet?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Is there a way to export regression output to an excel spreadsheet?

hoguejm
This post was updated on .
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Is there a way to export regression output to an excel spreadsheet?

chuck.01
Yes.

see:
?lm
?coef
?write.csv

also, if
fit <- lm(Y~X)
then:
slope_p-value <-  summary(fit)[[4]][2,4]

Double check that last one for yourself.
Good luck.



hoguejm wrote
I want to export the coefficient values and p-values from my regression output into a spreadsheet. Is there a way to do this?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Is there a way to export regression output to an excel spreadsheet?

hoguejm
I am very very new with R.

Needless to say, your comment is a bit confusing.  My regression name is "mylogit"  

Anyway to write a code that I can copy paste? Thanks
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Is there a way to export regression output to an excel spreadsheet?

Jeff Newmiller
This is the help-you-learn-R mailing list, not the do-my-work-for-me mailing list. I don't know where the latter is.

To assist you in the former vein, I recommend that you read the posting guide mentioned at the footer of every email on this list. It will tell you some useful hints on interpreting the assistance you have already received. Think of it like surfing the web... each bit of information is related to another, and all you have to do is follow the clues. We are also busy following our own clues, and should not be chauffeuring you around, but we don't mind giving you pointers.
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<[hidden email]>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
---------------------------------------------------------------------------
Sent from my phone. Please excuse my brevity.

hoguejm <[hidden email]> wrote:

>I am very very new with R.
>
>Needless to say, your comment is a bit confusing.  My regression name
>is
>"mylogit"  
>
>Anyway to write a code that I can copy paste? Thanks
>
>
>
>--
>View this message in context:
>http://r.789695.n4.nabble.com/Is-there-a-way-to-export-regression-output-to-an-excel-spreadsheet-tp4649155p4649157.html
>Sent from the R help mailing list archive at Nabble.com.
>
>______________________________________________
>[hidden email] 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.

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Is there a way to export regression output to an excel spreadsheet?

Duncan Mackay-2
In reply to this post by hoguejm
Hi

If you want a formatted output then some of the packages may be of use

library(R2THML)
?HTML.ftable
library(xtable)
? xtable

there may be functions in the Hmisc /rms packages as well

Duncan


Duncan Mackay
Department of Agronomy and Soil Science
University of New England
Armidale NSW 2351
Email: home: [hidden email]



At 13:13 10/11/2012, you wrote:

>I want to export the coefficient values and p-values from my regression
>output into a spreadsheet. Is there a way to do this?
>
>
>
>--
>View this message in context:
>http://r.789695.n4.nabble.com/Is-there-a-way-to-export-regression-output-to-an-excel-spreadsheet-tp4649155.html
>Sent from the R help mailing list archive at Nabble.com.
>
>______________________________________________
>[hidden email] 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.

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Is there a way to export regression output to an excel spreadsheet?

Francis Smart
This post has NOT been accepted by the mailing list yet.
This post was updated on .
In reply to this post by Jeff Newmiller
"help-you-learn-R mailing list, not the do-my-work-for-me mailing list"

I just wanted to say that it is just this type of response that gives R and R-users a bad reputation.   I am an active R user and very happy to contribute to R in whatever way is possible but when I see posts like this it makes me want to switch to a language in which the users are nice people.

First thing, the reason I even stumbled across this post was because I had a very similar question.  And in all likelihood a lot of other R users have come across this same post and been equally confounded but this rude and ridiculous response.

 The original user who asked this question asked a very simple question for which any statistical language should have a very simple canned response.  Something along the lines:

write.results(lm, file="resutls", filetype="xls")  

Yet the response that was instead produced was one which was overly complex and ultimately needlessly insulting.  

Francis Smart
www.econometricsbysimulation.com

>I am very very new with R.
>
>Needless to say, your comment is a bit confusing.  My regression name
>is
>"mylogit"  
>
>Anyway to write a code that I can copy paste? Thanks
>
>
>
>--
>View this message in context:
>http://r.789695.n4.nabble.com/Is-there-a-way-to-export-regression-output-to-an-excel-spreadsheet-tp4649155p4649157.html
>Sent from the R help mailing list archive at Nabble.com.
>
>______________________________________________
>[hidden email] 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.

______________________________________________
[hidden email] 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.
Loading...