[R] clarification about glm

Daniel Malter daniel at umd.edu
Sat Feb 23 21:34:43 CET 2008


Hi Sigalit,

yes, you can see this from the fact that the table says unit"1" meaning that
it compares 1 to 0 and not vice versa. Everytime you regress on dummies the
label will have added this to the original variable name. Say you have
gender "male" and "female". Then "gendermale" in the label of your summary
table would indicate that "female" is coded 0 and male 1 and that you
therefore compare how much more or less of the dependent variable males
"have" over females (and not vice versa). In case of a binomial regression
it would of course be how much more or less likely they are on average (with
the appropriate transformation) ...

Does that help you?

Cheers,
Daniel

 


-------------------------
cuncta stricte discussurus
-------------------------

-----Ursprüngliche Nachricht-----
Von: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] Im
Auftrag von sigalit mangut-leiba
Gesendet: Saturday, February 23, 2008 3:05 PM
An: r-help
Betreff: [R] clarification about glm

Hello,
I have a question about glm:
if i have a binary covariate (unit=1,0)
the reference group would be 0? (prediction for unit=1)

example:

dat1<-data.frame(y,unit,x1,x2)

log_u <- glm(y~.,family=binomial,data=dat1)

summary(log_u)

           Estimate Std. Error z value Pr(>|z|)
(Intercept) -0.54247    0.24658  -2.200   0.0278 *
unit1       -0.13052    0.22861  -0.571   0.5680
aps          0.03098    0.01433   2.162   0.0306 *
tiss0        0.02522    0.01101   2.291   0.0219 *

Thank you,

Sigalit.

	[[alternative HTML version deleted]]

______________________________________________
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