Dear S-plus user,
Can any one help me with this problem. I am trying to model a binary
response data (0,1) using logistic regression in nlme. The following s-code
were written but I received an error message.
===========================================
x.new1 <- groupedData(pmort~dbh + osdi + dmax |local, data =x.new)
> p.func <- deriv( ~ 1 - (1 + exp(a0 + a1 * dbh + a2 * log(dbh))^(-1)),
c("a0",
"a1", "a2"), function(dbh, a0, a1, a2)
{
}
)
> p.fit <- nlme(model = pmort ~ p.func(dbh, a0, a1, a2), fixed = 1 - (1 +
exp(a0 +
a1 * dbh + a2 * log(dbh))^(-1)) ~ 1, random = 1 - (1 + exp(a0 + a1 *
dbh + a2 * log(dbh))^(-1)) ~ 1 | local, data = x.new1, start = c(-2,
0.002, -2))
Error in nlme.formula(model = pmort ~ p.func(dbh,..: starting values for the
fixed component are not the correct length
===========================================
Thanks for any help.
Abd Rahman Kassim
|