[R] Plot of odds ratios obtained from a logistic model

Frank E Harrell Jr f.harrell at Vanderbilt.Edu
Sun Feb 7 00:29:47 CET 2010


Also take a look at summary.rms and its plot method which produces odds 
ratio dot charts directly.

Frank

David Winsemius wrote:
> 
> 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
> 
> ______________________________________________
> 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.
> 


-- 
Frank E Harrell Jr   Professor and Chairman        School of Medicine
                      Department of Biostatistics   Vanderbilt University



More information about the R-help mailing list