Description Usage Arguments Value Note Author(s) References Examples
This function computes simultaneous confidence bands for samples of the presumed distribution of the parameter estimator.
1 | confband.kneib(samples, level = 0.95)
|
samples |
matrix containing samples of the presumed distribution of the parameter estimator. |
level |
the desired confidence level. |
lower |
a vector containing the lower bound of the confidence band. |
upper |
a vector containing the lower bound of the confidence band. |
This function is taken from the work of T. Krivobokova, T. Kneib and G. Claeskens.
Alexander Sohn
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.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.