run_mod | R Documentation |
Fit errors-in-variables models with JAGS
run_mod( dat, model = "slr", EIV = TRUE, BP_scale = FALSE, n_cp = 1, igp_smooth = 0.2, iter = 5000, burnin = 1000, thin = 4, scale_factor_x = 1, scale_factor_y = 1 )
dat |
Input data with columns x,x_err,y,y_err |
model |
The model to run. Choose from slr, cp, gp, igp |
EIV |
Use EIV framework. Defaults to TRUE |
BP_scale |
Present the data as Before Present (BP). Defaults to FALSE. |
n_cp |
Number of change points if model = "cp" is chosen. Can choose from 1,2,3,4. |
igp_smooth |
Informs prior for the smoothness (correlation) parameter if model = "igp" is chosen. Choose a value between 0 and 1. Closer to 1 will increase smoothness. |
iter |
MCMC iterations |
burnin |
MCMC burnin |
thin |
MCMC thinning |
scale_factor_x |
value to divide the predictor (x) by to change the scale. 1 will result in no change. 1000 is recommended if x is years. |
scale_factor_y |
value to divide the response (y) by to change the scale. 1 will result in no change. |
List with data, JAGS input data, model output and the name of the model file.
dat <- sim_slr(n_sim = 30) mod <- run_mod(dat, model = "slr")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.