fit_mvn_PG: Multivariate normal mixture model clustering - PG multinom...

View source: R/fit_mvn_PG.R

fit_mvn_PGR Documentation

Multivariate normal mixture model clustering - PG multinom regression

Description

Implement Gibbs sampling for MVN model. Includes fixed effects multinomial regression on cluster indicators using Polya-Gamma data augmentation.

Usage

fit_mvn_PG(Y, W, K, nsim = 2000, burn = 1000, z_init = NULL, verbose = FALSE)

Arguments

Y

An n x g matrix of gene expression values. n is the number of cell spots and g is the number of features.

W

An n x v matrix of covariates to predict cluster membership. Should include an intercept (i.e., first column is 1)

K

The number of mixture components to fit.

nsim

Number of total MCMC iterations to run.

burn

Number of MCMC iterations to discard as burn in. The number of saved samples is nsim - burn.

z_init

Optional initialized allocation vector. Initialized with hierarchical clustering if NULL.

verbose

Logical for printing cluster allocations at each iteration.

Value

a list of posterior samples


carter-allen/spruce documentation built on April 6, 2024, 8:34 p.m.