Learn R Programming

OEFPIL (version 0.1.1)

confBands.OEFPIL: Confidence and prediction bands for OEFPIL object

Description

Function calculates pointwise confidence bands and prediction bands of estimated function from an object of class "OEFPIL".

Usage

## S3 method for class 'OEFPIL'
   confBands(object, xx, signif.level = 0.05, new.obs.variance)

Arguments

object

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

xx

a sequence of x-coordinates of points for computing confidence and prediction intervals. 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. If missing, the default value 0.05 is used.

new.obs.variance

the variance of a new observation for prediction interval computing.

Value

Returns an object of type list containing the following components.

xx

a numerical vector of points where intervals 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.

Details

An argument signif.level can be one numerical value or vector of numerical values of significance levels for confidence intervals.

If new.obs.variance is not defined by user, the average variance in the dependent variable is used to compute prediction intervals.

See Also

OEFPIL, plot.OEFPIL

Examples

Run this code
# NOT RUN {
##-- Continuing the coef.OEFPIL(.) example:

##Use of confBands function with default parameters
a <- confBands(st1)
str(a)

##Computing two different confidence bands in one step
b <- confBands(st1, signif.level = c(0.01,0.05))
str(b)

# }

Run the code above in your browser using DataLab