View source: R/fit_mvn_PG_CAR_smooth.R
fit_mvn_PG_CAR_smooth | R Documentation |
Implement Gibbs sampling for MVN model. Includes fixed effects multinomial regression w/ CAR random intercepts on cluster indicators using Polya-Gamma data augmentation and spatial smoothing.
fit_mvn_PG_CAR_smooth(
Y,
W,
coords_df,
K,
r = 3,
nsim = 2000,
burn = 1000,
z_init = NULL
)
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) |
coords_df |
An n x 2 data frame or matrix of 2d spot coordinates. |
K |
The number of mixture components to fit. |
r |
Empirical spatial smoothing |
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. Randomly initialized if NULL. |
a list of posterior samples
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.