sim_pred_hanova1 {bang} | R Documentation |

## Simulate from a one-way hierarchical ANOVA posterior predictive distribution

### Description

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.

### Usage

```
sim_pred_hanova1(theta_sim_vals, sim_vals, fac, nrep)
```

### Arguments

`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 |

### Value

A numeric matrix with `nrep`

columns. Each column contains
a draw from the posterior predictive distribution of the number of
successes.

### Examples

```
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)
```

*bang*version 1.0.3 Index]