Changelog
Source:NEWS.md
drmr 0.2.1
A new toggle called
rho_muintroduced. Its default value is1and stands for explicitly relating the probability of observing a 0 (rho) to the latent density (mu). See Yee 2014 and references therein.A new vignette with a comprehensive list of the model parameters and their priors is available.
A new vignette detailing the initialization procedures is also included.
drmr 0.2.0
initnow admits real numbers too.init_data: default now is to initialize the age-classes for all patches ranging from.9to.01.-
Allowing for choosing which process is correlated in time;
- The variable
rawbecamew_t; -
taubecamesigma_t - The flag
time_arbecamear_re(stands for AR random effect). Now,ar_recan assume three values:- “none”, the default indicating no AR random effects.
- “rec” (AR for recruitment)
- “surv” (AR for survival)
- “dens” (AR for density)
- The variable
-
Unstructured random effects.
- The following variables are added to the model:
z_ipatch specific random effect andsigma_ithe SD of the iid random effect. - Similarly to
ar_re, the unstructured random effects can be enabled through the flatiid_re, which also admits the following entries:- “none” (default) indicating no IID random effects.
- “rec” (IID for recruitment)
- “surv” (IID for survival)
- “dens” (iID for density)
- The following variables are added to the model:
-
ICAR random effects
- The following variables are added to the model:
w_s,z_spatch specific random effect andsigma_sthe approx marginal SD of the spatial random effect. - Similarly to the two structures mentioned above, the flag
sp_readmits the following values: “none” (default), “rec” (recruitment), “surv” (survival), and “dens” (density).
- The following variables are added to the model:
Functions for data simulation were temporarily removed.
Fixing
init_dataFixing bugs regarding the popdyn initialization.
drmr 0.1.3
Modified
examples.qmdto prevent errors due to pathfinder failing.Updated github actions.
Same problematic behaviour that was affecting
make_datahad to be dealed with prior initialization and predictions.-
Options for “data informed” phi priors through the floag
phi_hatWhen
family = "gamma"and a prior forphiis not provided, the default prior for this parameter is a Gamma withshape = 2andrate = ybar * s2. This prior has its theoretical mean at the method of moments estimator ofphi.When
family = "lognormal"and a prior forphiis not provided, the default prior for this parameter is a Gamma having its theoretical mean at the MLE ofphi.
fixed typo when defining log-logistic reparametrization
drmr 0.1.2
lambda_drmfunction added to recover the age-specific densities form afit_drmcall.fixed a bug on the
forecast.stanscript.
drmr 0.1.1
Vignettes updated so
R CMD check“works”.The
lambdas are no longer returned by the fit and predict functions. Returning those values imply a significant decrease in the computational performance, especially as increasing the sample size.The AR term in the model was “corrected”.
Some bugs with prior initialization for the sdm were fixed.
drmr 0.1.0
Exporting
fix_linbeta,max_quad_x, andint_scorefunctionsFixing
check_betweenfunction (not exported; This functions is just a helper)Changed prior on
zetaand allowing for user to input the hyperparameters. Before, we had a standard normal prior on the logit ofzeta. Now, we place a beta prior onzeta.Included support for different types of population dynamics initialization
Fixed how pdf and random number generation from location-scale Student’s t distribution
rlangbecame a dependency.Included functions for simulating data from the DRM model and prior predictive checks.
Trying to avoid overflow by making calculations on the log-scale whenever it’s possible.
Constraining
alphato .Prior on
phinow is Gamma.fit_drmandfit_sdmreturns changed. Now, the elementdrawsis calledstanfit. In addition, there is an additional element to the returned list calledformulas. Theformulaselements aims at making thepredict_*functions less error prone.The QR parametrization toggles were completely removed.
The
coef_*parameters were converted tobeta_*. That is,coef_rnow isbeta_r; whilecoef_tnow isbeta_t, and so on.The
pr_logsd_r_*inputs converted topr_ltau_*.Functions to plot effect of covariates on recruitment, survival, or absence probability were included.
est_mortbecomesest_surv(as it makes more sense with the text).get-startedandexamplesvignette updated.
drmr 0.0.24
Initial values for population dynamics have been fixed.
Vignettes to quarto
New
betweenfunction based ondata.table::between.int_scorefunction to calculate the interval score was also included. The interval score helps to assess interval predictions.age_at_maturityis replaced byages_movement. The former can take either a single integer indicating the age at which individuals start to move, or a vector with 0s for age-groups that do not move and 1s for age-groups that are allowed to move.
drmr 0.0.23
The prior for has been modified. In particular, instead of a pcp prior, now we put a Beta prior on . The hyperparameters of this Beta distribution are
pr_alpha_aandpr_alpha_b, respectively.-
New functions to initialize the parameters from the prior have been introduced. Now the
initparmeter from thefit_sdmandfit_drmfunctions can take three possible values:- “default”: the standard initialization in
Stan(For details seeStan's documentation). - “prior”: initialize the parameters using samples from their respective prior distributions;
- “pathfinder”: uses the Pathfinder algorithm to initialize the parameters.
- “default”: the standard initialization in
Fixed some issues with documentation.
drmr 0.0.22
fit_drmandfit_sdmfunctions to make model fitting slightly simpler.pr_phi_aandpr_phi_bbecomepr_phi_muandpr_phi_sd. The prior for is a Student’s t with 3 degrees of freedom, meanpr_phi_muand SDpr_phi_sd.Selectivity in
make_datawas fixed, thanks to Mark. Before, it was not being used when users input it.
drmr 0.0.21
make_data_sdmfunction (analogous tomake_data) created for SDM.predict_sdmfunction (analogous topredict_drm) created for SDM.
drmr 0.0.2
Parameters in the code and documentation were properly matched.
p_errortoggle becomestime_artoggle (more appropriate).predict_drmfunction createdthe
make_datafunction now has afamilyargument indicating the probability distribution assumed for the response (given all the model parameters and latent variables)