View source: R/poisson_lognormal.R
poisson_lognormal | R Documentation |
poisson_lognormal
uses Hamiltonion Monte Carlo to sample form an extend
Poisson log-normal mixed model. Each cell and protein marker has its own rate
parameter following a linear model.
poisson_lognormal( df_samples_subset, protein_names, condition, group, r_donor, eta = 1, iter = 325, warmup = 200, num_chains = 1, adapt_delta = 0.8, seed = 1 )
df_samples_subset |
Data frame or tibble with proteins counts, cell condition, and group information |
protein_names |
A vector of column names of protein to use in the analysis |
condition |
The column name of the condition variable |
group |
The column name of the group variable |
r_donor |
Rank of the donor random effect covariance matrix |
eta |
Hyperparameter for LKJ prior |
iter |
Number of iteration per chain for the HMC sampler |
warmup |
Number of warm up steps per chain for the HMC sampler |
num_chains |
Number of HMC chains to run in parallel |
adapt_delta |
Parameter to control step size of numerical solver |
seed |
Set seed for HMC sampler (higher value means smaller step size, max is 1) |
A list of class cytoeffect_poisson
containing
fit_mcmc |
|
protein_names |
input protein names |
condition |
input condition variable |
group |
input group names |
df_samples_subset |
input df_samples_subset table |
set.seed(1) df = simulate_data(n_cells = 10) str(df) fit = poisson_lognormal(df, protein_names = names(df)[3:ncol(df)], condition = "condition", group = "donor", r_donor = 2, warmup = 200, iter = 325, adapt_delta = 0.95, num_chains = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.