Wensui Liu
2007-Nov-22 19:36 UTC
[R] how to build a saturated model for logistic regression?
Dear Listers, Sorry for bothering you on Thxgiving. I am just curious how to build a saturated model for logistic regression or other kinds of regression. Thank you so much! wensui
Rolf Turner
2007-Nov-22 20:45 UTC
[R] how to build a saturated model for logistic regression?
On 23/11/2007, at 8:36 AM, Wensui Liu wrote:> Dear Listers, > Sorry for bothering you on Thxgiving.This is a world-wide list, not just a U.S. one. Many of us are not particularly ``bothered''!> I am just curious how to build a saturated model for logistic > regression or other kinds of regression.It is not clear what you are asking. A saturated model is by definition pretty simple to ``build''; by definition it has one parameter per observation; the fitted values are equal to the observed values and the residuals are all 0. To fit, explicitly, such a model using glm() you could do something like a <- factor(1:length(y)) fit <- glm(y~a,family=binomial) where ``y'' is your vector of (Bernoulli) observations. You will get a residual deviance of (effectively) 0, on 0 degrees of freedom. The fitted values (from fitted(fit)) will be equal to y, to within numerical noise. Does this answer your question? cheers, Rolf Turner ###################################################################### Attention:\ This e-mail message is privileged and confid...{{dropped:9}}