[R] second try; writing user-defined GLM link function
jessilbrown at gmail.com
Sun Apr 23 09:33:17 CEST 2006
Ok, I think I have things figured out.
Predict.glm still doesn't work (with type="response"); however, the
problem with the strange behavior of the betas and the results of
predict.glm with type="link" was simply due to data issues. I had
converted my Program MARK input file (which needs only three piece of
information; age of nest at start, age of nest when last alive, and
age of nest when observation ends) directly to a data matrix.
Therefore, the successful nests were "observed" for only one interval
(age of nest when last alive=age of nest when observation ended), and
during that interval, their mean age was around 34 days (since the
nest cycle lasts 68 days). Those nests that failed later were forced
into a second interval that had a later mean nest age. So the glm's
were performing as expected from the data supplied.
So, I went back to the original nest site visitation data and broke
those 68 day intervals (as well as all others) into the much shorter,
original visitation intervals. And now the resulting daily survival
rate estimates are more believable, corresponding well to the
equivalent Program MARK output.
I think (correct me if I'm wrong, Mark) that the only detail left to
examine is the true "effective" sample size for use when calculating
AICc values, as each observation interval does not comprise an
independent observation. That is apparently easily done by hand, but
would be convenient to include in a future "avian" package (subtle
Thanks to all for their advice in this matter.
More information about the R-help