beta_mean {miniLNM} | R Documentation |
Average the samples for the beta parameter from the VB posterior mean. This
is used to get predicted compositions when using predict
on an lnm model.
beta_mean(fit)
fit |
An object of class |
A matrix whose rows are predictors and columns are outcomes in the beta parameter for the LNM model.
example_data <- lnm_data(N = 50, K = 10)
xy <- dplyr::bind_cols(example_data[c("X", "y")])
fit <- lnm(
starts_with("y") ~ starts_with("x"), xy,
iter = 25, output_samples = 25
)
beta_mean(fit)