Changelog
Source:NEWS.md
drmr 0.2.1
A new toggle called
rho_mu
introduced. Its default value is1
and 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
init
now admits real numbers too.init_data
: default now is to initialize the age-classes for all patches ranging from.9
to.01
.-
Allowing for choosing which process is correlated in time;
- The variable
raw
becamew_t
; -
tau
becamesigma_t
- The flag
time_ar
becamear_re
(stands for AR random effect). Now,ar_re
can 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_i
patch specific random effect andsigma_i
the 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_s
patch specific random effect andsigma_s
the approx marginal SD of the spatial random effect. - Similarly to the two structures mentioned above, the flag
sp_re
admits 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_data
Fixing bugs regarding the popdyn initialization.
drmr 0.1.3
Modified
examples.qmd
to prevent errors due to pathfinder failing.Updated github actions.
Same problematic behaviour that was affecting
make_data
had to be dealed with prior initialization and predictions.-
Options for “data informed” phi priors through the floag
phi_hat
When
family = "gamma"
and a prior forphi
is not provided, the default prior for this parameter is a Gamma withshape = 2
andrate = ybar * s2
. This prior has its theoretical mean at the method of moments estimator ofphi
.When
family = "lognormal"
and a prior forphi
is 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_drm
function added to recover the age-specific densities form afit_drm
call.fixed a bug on the
forecast.stan
script.
drmr 0.1.1
Vignettes updated so
R CMD check
“works”.The
lambda
s 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_score
functionsFixing
check_between
function (not exported; This functions is just a helper)Changed prior on
zeta
and 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
rlang
became 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
alpha
to .Prior on
phi
now is Gamma.fit_drm
andfit_sdm
returns changed. Now, the elementdraws
is calledstanfit
. In addition, there is an additional element to the returned list calledformulas
. Theformulas
elements aims at making thepredict_*
functions less error prone.The QR parametrization toggles were completely removed.
The
coef_*
parameters were converted tobeta_*
. That is,coef_r
now isbeta_r
; whilecoef_t
now 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_mort
becomesest_surv
(as it makes more sense with the text).get-started
andexamples
vignette updated.
drmr 0.0.24
Initial values for population dynamics have been fixed.
Vignettes to quarto
New
between
function based ondata.table::between
.int_score
function to calculate the interval score was also included. The interval score helps to assess interval predictions.age_at_maturity
is 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_a
andpr_alpha_b
, respectively.-
New functions to initialize the parameters from the prior have been introduced. Now the
init
parmeter from thefit_sdm
andfit_drm
functions 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_drm
andfit_sdm
functions to make model fitting slightly simpler.pr_phi_a
andpr_phi_b
becomepr_phi_mu
andpr_phi_sd
. The prior for is a Student’s t with 3 degrees of freedom, meanpr_phi_mu
and SDpr_phi_sd
.Selectivity in
make_data
was fixed, thanks to Mark. Before, it was not being used when users input it.
drmr 0.0.21
make_data_sdm
function (analogous tomake_data
) created for SDM.predict_sdm
function (analogous topredict_drm
) created for SDM.
drmr 0.0.2
Parameters in the code and documentation were properly matched.
p_error
toggle becomestime_ar
toggle (more appropriate).predict_drm
function createdthe
make_data
function now has afamily
argument indicating the probability distribution assumed for the response (given all the model parameters and latent variables)