View source: R/cnp_model_mcmc.R
cnp_model_mcmc | R Documentation |
This function combines MTE and stoichiometric theory in order to predict nescessary ingestion and excretion processes. A probability distribution is obtained by including uncertainty of parameters and using MCMC sampling with stan.
cnp_model_mcmc( TL, param, iter = 1000, cor = list(ro_Qc_Qn = 0.5, ro_Qc_Qp = -0.3, ro_Qn_Qp = -0.2, ro_Dc_Dn = 0.2, ro_Dc_Dp = -0.1, ro_Dn_Dp = -0.1, ro_lwa_lwb = 0.9, ro_alpha_f0 = 0.9), ... )
TL |
Total length(s) in cm |
param |
List of all parameter means (add "_m") and standard deviations (add "_sd") Default parameters are set with very low sd's. parameters:
|
iter |
A positive integer specifying the number of iterations. The default is 2000. |
cor |
A list of correlations between certain parameters: ro_Qc_Qn, ro_Qc_Qp, ro_Qn_Qp, ro_Dc_Dn, ro_Dc_Dp, ro_Dn_Dp, ro_lwa_lwb, ro_alpha_f0 |
... |
Additional arguments rstan::sampling, see ?rstan:sampling |
Returns a list with two objects: A stanfit object and a data.frame with a summary of all model components.
See extract
to extract a summary of predicted variables and
limitation
to get information on the limiting element.
library(fishflux) model <- cnp_model_mcmc(TL = 10, param = list( Qc_m = 40, Qn_m = 10, Qp_m = 4, theta_m = 3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.