Frank E Harrell Jr Professor and Chairman School of Medicine
Department of Biostatistics Vanderbilt University
On Tue, 17 Aug 2010, Rob James wrote:
1) How does one capture the plots from the plsmo procedure? Simply
inserting a routing call to a graphical device (such as jpeg, png, etc)
and then running the plsmo procedure (and then dev.off()) does not route
the output to the file system. 1b) Related to above, has anyone thought
of revising the plsmo procedure to use ggplot? I'd like to capture
several such graphs into a faceted arrangement.
Hi Rob,
plsmo in Hmisc uses base graphics, and I have captured its output many
times using pdf() or postscript().
I'll bet that Hadley Wickham has an example that will help. For
lattice there is panel.plsmo.
2) The 2nd issue is more about communications than software. I have
developed a model using lrm() and am using plot to display the model.
All that is fairly easy. However, my coauthors are used to traditional
methods, where baseline categories are rather broadly defined (e.g.
males, age 25-40, height 170-180cm, BP 120-140, etc) and results are
reported as odds-ratios, not as probabilities of outcomes.
Therefore, and understandably, they are finding the graphs which arise
from lrm->Predict->plot difficult to interpret. Specifically, in one
graph, the adjusted to population is defined one way, and in another
graph of the same model (displaying new predictors) there will be a new
"adjusted to" population. Sometimes the adjusted populations are
substantially distinct, giving rise to event rates that vary
dramatically across graphs. This can prove challenging when trying to
present the set of graphs as parts of a whole. It all makes sense; it
just adds complexity to introducing these new methods.
I very simple example might help us with this one.
But odds ratios resulting from categorizing continuous variables are
invalid. They do not have the claimed interpretation. In fact they
have no interpretation in the sense that their interpretation is a
function of the entire set of sample values. You can get whatever
odds ratios you need (with exact interpretations) using summary or
contrast. You can also modify plot to plot relative odds, relative to
something of your choosing.
Frank
>
One strategy might be to manually define the baseline population across
graphs; this way I could attempt to impose some content-specific
coherence to the graphs, by selecting the baseline populations. Clearly
this is do-able, but I have yet to see it done. I'd welcome suggestions
and comments.
Thanks,
Rob
______________________________________________
R-help@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.
______________________________________________
R-help@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.