Description Usage Arguments Value Examples
Given results from predict.rbart, gets draws from the predictive distribution at each x and then computes the empirical inverse cdf to get draws which would be uniform if the predicitive were the true distribution. Then draws a qqplot against the uniform. In large enough samples, if the model is correct, the qqplot should look like like a straight line with intercept 0 and slope 1. In small samples, we expect the predictive to be more spread out than the true distribution, even if the model is correct.
1 | hbartqqplot(y,rbmod,nunif=10000,linecolor="red",linewd=3,...)
|
y |
y values corresponding to x values given to predict.rbart. |
rbmod |
Output list from predict.rbart. |
nunif |
Number of uniform(0,1) draws used in constructing the qqplot. |
linecolor,linewd |
Line color and width for (0,1) line. |
... |
Arguments passed on to stats::qqplot. |
quantiles of y in draws from the predictive (conditional on each x value).
1 2 3 4 5 6 7 8 9 10 11 12 13 | ##################################################
## please see vignette and/or www.rob-mcculloch.org for more realistic examples
##################################################
## get simulated data
data(simdat)
##get rbart run on the simulated data
data(rbartonsimd)
## Predictive quantile-quantile plot
temp = hbartqqplot(simdat$yp,rbartonsimd,xlab="predictive quantile",ylab="uniform",
cex.axis=1.4,cex.lab=1.2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.