Elizabeth Stanny
2009-Jul-18 00:31 UTC
[R] Hmisc, Design, summary.Design plot- changing confidence intervals, adding color or decreasing font size
Hi, 1. I want 95% not 99% confidence intervals in my summary.Design plot using the Design package. Putting conf.int=.95 as an argument in plot does not work. The default appears to be .99 not .95 as stated in the package Design manual (p. 164). 2. My sweave chuck is below and my output is attached as well as linked here: http://www.sonoma.edu/users/s/stanny/330A/project/ciplot.pdf 3. Alternatively, how do I make the confidence interval text smaller for the second plot (the interval text is cut-off) or color the intervals? 4. I have 14 plots and would like to have 2 per page. Thanks in advance. <<ghg07,fig=T>>par(mfrow=c(2,1)) s.fghg.new.06 <- summary(fghg.new.06) s.fghg.06 <- summary(fghg.06) dimnames(s.fghg.new.06)[[1]] <- newoddsl dimnames(s.fghg.06)[[1]] <- oldoddsl plot(s.fghg.06, log=T, main="Disclosed Accounting Method", at=c(.5,1,2,4,8,20), cex=.65, cex.c=.65, cex.t=.65) plot(s.fghg.new.06, log=T, main="Did not not Disclose CDP06", at=c(.5,1,2,4,8,20), cex= .65, cex.c= .65, cex.t= .65) @ where: fghg.06 <- lrm(ghg.2006 ~ghg.2005+intsalep.2006 + EPA.2006 + toper.2006 + vol.2006 + lnass.2006, data=dw, x=TRUE, y=TRUE) fghg.new.06 <- lrm(ghg ~intsalep + EPA + toper + vol + lnass, data=newghg,subset=year==0, x=TRUE, y=TRUE) Elizabeth Stanny Professor of Business Sonoma State University stanny at sonoma.edu
Frank E Harrell Jr
2009-Jul-18 12:55 UTC
[R] Hmisc, Design, summary.Design plot- changing confidence intervals, adding color or decreasing font size
Elizabeth Stanny wrote:> Hi, > > 1. I want 95% not 99% confidence intervals in my summary.Design plot using the Design package. Putting conf.int=.95 as an argument in plot does not work. The default appears to be .99 not .95 as stated in the package Design manual (p. 164). >Please check the documentation again. conf.int is not an argument to plot; it is an argument to summary. Frank> 2. My sweave chuck is below and my output is attached as well as linked here: > http://www.sonoma.edu/users/s/stanny/330A/project/ciplot.pdf > > 3. Alternatively, how do I make the confidence interval text smaller for the second plot (the interval text is cut-off) or color the intervals? > > 4. I have 14 plots and would like to have 2 per page. > > Thanks in advance. > > <<ghg07,fig=T>>> par(mfrow=c(2,1)) > s.fghg.new.06 <- summary(fghg.new.06) > s.fghg.06 <- summary(fghg.06) > dimnames(s.fghg.new.06)[[1]] <- newoddsl > dimnames(s.fghg.06)[[1]] <- oldoddsl > > plot(s.fghg.06, log=T, > main="Disclosed Accounting Method", > at=c(.5,1,2,4,8,20), > cex=.65, > cex.c=.65, > cex.t=.65) > > plot(s.fghg.new.06, log=T, > main="Did not not Disclose CDP06", > at=c(.5,1,2,4,8,20), > cex= .65, > cex.c= .65, > cex.t= .65) > @ > > where: > fghg.06 <- lrm(ghg.2006 ~ghg.2005+intsalep.2006 + EPA.2006 + toper.2006 + vol.2006 + lnass.2006, > data=dw, x=TRUE, y=TRUE) > > fghg.new.06 <- lrm(ghg ~intsalep + EPA + toper + vol + lnass, > data=newghg,subset=year==0, x=TRUE, y=TRUE) > > > Elizabeth Stanny > Professor of Business > Sonoma State University > stanny at sonoma.edu > > > ------------------------------------------------------------------------ > > ______________________________________________ > 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 Chair School of Medicine Department of Biostatistics Vanderbilt University
David Winsemius
2009-Jul-18 13:50 UTC
[R] Hmisc, Design, summary.Design plot- changing confidence intervals, adding color or decreasing font size
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. Using Design_2.1-2 survival_2.35-4 Hmisc_3.5-2 -- DW On Jul 18, 2009, at 8:55 AM, Frank E Harrell Jr wrote:> Elizabeth Stanny wrote: >> Hi, >> 1. I want 95% not 99% confidence intervals in my summary.Design >> plot using the Design package. Putting conf.int=.95 as an argument >> in plot does not work. The default appears to be .99 not .95 as >> stated in the package Design manual (p. 164). > > Please check the documentation again. conf.int is not an argument > to plot; it is an argument to summary. > > Frank > >> 2. My sweave chuck is below and my output is attached as well as >> linked here: >> http://www.sonoma.edu/users/s/stanny/330A/project/ciplot.pdf >> 3. Alternatively, how do I make the confidence interval text >> smaller for the second plot (the interval text is cut-off) or >> color the intervals? 4. I have 14 plots and would like to have 2 >> per page. >> Thanks in advance. <<ghg07,fig=T>>>> par(mfrow=c(2,1)) >> s.fghg.new.06 <- summary(fghg.new.06) >> s.fghg.06 <- summary(fghg.06) >> dimnames(s.fghg.new.06)[[1]] <- newoddsl >> dimnames(s.fghg.06)[[1]] <- oldoddsl >> plot(s.fghg.06, log=T, >> main="Disclosed Accounting Method", >> at=c(.5,1,2,4,8,20), >> cex=.65, >> cex.c=.65, >> cex.t=.65) >> plot(s.fghg.new.06, log=T, >> main="Did not not Disclose CDP06", >> at=c(.5,1,2,4,8,20), >> cex= .65, >> cex.c= .65, >> cex.t= .65) >> @ >> where: >> fghg.06 <- lrm(ghg.2006 ~ghg.2005+intsalep.2006 + EPA.2006 + toper. >> 2006 + vol.2006 + lnass.2006, >> data=dw, x=TRUE, y=TRUE) >> fghg.new.06 <- lrm(ghg ~intsalep + EPA + toper + vol + lnass, >> data=newghg,subset=year==0, x=TRUE, y=TRUE) >> Elizabeth Stanny >> Professor of Business >> Sonoma State University >> stanny at sonoma.edu >> ------------------------------------------------------------------------ >> ______________________________________________ >> 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 Chair School of Medicine > Department of Biostatistics Vanderbilt > University > > ______________________________________________ > 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
Frank E Harrell Jr
2009-Jul-18 13:58 UTC
[R] Hmisc, Design, summary.Design plot- changing confidence intervals, adding color or decreasing font size
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
2009-Jul-18 15:23 UTC
[R] Hmisc, Design, summary.Design plot- changing confidence intervals, adding color or decreasing font size
On Jul 18, 2009, at 9:58 AM, Frank E Harrell Jr 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.So Stanny did not need to change the argument to 0.95 because it is already that value by default (per the summary.Design help page) , but experimentation shows that she nonetheless got an error of this sort: > plot(s, log=TRUE, at=c(.1,.5,1,1.5,2,4,8), conf.int=0.9) Error in confbar(nbar - (i - is + 1) + 1, effect[i], se[i], q = q, type = "h", : unused argument(s) (conf.int = 0.9)> > Note that plot.summary.Design does have a related argument called q. > -- > Frank E Harrell Jr Professor and Chair School of Medicine > Department of Biostatistics Vanderbilt > UniversityDavid Winsemius, MD Heritage Laboratories West Hartford, CT
Mike Babyak
2009-Jul-19 14:42 UTC
[R] Hmisc, Design, summary.Design plot- changing confidence intervals, adding color or decreasing font size
Elizabeth Stanny wrote:> Hi, > > 1. I want 95% not 99% confidence intervals in my >summary.Design plotusing the Design package. Putting >conf.int <http://conf.int/>=.95 as an argument in plot does not work. The default >appears to be .99 not .95 as stated in the package Design >manual (p. 164).>(hope this works--I haven't posted from the digest before) It may not be immediately obvious, but the color (col) argument must always match q in length. When you change the length of q to display a number of CIs that is different from the default (5, I think), col is still set to correspond to that default number of CIs. So, you also must change col so that it matches q in length. For example, this will not work because there is no matching col argument: plot(summymodel,q=.95) You'll get this error msg: Error in confbar(nbar - (i - is + 1) + 1, effect[i], se[i], q = q, type "h", q and col must have same length But this will: plot(summymodel,q=.95,col=2) If you wanted two sets of CIs, say 95 and 99: plot(summymodel,q=c(.95,.99),col=c(2,5)) ************************************************************ Mike Babyak Duke Medical Center [[alternative HTML version deleted]]