plot.OEFPIL {OEFPIL} | R Documentation |
Plot the estimate from an OEPFIL object
Description
Plot of the iterated linearization estimate of a function from an "OEFPIL"
object with pointwise confidence and prediction bands.
Usage
## S3 method for class 'OEFPIL'
plot(x, xx, signif.level, interval, new.obs.variance, ...)
Arguments
x |
an object of class |
xx |
a sequence of x-coordinates of points for computing and plotting confidence bands. If missing, the default sequence |
signif.level |
a numerical value or a vector of significance levels for confidence bands. |
interval |
a character vector. It states type of an interval to draw. Following values are possible: |
new.obs.variance |
the variance of a new observation for prediction interval computing (see |
... |
additional arguments (same as in plot function) affecting the plot. |
Details
If the signif.level
argument is missing, even though an interval
argument is set to "conf"
, the default value 0.05 is used.
The line type is set to 'dashed'
for confidence bands and 'dotted'
for prediction bands.
The confidence and prediction bands are computed under normality assumption. If the vector signif.level
length is greater than 1,
then multiple bands are plotted. The widest band has colour no. 2. The second widest band has colour no. 3 etc.
Value
Returns an object of type list containing at least the following components
xx |
a numerical vector of points where bands are calculated. |
yy |
a numerical vector with values of estimated function in |
PointwiseCB |
a matrix of confidence intervals at points |
PredictCB |
a matrix of prediction intervals at points |
See Also
Examples
library(MASS)
##Use of plot function with default parameters
##(only estimation of the function is plotted, without confidence or prediction bands)
steamdata <- steam
colnames(steamdata) <- c("x","y")
n <- nrow(steamdata)
CM1 <- diag(rep(10,2*n))
st1 <- OEFPIL(steamdata, y ~ b1 * 10^(b2 * x/ (b3 + x)), list(b1 = 5, b2 = 8, b3 = 200),
CM1, useNLS = FALSE)
plot(st1)
##Use of plot function for plotting confidence bands
plot(st1, seq(0,113,0.1), signif.level = c(0.01,0.05), interval = "conf",
main = "Graph of estimated function")
##Use of plot function for plotting prediction bands
plot(st1, seq(0,113,0.1), interval = "pred", new.obs.variance = 15)
##Return values of plot function
(a <- plot(st1, signif.level = 0.05, interval = "conf"))