modelRegionalTempAR1SimpleYear: modelRegionalTempAR1SimpleYear

Description Usage Arguments Details Value Examples

View source: R/jagsWrappers.R

Description

modelRegionalTempAR1SimpleYear Linear mixed model in JAGS to model daily stream temperature

Usage

1
2
3
4
modelRegionalTempAR1SimpleYear(data = tempDataSyncS, cov.list,
  formulae = NULL, firstObsRows, evalRows, param.list, n.burn = 5000,
  n.it = 3000, n.thin = 3, nc = 3, coda = FALSE, runParallel = TRUE,
  cluster_type = NULL, data_dir = data_dir)

Arguments

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

Details

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.

Value

Returns the iterations from the Gibbs sampler for each variable in params as either an mcmc.list or jags.samples object

Examples

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)

Conte-Ecology/conteStreamTemperature documentation built on Oct. 12, 2021, 10:26 p.m.