starting values in glm(..., family = binomial(link = log))
Fischer, Felix <Felix.Fischer <at> charite.de> writes:
Dear R-helpers,
i have a problem with a glm-model. I am trying to fit models with the log as link function instead of the logit. However, in some cases glm fails to estimate those models and suggests to give start values. However, when I set start = coef(logistic_model) within the function call, glm still says it cannot find starting values? This seems to be more of a problem, when I include a continous predictor in the model (age instead of group). find below a minimal example.
[Sorry for snipping context: gmane doesn't like it]
Group_logit_model = glm(data = x, Arthrose ~ Gruppe,
family=binomial(link = logit))
Group_log_model = glm(data = x, Arthrose ~ Gruppe,
family=binomial(link = log))
Age_logit_model = glm(data = x, Arthrose ~ Alter,
family=binomial(link = logit))
Age_log_model = glm(data = x, Arthrose ~ Alter,
family=binomial(link = log),
start=c(coef(Group_log_model)[1],0))
Using the intercept from the group_log model combined with 0
for the log-slope appears to work. It makes more sense to use
this than to use the results from a logit fit (as you tried),
because those parameters would be on a different scale.
Another possibility for the starting
intercept value would be the coefficient of a null model
with a log-link:
Null_log_model = glm(data = x, Arthrose ~ 1,
family=binomial(link = log))