[R] Constraining coefficients

Liaw, Andy andy_liaw at merck.com
Fri Mar 5 14:02:55 CET 2004


How about collapsing those two levels into one?  Wouldn't that work?

Cheers,
Andy

> From: Andrew Criswell
> 
> Hello All:
> 
> I have a binomial model with one covariate, x1, treated as a 
> factor with 
> 3 levels. The other covariate is measured x2 <- 1:30. The 
> response, y, 
> is the proportion of successes out of 20 trials.
> 
> glm(cbind(y, 20 - y) ~ x1 * x2, family = binomial)
> 
> Now, I would like to constrain the cofficients on 2 levels of the 
> factor, x1, to be identical and test the difference between 
> these models 
> by a likelihood ratio test.
> 
> How can I get glm() to constrain the coefficients on 2 levels 
> to be the 
> same?
> 
> Thanks,
> ANDREW


------------------------------------------------------------------------------
Notice:  This e-mail message, together with any attachments,...{{dropped}}




More information about the R-help mailing list