Re: [R] Predicted values from glm() when linear predictor is NA.

2022-07-28 Thread John Fox
Dear Jeff, On 2022-07-28 11:12 a.m., Jeff Newmiller wrote: No, in this case I think I needed the "obvious" breakdown. Still digesting, though... I would prefer that if an arbitrary selection had been made that it be explicit .. the NA should be replaced with zero if the singular.ok argument

Re: [R] Predicted values from glm() when linear predictor is NA.

2022-07-28 Thread Jeff Newmiller
No, in this case I think I needed the "obvious" breakdown. Still digesting, though... I would prefer that if an arbitrary selection had been made that it be explicit .. the NA should be replaced with zero if the singular.ok argument is TRUE, rather than making that interpretation in

Re: [R] Predicted values from glm() when linear predictor is NA.

2022-07-28 Thread John Fox
Dear Jeff, On 2022-07-28 1:31 a.m., Jeff Newmiller wrote: But "disappearing" is not what NA is supposed to do normally. Why is it being treated that way here? NA has a different meaning here than in data. By default, in glm() the argument singular.ok is TRUE, and so estimates are provided

Re: [R] Predicted values from glm() when linear predictor is NA.

2022-07-27 Thread Jeff Newmiller
But "disappearing" is not what NA is supposed to do normally. Why is it being treated that way here? On July 27, 2022 7:04:20 PM PDT, John Fox wrote: >Dear Rolf, > >The coefficient of TrtTime:LifestageL1 isn't estimable (as you explain) and by >setting it to NA, glm() effectively removes it

Re: [R] Predicted values from glm() when linear predictor is NA.

2022-07-27 Thread Rolf Turner
On Thu, 28 Jul 2022 00:42:51 + "Ebert,Timothy Aaron" wrote: > Time is often used in this sort of problem, but really time is not > relevant. A better choice is accumulated thermal units. The insect > will molt when X thermal units have been accumulated. This is often > expressed as degree

Re: [R] Predicted values from glm() when linear predictor is NA.

2022-07-27 Thread John Fox
Dear Rolf, The coefficient of TrtTime:LifestageL1 isn't estimable (as you explain) and by setting it to NA, glm() effectively removes it from the model. An equivalent model is therefore > fit2 <- glm(cbind(Dead,Alive) ~ TrtTime + Lifestage + + I((Lifestage == "Egg +

Re: [R] Predicted values from glm() when linear predictor is NA.

2022-07-27 Thread David Winsemius
On 7/27/22 17:26, Rolf Turner wrote: I have a data frame with a numeric ("TrtTime") and a categorical ("Lifestage") predictor. Level "L1" of Lifestage occurs only with a single value of TrtTime, explicitly 12, whence it is not possible to estimate a TrtTime "slope" when Lifestage is "L1".