Hi, I am attempting to set the confidence limits on a ls means plot as follows: mult<-glht(lm(effectModel, data=statdata, na.action = na.omit), linfct=mcp(mainEffect="Means")) meanPlot <- sub(".html", "meanplot.jpg", htmlFile) jpeg(meanPlot) plot(mult, main=NA, xlab=unlist(strsplit(Args[4],"~"))[1]) This produces 95% CIs by default but I would like to produce 99% CIs - How do I do this? Thanks, Robin -- View this message in context: http://www.nabble.com/Change-Confidence-Limits-on-a-plot-tp20503927p20503927.html Sent from the R help mailing list archive at Nabble.com.
Robin Clark wrote:> > > mult<-glht(lm(effectModel, data=statdata, na.action = na.omit), > linfct=mcp(mainEffect="Means")) > meanPlot <- sub(".html", "meanplot.jpg", htmlFile) > jpeg(meanPlot) > > plot(mult, main=NA, xlab=unlist(strsplit(Args[4],"~"))[1]) > > This produces 95% CIs by default but I would like to produce 99% CIs - How > do I do this? >See documentation under plot.confint.glht. Finding the function doing the job can be a bit tricky in R, because plot(mult,) does not call a generic plot routine in this case, but it tries the "best matching" for the object generated. Frequently, you can expect something like plot.glht being called, but the docs of multcompt show that this does not exist, so plot.confint.glht comes close. Using str(mult) and methods() you can formalize this search, but in most cases good guesses are faster. (Note: no sample provided, since you example is not self-contained) Dieter -- View this message in context: http://www.nabble.com/Change-Confidence-Limits-on-a-plot-tp20503927p20504328.html Sent from the R help mailing list archive at Nabble.com.
On Fri, 2008-11-14 at 08:35 -0800, Robin Clark wrote:> Hi, > I am attempting to set the confidence limits on a ls means plot as follows: > > mult<-glht(lm(effectModel, data=statdata, na.action = na.omit), > linfct=mcp(mainEffect="Means")) > meanPlot <- sub(".html", "meanplot.jpg", htmlFile) > jpeg(meanPlot) > > plot(mult, main=NA, xlab=unlist(strsplit(Args[4],"~"))[1]) > > This produces 95% CIs by default but I would like to produce 99% CIs - How > do I do this?plot(confint(mult, level = 0.99)) should do it if I understand both you and the help for multcomp correctly. HTH G> > Thanks, > Robin >-- %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% Dr. Gavin Simpson [t] +44 (0)20 7679 0522 ECRC, UCL Geography, [f] +44 (0)20 7679 0565 Pearson Building, [e] gavin.simpsonATNOSPAMucl.ac.uk Gower Street, London [w] http://www.ucl.ac.uk/~ucfagls/ UK. WC1E 6BT. [w] http://www.freshwaters.org.uk %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
Thanks Gavin and Dieter, I think I've now got the plot working through using the level argument as follows: plot(confint(mult,level = sig) , main=NA, xlab=unlist(strsplit(Args[4],"~"))[1]) -- View this message in context: http://www.nabble.com/Change-Confidence-Limits-on-a-plot-tp20503927p20507096.html Sent from the R help mailing list archive at Nabble.com.