Displaying 2 results from an estimated 2 matches for "logit2".
Did you mean:
logit
2008 Dec 11
1
help with predict in stats4
Hi,
We're using stats4 for a logistic regression. The code is
chdreg.logit2 <- glm(chd ~ age + sex, family = binomial)
summary(chdreg.logit2)
oddsratios <- coef(chdreg.logit2)
exp(oddsratios)
# Calculate model predicted values
pred <- predict(chdreg.logit2,type="response")
The glm part runs fine, and up to now so has the predict function.
However, no...
2002 Dec 25
2
inv.logit (package boot) (PR#2394)
Full_Name: Ole Christensen
Version: 1.6.1
OS: linux-gnu
Submission from: (NULL) (130.225.18.176)
In package boot :
> inv.logit(800)
[1] NaN
where it should have been 1.
The problem is caused by exp(x) returning Inf when x is large.
One way of fixing the problem [there may be better ways] would be to include the
line
out[x > 709] <- 1
in inv.logit()
Cheers Ole
>