rowBootMeans {brmsmargins} | R Documentation |

## Bootstrap Row Means

### Description

This takes a numeric matrix, bootstrap resamples each row, and then calculates the mean. The intended use case is for Bayesian posterior predictions from sample data. Instead of directly calculating the average marginal effect (AME) across all observed values, these can be bootstrapped, so that uncertainty in the target population, and thus the AME in the target population, can be incorporated. Model uncertainty is already assumed to be handled by the different posterior samples, which are assumed to be across rows.

### Usage

```
rowBootMeans(x)
```

### Arguments

`x` |
A numeric matrix |

### Value

A numeric vector with the simple bootstrapped row means of the matrix

### Examples

```
x <- matrix(1:9, byrow = TRUE, 3)
replicate(10, rowBootMeans(x))
```

[Package

*brmsmargins*version 0.2.0 Index]