[R] tree mortality risk model using glm()
Thomas Lumley
tlumley at u.washington.edu
Tue Sep 9 17:31:44 CEST 2003
On Tue, 9 Sep 2003, Tord Snall wrote:
> Dear all,
>
> I've used glm(family=binomial(link="logit")) several times, but now I think
> that a log link is more appropriate.
>
> I want to fit a model for probability of tree fall (TF)), with tree
> diameter (dbh) and soil moisure (soil) as predictors. A large number of
> trees have been checked every second year whether they stand up (0) or have
> fallen (1).
>
> I assume that the tree fall probability is predicted by
>
> TF = 1 - exp(-(dbh + soil))
> log(1 - TF) = -(dbh + soil)
>
> I thought the following call would fit the model, but I get an error message.
> test<- glm(1-TF ~ dbh +soil , data = extdat, family = quasibinomial(link =
> "log"))
> Error: no valid set of coefficients has been found:please supply starting
> values
> In addition: Warning message:
> NaNs produced in: log(x)
Although glm() usually doesn't need starting values, it can run into
problems when you have a restricted parameter space as you do here. You
may need to supply starting values, as the error message suggests.
-thomas
More information about the R-help
mailing list