[R] Logit Regressions, Clustering etc

Paul Sweeting mail at paulsweeting.co.uk
Fri Jan 25 13:07:39 CET 2008


Hi

I am carrying out some logit regressions and want to (a) make sure I'm
taking the right approach and (b) work out how to carry out some additional
analysis.  So, to carry out a logit regression where the dependent variable
is a factor db, I use something like:

res1_l <- glm(formula = db ~ y1 + 
 + y5, family = binomial(link = "logit"))
summary(res1_l)

...which is, I hope correct.  I also need to carry out an ordered logit
regression.  Is this as simple as:

res1_l <- polr(formula = db ~ y1 + 
 + y5)
summary(res1_l)

..with db being a factor which has more levels than just "0" and "1"?

Assuming it is, the part I am really struggling with is the calculation of
robust standard errors to allow for clustering.  In an "ordinary"
regression, I’ve used survreg, where the data has also been censored, e.g.:

res1 <- survreg(formula = Surv(ip, db_Censor) ~ y1 + 
 y5 + cluster(db_ID),
dist = "gaussian")
summary(res1)

This has the benefit of giving a nice clear display of the naïve standard
error as well as the robust one - is there any way of getting similar output
for a logit and an ordered logit regression

Thanks in advance for your help.



More information about the R-help mailing list