confband.pw: Pointwise Confidence Bands

Description Usage Arguments Value Note Author(s) References Examples

Description

This function computes pointwise confidence bands for samples of the presumed distribution of the parameter estimator.

Usage

1
confband.pw(samples, level = 0.95)

Arguments

samples

matrix containing samples of the presumed distribution of the parameter estimator.

level

the desired confidence level.

Value

lower

a vector containing the lower bound of the confidence band.

upper

a vector containing the lower bound of the confidence band.

Note

This function is mainly derived from the work of T. Krivobokova, T. Kneib and G. Claeskens.

Author(s)

Alexander Sohn

References

T. Krivobokova, T. Kneib, G. Claeskens (2010): Simultaneous Confidence Bands for Penalized Spline Estimators, in: Journal of the American Statistical Association, Vol. 105(490), pp.852-863.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
mu<-1:20
n<-1000
mcmc<-matrix(NA,n,20)
for(i in 1:20){
  mcmc[,i]<- rnorm(n,mu[i],sqrt(i))
}

plot(mu,type="l",ylim=c(-10,30),lwd=3)
lines(confband.pw(mcmc)$lower,lty=2)
lines(confband.pw(mcmc)$upper,lty=2)
lines(confband.kneib(mcmc)$lower,lty=3)
lines(confband.kneib(mcmc)$upper,lty=3)

acid documentation built on May 1, 2019, 10:14 p.m.