fit_mst: Fit MST mixture model

Description Usage Arguments Examples

View source: R/fit_mst.R

Description

This function fits the MST mixture model without imputation

Usage

1
fit_mst(Y, X, W, K, nu = 3, nsim = 1000, burn = 0)

Arguments

Y

matrix of non-missing outcome data

X

matrix of predictors used in the MSN model component

W

matrix of predictors used in the multinomial logit clustering component

K

number of clusters to fit. Use WAIC to choose best K.

nu

degrees of freedom parameter for skew-t model.

nsim

number of MCMC iterations to perform

burn

number of initial MCMC iterations to discard. The function will return nsim - burn total posterior samples.

Examples

1
2
3
4
5
6
7
data(example1_data)
fit1 <- fit_mst(Y = example1_data$Y,
                X = example1_data$X,
                W = example1_data$W,
                K = 3,
                nsim = 10,
                burn = 0)

carter-allen/BayesMSN documentation built on Aug. 22, 2020, 8:27 a.m.