check_entered_data | R Documentation |
Functions in paramedic
expect data (W, V, and X) in matrix, data.frame
, or tibble form, with the first column being sample identifiers.
Sample identifiers must be the same between W, V, and X and the column must
have the same name in W and V. This function checks the incoming data,
transforms it into the data list that is passed to the Stan functions, and
computes any initial values of model parameters.
check_entered_data(
W,
V,
X,
k,
inits_lst,
sigma_beta,
sigma_Sigma,
alpha_sigma,
kappa_sigma
)
make_paramedic_tibbles(
W,
V,
X,
k,
inits_lst,
sigma_beta,
sigma_Sigma,
alpha_sigma,
kappa_sigma
)
make_paramedic_stan_data(
k,
W_mat,
V_mat,
X_mat,
inits_lst,
sigma_beta,
sigma_Sigma,
alpha_sigma,
kappa_sigma,
alpha_phi,
beta_phi,
n_chains,
centered = FALSE
)
W |
The relative abundance data, e.g., from broad range 16S sequencing with "universal" primers. Expects data (e.g., matrix, data.frame, tibble) with sample identifiers in the first column. Sample identifiers must be the same between W and V, and the column must have the same name in W and V. |
V |
The absolute abundance data, e.g., from taxon-specific absolute primers. Expects data (e.g., matrix, data.frame, tibble) with sample identifiers in the first column. Sample identifiers must be the same between W and V, and the column must have the same name in W and V. |
X |
The covariate data. Expects data (e.g., matrix, data.frame, tibble) with sample identifiers in the first column. Sample identifiers must be the same between W, V, and X, and the column must have the same name in W, V, and X. If X only consists of the subject identifiers, then no covariates are used. |
k |
the number of batches (0 if a single batch) |
inits_lst |
An optional list of initial values of the parameters.
Must be a named list; see |
sigma_beta |
Hyperparameter specifying the prior variance on
|
sigma_Sigma |
Hyperparameter specifying the prior variance on
|
alpha_sigma |
Hyperparameter specifying the shape parameter of the
prior distribution on |
kappa_sigma |
Hyperparameter specifying the scale parameter of the
prior distribution on |
W_mat |
the pre-processed matrix W |
V_mat |
the pre-processed matrix V |
X_mat |
the pre-processed matrix X |
alpha_phi |
Hyperparameter specifying the shape parameter of the
prior distribution on |
beta_phi |
Hyperparameter specifying the scale parameter of the
prior distribution on |
n_chains |
the number of chains to run |
centered |
whether or not to use the centered parameterization of the
stan algorithm. Defaults to |
make_paramedic_tibbles
: Make tibbles from entered data
make_paramedic_stan_data
: Make data and initial values lists to
pass to stan
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.