s-news
[Top] [All Lists]

Logistic regression in nlme

To: <s-news@lists.biostat.wustl.edu>
Subject: Logistic regression in nlme
From: "Abd Rahman Kassim" <abdrahman_1@email.msn.com>
Date: Thu, 14 Dec 2000 07:55:00 -0800
Importance: Normal
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



<Prev in Thread] Current Thread [Next in Thread>