Description Usage Arguments Details Author(s) See Also
View source: R/sim_train_test.R
Simulates in-sample and out-of-sample model performance for simple quap
models, returning lppd in and out of sample, WAIC, LOOIC, and LOOCV.
1 2 3 4 5 6 7 |
N |
Number of cases in simulated data |
k |
Number of parameters in model to fit to data |
rho |
Vector of correlations between predictors and outcome, in simulated data |
b_sigma |
Standard deviation of beta-coefficient priors |
DIC |
If |
WAIC |
If |
LOOIC |
If |
LOOCV |
If |
devbar |
If |
devbarout |
If |
cv.cores |
Number or cores to use for cross-validation |
return_model |
If |
This function simulates Gaussian data and then fits linear regression models to it, returning the lppd of the fit as produced by lppd
(training, in-sample) and the deviance on a new sample, computed using the posterior from the training sample.
Richard McElreath
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.