Learn R Programming

multimedia (version 0.2.0)

lnm_model: Logistic Normal Multinomial Model

Description

Apply a logistic normal multinomial model to jointly model a vector of count responses $y$ in an outcome or mediation model. This is a common choice for data where the parameter of interest is the composition across responses (e.g., microbiome).

Usage

lnm_model(...)

Value

model An object of class model with estimator, predictor, and sampler functions associated wtih a linear model.

Arguments

...

Keyword parameters passed to lnm in the 'miniLNM' package.

See Also

model lm_model rf_model glmnet_model brms_model

Examples

Run this code
m <- lnm_model()
mat <- data.frame(matrix(rpois(250, 10), 25, 10))
colnames(mat) <- paste0("y", seq_len(6))
fit <- estimator(m)(y1 + y2 + y3 + y4 ~ y5 + y6, mat)

Run the code above in your browser using DataLab