modelRegionalTemp: modelRegionalTemp

Description Usage Arguments Details Value Examples

Description

modelRegionalTemp Linear mixed model in JAGS to model daily stream temperature

Usage

1
2
3
4
5
6
7
8
modelRegionalTemp(data = tempDataSyncS, params = c("sigma", "B.0", "B.site",
  "rho.B.site", "mu.site", "sigma.b.site", "B.year", "rho.B.year", "mu.year",
  "sigma.b.year"), n.burn = 5000, n.it = 3000, n.thin = 3, n.chains = 3,
<<<<<<< HEAD
  coda = FALSE)
=======
  coda = FALSE, runParallel = TRUE)
>>>>>>> 34a3efc373678e8b541effdb2d515ef4aef95807

Arguments

data

dataframe created in the 3-statModelPrep.Rmd script

params

Character string of parameters to monitor (return) from the model

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

n.chains

Integer number of chains. One run per cluster so should use <= # cores on computer

coda

Logical if TRUE return coda mcmc.list, if FALSE (default) return jags.samples object

Details

This function takes daily observed stream temperatures, air temperature, snow-water-equivalent (swe), day of the year, and landscape covariates for a linear mixed effects model with site 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: 
mcmc.out <- modelRegionalTemp(tempDataSyncS, n.burn = 1000, n.it = 1000, n.thin = 3, n.chains = 3)

## End(Not run)

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