[R] Hmisc, Design, summary.Design plot- changing confidence intervals, adding color or decreasing font size
David Winsemius
dwinsemius at comcast.net
Sat Jul 18 17:41:18 CEST 2009
On Jul 18, 2009, at 11:14 AM, Elizabeth Stanny wrote:
>
> Frank,
>
> I had already tried q=c(0.7,0.8,0.9,0.95) as an argument in
> plot.summary.Design and it did not work (i.e., CIs were not
> plotted). Could you point me to an example using
> plot.summary.Design that uses q as argument and has output? I would
> greatly appreciate it.
I am encountering an error when using any number of probabilities
other than 5 and I think it relates to how the confbar col= defaults
are set.
plot(s, log=TRUE, at=c(.1,.5,1,1.5,2,4,8), q=c(0.7,0.8,0.9,0.95))
Error in confbar(nbar - (i - is + 1) + 1, effect[i], se[i], q = q,
type = "h", :
q and col must have same length
?confbar
Using the example on the help page with a modified q vector of
length 5 gives output:
plot(s, log=TRUE, at=c(.1,.5,1,1.5,2,4,8), q = c(0.6, 0.8, 0.95,
0.975, 0.99))
Experimentation shows that providing a col vector of the same length
as q also succeeds:
plot(s, log=TRUE, at=c(.1,.5,1,1.5,2,4,8), q=c(0.7,0.8,0.9,0.95),
col=gray(c(0, 0.25, 0.75, 1)))
--
DW
>
> Thanks. Elizabeth
>
> Using: Hmisc_3.6-0 and Design_2.2-0
>
> ## S3 method for class 'summary.Design':
> plot(x, at, log=FALSE,
> q=c(0.7, 0.8, 0.9, 0.95, 0.99), xlim, nbar, cex=1, nint=10,
> cex.c=.5, cex.t=1, clip=c(-1e30,1e30), main, ...)
>
> On Saturday, July 18, 2009, at 06:58AM, "Frank E Harrell Jr" <f.harrell at vanderbilt.edu
> > wrote:
>> David Winsemius wrote:
>>> I am completely puzzled by this exchange, first because changing the
>>> conf.int argument _does_ affect the output of plot.Design in the
>>> expected manner, and second, because the help page of plot.Design
>>> includes a description of conf.int as a parameter and says its
>>> default
>>> _is_ 0.95.
>>
>> She is not using plot.Design. She is using plot.summary.Design.
>>
>> Note that plot.summary.Design does have a related argument called q.
>>
>> Frank
>>
>>>
>>> Using Design_2.1-2 survival_2.35-4 Hmisc_3.5-2
>>>
>>
>>
>> --
>> Frank E Harrell Jr Professor and Chair School of Medicine
>> Department of Biostatistics Vanderbilt
>> University
>>
>>
David Winsemius, MD
Heritage Laboratories
West Hartford, CT
More information about the R-help
mailing list