View source: R/one_way_anova.R
| sim_pred_hanova1 | R Documentation | 
Simulates nrep draws from the posterior predictive distribution
of the one-way hierarchical ANOVA model described in hanova1.
This function is called within hanova1 when the argument
nrep is supplied.
sim_pred_hanova1(theta_sim_vals, sim_vals, fac, nrep)
theta_sim_vals | 
 A numeric matrix with   | 
sim_vals | 
 A numeric matrix with   | 
fac | 
 The argument   | 
nrep | 
 A numeric scalar.  The number of replications of the original
dataset simulated from the posterior predictive distribution.
If   | 
A numeric matrix with nrep columns.  Each column contains
a draw from the posterior predictive distribution of the number of
successes.
RCP26_2 <- temp2[temp2$RCP == "rcp26", ]
temp_res <- hanova1(resp = RCP26_2[, 1], fac = RCP26_2[, 2])
sim_pred <- sim_pred_hanova1(temp_res$theta_sim_vals, temp_res$sim_vals,
                             RCP26_2[, 2], 50)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.