set_ecov | R Documentation |
Specify configuration for environmental covariates, effects on the population, and parameter values
set_ecov(input, ecov)
input |
list containing data, parameters, map, and random elements (output from |
ecov |
(optional) named list of environmental covariate data and parameters (see details)
|
a named list with same elements as the input provided with environmental covariate observations, effects, and model options modified.
prepare_wham_input
## Not run:
wham.dir <- find.package("wham")
path_to_examples <- system.file("extdata", package="wham")
asap3 <- read_asap3_dat(file.path(path_to_examples,"ex1_SNEMAYT.dat"))
env.dat <- read.csv(file.path(path_to_examples,"GSI.csv"), header=T)
input <- prepare_wham_input(asap3, NAA_re = list(sigma = "rec"))
ecov <- list(
label = "GSI",
mean = as.matrix(env.dat$GSI),
logsigma = 'est_1', # estimate obs sigma, 1 value shared across years
year = env.dat$year,
use_obs = matrix(1, ncol=1, nrow=dim(env.dat)[1]), # use all obs (=1)
process_model = 'ar1') # "rw" or "ar1"
input <- set_ecov(input, ecov = ecov) #GSI in the model without any effects
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.