[R] Comparing goodness of fit between two logistic regression models
Greetings, I want to compare the goodness-of-fit between several different models that I have developed using Logistic Regression. I have been doing some research and am sort of confused on how to do this. I know it is not as simple as in an OLS model, however since there is no R-squared value in logistic regression, I was wondering if there was another test statistic I could use. I do not want to compare the fitted models with the null model, but rather two different fitted models. I know there are several pseudo R-squares that can be used. (Is there a recommended one? Is this even a good way to compare models?) I apologize that this is more of a statistics question than an r specific question, but any advice would be greatly appreciated. Thanks, Jake -- View this message in context: http://r.789695.n4.nabble.com/Comparing-goodness-of-fit-between-two-logistic-regression-models-tp4649410.html Sent from the R help mailing list archive at Nabble.com. __ R-help@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.
[R] Is there a way to export regression output to an excel spreadsheet?
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. __ R-help@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.
[R] Why does my regression output look like this?
EstimateStd. Error z value Pr(|z|) (Intercept) 2.338e+00 2.400e+03 0.0010.99922 factor(GENDER)M -1.020e-01 6.394e-01 -0.1600.87327 factor(Ethnicity)Black 4.868e-01 1.550e+00 0.314 0.75348 A sample from my regression output above. I am wondering why in the Estimate column, are the values in terms of e. Is there a way to get simple numerical values without the e term? Thanks -- View this message in context: http://r.789695.n4.nabble.com/Why-does-my-regression-output-look-like-this-tp4649154.html Sent from the R help mailing list archive at Nabble.com. __ R-help@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.
Re: [R] Is there a way to export regression output to an excel spreadsheet?
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. __ R-help@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.
[R] Obtaining R-squared value in Logistic Regression
I do not see an R-squared value after preforming the glm regression. Is there a separate command for this? Thanks -- View this message in context: http://r.789695.n4.nabble.com/Obtaining-R-squared-value-in-Logistic-Regression-tp4648954.html Sent from the R help mailing list archive at Nabble.com. __ R-help@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.
[R] Changing Date Variables as Continuous Variables
I am very new to R, so I apologize if this question is trivial. I have a row in my data of dates in the format mm/dd/; about 3500 rows. I am using this variable in a logistic regression model, and need to treat it as continuous, not a factor as r has decided it is. I tried the as.numeric function but it resulted in all NA's and the message: NAs introduced by coercion If anyone knows a solution, I would greatly appreciate it. Cheers, Jake -- View this message in context: http://r.789695.n4.nabble.com/Changing-Date-Variables-as-Continuous-Variables-tp4648354.html Sent from the R help mailing list archive at Nabble.com. __ R-help@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.
[R] Error in contrasts message when using logistic regression code.
I have a rather large data set (about 30 predictor variables) I need to preform a logistic regression on this data. My response variable is binary. My code looks like this: mylogit - glm(Enrolled ~ A + B + C + ... + EE, data = data, family = binomial(link=logit)) with A,B,C, ... as my predictor variables. Some categorical, some continuous, some binary. I run the code and get this error: Error in `contrasts-`(`*tmp*`, value = contr.funs[1 + isOF[nn]]) : contrasts can be applied only to factors with 2 or more levels Any ideas on how to fix this? I am fairly new to R so Im guessing there is something missing/wrong in my logit code. Thanks! -- View this message in context: http://r.789695.n4.nabble.com/Error-in-contrasts-message-when-using-logistic-regression-code-tp4647198.html Sent from the R help mailing list archive at Nabble.com. __ R-help@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.
Re: [R] Error in contrasts message when using logistic regression code.
How to change categorical vars to factors. I am very new at R Thanks -- View this message in context: http://r.789695.n4.nabble.com/Error-in-contrasts-message-when-using-logistic-regression-code-tp4647198p4647226.html Sent from the R help mailing list archive at Nabble.com. __ R-help@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.