powered by
Extract posterior predictive density estimate for sbde
sbde
# S3 method for sbde predict(object, burn.perc = 0.5, nmc = 200, yRange = range(object$y), yLength = 401, ...)
Returns a list with three items:
vector giving the grid over which the posterior predictive density is evaluated.
a matrix with yLength many rows and nmc many columns. Each column corresponds to a draw of the response density from the posterior predictive.
yLength
nmc
summary of the posterior predictive density given by point-wise median, 2.5th and 97.5th percentiles.
a fitted model of the class 'sbde'.
a positive fraction indicating what fraction of the saved draws are to be discarded as burn-in
integer giving the number of samples, post burn-in, to be used in Monte Carlo averaging
Range of values over which posterior predictive density is to be evaluated.
Number of grid points spanning yRange for posterior predictive density evaluation.
no additional parameters are used.
sbde, coef.sbde and summary.sbde.
coef.sbde
summary.sbde
y <- abs(rt(n=1000, df=4)) fit <- sbde(y, blocking="all", fbase="gpd", verbose=FALSE) pp <- predict(fit) hist(y, 50, freq=FALSE) with(pp, for(j in 1:3) lines(y, fest[,j], lty=1+(j!=2)))
Run the code above in your browser using DataLab