clvm {phenopath} | R Documentation |
Fit a covariate latent variable model using coordinate ascent variational inference.
clvm(y, x, maxiter = 10000, elbo_tol = 1e-05, thin = 1, verbose = TRUE, z_init = 1, tau_q = 1, tau_mu = 1, tau_c = 1, a = 2, b = 2, tau_alpha = 1, a_beta = 10, b_beta = 1, q = rep(0, nrow(y)), model_mu = FALSE, scale_y = TRUE)
y |
A N-by-G (dynamic) input matrix |
x |
A N-by-P (static) input matrix |
maxiter |
Maximum number of CAVI iterations |
elbo_tol |
The (percent) change in the ELBO below which it is considered converged |
thin |
The number of iterations to wait each time before re-calculating the elbo |
verbose |
Print convergence messages |
z_init |
The initialisation of the latent trajectory. Should be one of
|
tau_q |
Hyperparameter tau_q |
tau_mu |
Hyperparameter tau_mu |
tau_c |
Hyperparameter tau_c |
a |
Hyperparameter a |
b |
Hyperparameter b |
tau_alpha |
Hyperparameter tau_alpha |
a_beta |
Hyperparameter a_beta |
b_beta |
Hyperparameter b_beta |
q |
Priors on the latent variables |
model_mu |
Logical - should a gene-specific intercept term be modelled? |
scale_y |
Logical - should the expression matrix be centre scaled? |
A list whose entries correspond to the converged values of the variational parameters along with the ELBO.
sim <- simulate_phenopath() fit <- clvm(sim$y, matrix(sim$x))