Description Usage Arguments Details Value Examples
modelRegionalTempAR1SiteScaled
Linear mixed model in JAGS to model daily stream temperature
1 2 3 4 |
data |
dataframe created in the 3-statModelPrep.Rmd script |
n.burn |
Integer number of iterations in the burn-in (adapation) phase of the MCMC |
n.it |
Integer number of iterations per chain to run after the burn-in |
n.thin |
Integer: save every nth iteration |
coda |
Logical if TRUE return coda mcmc.list, if FALSE (default) return jags.samples object |
data.fixed |
Dataframe of fixed effects parameter names from columns in data. These are parameters without random slopes. |
data.random.sites |
Dataframe of variables to have random slopes by site |
data.random.years |
Dataframe of variables to have random slopes by year |
deployments |
Named vector of the logger deployment starting positions (rows) within the dataframe. |
params |
Character string of parameters to monitor (return) from the model |
n.chains |
Integer number of chains. One run per cluster so should use <= # cores on computer |
This function takes daily observed stream temperatures, air temperature, day of the year, and landscape covariates for a linear mixed effects model with site within HUC8 and year random effects.
Returns the iterations from the Gibbs sampler for each variable in params as either an mcmc.list or jags.samples object
1 2 3 4 | ## Not run:
M.ar <- modelRegionalTempAR(data, data.fixed, data.random.sites, data.random.years, n.burn = 1000, n.it = 1000, n.thin = 1, nc = 3, coda = coda.tf, param.list = monitor.params)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.