[R] Plot of odds ratios obtained from a logistic model
David Winsemius
dwinsemius at comcast.net
Sat Feb 6 22:22:40 CET 2010
On Feb 6, 2010, at 4:13 PM, David Freedman wrote:
>
> You might want to look at the plot.Predict function in the rms
> package - it
> allows you to plot the logits or probablities vs the predictor
> variable at
> specified levels of other covariates (if any) in the model. There
> are many
> examples in http://cran.r-project.org/web/packages/rms/rms.pdf
But it will not work on a glm( ..., family=binomial) object. To work
with such an object you would need to plot exp(fit$linear.predictors)
or fit$fitted.values
plot.Predict will only work with the functions in the rms package, ...
in the case of logistic models that would be lrm().
>
> David Freedman
> --
> View this message in context: http://n4.nabble.com/Plot-of-odds-ratios-obtained-from-a-logistic-model-tp1471496p1471566.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
David Winsemius, MD
Heritage Laboratories
West Hartford, CT
More information about the R-help
mailing list