Developer note: Ensuring that this can be used in both simulate() and JAGS got quite messy with a lot of if-statements. It works but some refactoring may be good in the future.
get_ar_code(ar_order, family, is_R, xvar, yvar = NA)
String with JAGS code for AR.
Positive integer. The order of ARMA
An mcpfamily object
Bool. Is this R code (TRUE) or JAGS code (FALSE)?
Jonas Kristoffer Lindeløv jonas@lindeloev.dk