elena daniela concepcion
2010-Feb-17 18:37 UTC
[R] Help with sigmoidal quasi-poisson regression using glm and gnm functions
Hi everyone, I'm trying to perform the following regressions in order to compare linear vs. sigmoidal fit of the relationship between my dependent variable (y) and one explaining parameter (x2), both including the confounding effects of a third variable (x1): quasi-pois-lin <- glm(y ~ x1 + x2, family = quasipoisson(link="identity"), data=fit) quasi-pois-sig <- gnm(y ~ x1 + Mult(1, Inv(Const(1) + Exp(Mult(1 + offset(-x2), Inv(1))))), family = quasipoisson(link="identity"), data=fit) I can perform the linear model but not the sigmoidal one and I get an error message: Error in if (all(diagInfo < 1e-20) || all(abs(score) < tolerance * sqrt(tolerance + : absent value when TRUE/FALSE is necessary Besides: Lost warning messages 1: In log(ifelse(y == 0, 1, y/mu)) : There are NaNs 2: In sqrt(w) : There are NaNs I have included all possible logical arguments in different ways but it hasn't work, so I don't know what else I can do. Does someone know where is the mistake? Many thanks in advance and best regards, Elena [[alternative HTML version deleted]]