# rbartonsimd: rbart run on simulated data In rbart: Bayesian Trees for Conditional Mean and Variance

## Description

predict.rbart results for simulated data.

## Usage

 `1` ```data("rbartonsimd") ```

## Format

`rbartonsimd`

returned list from a call to predict.rbart on the simulated data.

## Details

The data rbartonsimd is the results of an rbart run on the simulated data in simdat.

The code for the rbart run is:

data(simdat)
attach(simdat) #some people think this is a bad idea

## run rbart
set.seed(99)
 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20``` ```## load simulated data and rbart run. data(rbartonsimd) data(simdat) ## plot data and x vs f(x), x vs f(x) +/- 2s(x), x in test data, true and estimated ## data plot(simdat\$xp,simdat\$yp) ## true lines(simdat\$xp,simdat\$fxp,col="blue",lty=2,lwd=2) lines(simdat\$xp,simdat\$fxp+2*simdat\$sxp,col="blue",lty=2,lwd=2) lines(simdat\$xp,simdat\$fxp-2*simdat\$sxp,col="blue",lty=2,lwd=2) ##estimated mhat = rbartonsimd\$mmean; shat = rbartonsimd\$smean lines(simdat\$xp,mhat,col="red",lty=1,lwd=2) lines(simdat\$xp,mhat + 2*shat,col="red",lty=1,lwd=2) lines(simdat\$xp,mhat - 2*shat,col="red",lty=1,lwd=2) ## note that you can get "nicer" looking fits by ## (i) running rbart longer (e.g. ndpost=500), ## (ii) using numcut=1000,k=5 in rbart. ```