confband.pw {acid} | R Documentation |
Pointwise Confidence Bands
Description
This function computes pointwise confidence bands for samples of the presumed distribution of the parameter estimator.
Usage
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
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)
[Package acid version 1.1 Index]