Message-ID: <F6797AE9-93CF-4DDC-A614-B81782F6B9ED@comcast.net>
Date: 2011-11-12T02:57:47Z
From: David Winsemius
Subject: Odds ratios from lrm plot
In-Reply-To: <1321063699793-4033340.post@n4.nabble.com>
On Nov 11, 2011, at 9:08 PM, RD235 wrote:
> The code
>
> library(Design)
> f <- lrm(y~x1+x2+x1*x2, data=data)
> plot(f)
>
> produces a plot of log odds vs x2 with 0.95 confidence intervals.
> How do I
> get a plot of odds ratios vs x2 instead?
You would construct a dataset that had selected combinations of x1 and
x2 and then plot the "response".
It's been a couple of years since I used Design. Harrell migrated to
lattice plots when he upgraded to 'rms' and changed the Predict/plot
interface a bit. In the new version it might something like
plot(predict(f, x1=seq( ...), x2=c(1,2), type= "fitted"), deopending
on teh data arrangement. Why don't you look more closely at the help
page for `lrm` and work through the examples. At least in the current
'rms' version there is more than one worked example, and I'm pretty
sure there were one in Design before that.
--
David Winsemius, MD
West Hartford, CT