r-help-boun...@r-project.org napsal dne 17.08.2009 16:18:43: > Dear all, > I would like to plot credible interval for a function estimate in R. I > would like to plot the credible intervals as shaded region using polygon > function. Does anyone ever used that? I tried several times but I could > not obtain the right figure. > > xis=sort(xi,decreasing=TRUE) > > plot(xi,fm) > polygon(c(xi,xis),c(f05m,f95m)) > > The above piece of code produces something else.
Above piece of code produces errors > xis=sort(xi,decreasing=TRUE) Error in sort(xi, decreasing = TRUE) : object 'xi' not found > plot(xi,fm) Error in plot(xi, fm) : object 'xi' not found > polygon(c(xi,xis),c(f05m,f95m)) Error in xy.coords(x, y) : object 'f05m' not found > Recently there was a threads about shading between 2 lines and se interval for prediction. And also in help page ?predict.lm you can find a code for plotting prediction interval for linear model Regards Petr > > Many thanks in advance, > > > > Aysun > > ______________________________________________ > 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.