plot.OEFPIL: Plot the estimate from an OEPFIL object

Description Usage Arguments Details Value See Also Examples

View source: R/plot.OEFPIL.R

Description

Plot of the iterated linearization estimate of a function from an "OEFPIL" object with pointwise confidence and prediction bands.

Usage

1
2
## S3 method for class 'OEFPIL'
plot(x, xx, signif.level, interval, new.obs.variance, ...)

Arguments

x

an object of class "OEFPIL" (a result of a call to OEFPIL).

xx

a sequence of x-coordinates of points for computing and plotting confidence bands. If missing, the default sequence seq(from = min(x), to = max(x), length.out = 301) is used.

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: "conf" for confidence interval, "pred" for prediction interval or c("conf", "pred") for both. If missing, no intervals are plotted.

new.obs.variance

the variance of a new observation for prediction interval computing (see confBands.OEFPIL).

...

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 xx.

PointwiseCB

a matrix of confidence intervals at points xx.

PredictCB

a matrix of prediction intervals at points xx.

See Also

OEFPIL

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
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"))

OEFPIL documentation built on Nov. 4, 2021, 5:07 p.m.