Logistic Regression

41 views
Skip to first unread message

Myles Gartland

unread,
May 9, 2012, 9:31:27 AM5/9/12
to ded...@googlegroups.com
This might be more of a R question, rather than a Deducer. I am learning both by trying to replicate what I have done in SPSS and see if I can get the same/similar things in R/Deducer. 

I ran the logistic regression which produces the glm binomial family code. 

I get all the coefficients, Wald, AIC, etc that I am use to seeing in SPSS. (And they were exactly the same!). 

What I did not see in the output were measures model of fit like a log-likelihood, or one of the Rsq measures, Pearson disperson , etc. Also, did not see a classification table. 

I am assuming the glm function does not provide those items- so how would I call those up- as I usually like to se those in any Logistic Regression I do.

Thanks for any comments.


Ian Fellows

unread,
May 10, 2012, 2:47:20 AM5/10/12
to ded...@googlegroups.com
Hi Miles,


1. The Wald based standard errors (and p-values) are included in the
Analysis of Deviance table.
2. The parameters and AIC are included in the summary table.
3. For log-likelihood look at the -.5 * residual deviance. (also see
logLik function in R).
4. You don't actually want R^2 as it doesn't have much meaning outside
linear models.
5. You can view the pearsons residuals in the diagnostic plots, but
they are not output by the GUI (look at help("residuals.glm") for how
to get them in R).
6. For the classification table, go to Export --> predicted. Then go
to Data --> Recode, and recode predicted >= .5 into 1 and otherwise
into 0. Then go to Analysis --> Contingency Tables and compare your
predicted classifications to the original outcome variable. (yes, this
is a lot of steps, but I think the classification table misleads a lot
of people, especially when the occurrence is rare).


Ian
Reply all
Reply to author
Forward
0 new messages