Nothing
mod_pois()
, mod_binom()
, mod_norm()
to
clarify prior for dispersion. Added default value (of 1) to
set_disp()
. This does not affect behaviour, but is a bit clearer
for users. (#94)set_covariates()
, added paragraph in online documentation to
note that calling set_covariates()
on a model that already has
covariates deletes the existing covariates. Also added a warning
message to set_covariates()
when covariates being
overwritten. (#95).mod_pois()
emits message (not warning) if one or more rates are
suspiciously high (which is often a sympton of inaccurate
exposures.) (#96)rpois_rvec()
, which sets x[i] equal to
lambda[i] for lambda[i] > 1e8. This avoids numeric problems which
can lead to valgrind errors. The guarded version is called by
augment()
and by replicate_data()
. The user is warned when the
threshold of 1e8 is exceeded.set_n_draw()
, which was failing to thin covariate
coefficient draws. (#97)mod_norm()
and in the Mathematical Details
vignette (vignette 2), give a new parameterisation of the
mod_norm()
model, expressed on the original scale, not the
transformed scale (and closer to the paramterisation used by
mod_pois()
and mod_binom()
.)bage_mod_norm
method for replicate_data()
so that it
returns results on the original scale.bage_mod_norm
methods for the helper functions for
augment()
so that they properly incorporate weights.original_scale
argument to components()
, to be used with
normal models. Also added message remining users that, with normal
models, components were on a log scale (#88)NaN
and no Inf
permitted.fit_default()
refactored in 0.9.1. Bug
meant that when optimizer switched from nlminb()
to optim()
on
non-convergence, optim()
was not starting from old parameter
values.RW2_Infant()
to priors table. Hat-tip to Luke
Morris for noticing that entry was missing. (#87)set_covariates()
. Models can now include
covariates. Covariates are predictors other than the
cross-classifying dimensions such as age, sex, or time -- though
covariates can be formed from these dimensions.gdp_pc_2023
and dens_2020
to dataset
kor_births
.prt_deaths
dataset.set_seeds()
function, allowing users to reset random seeds
(though this would be uncommon in normal use.)NA
s in offset and predictor variables."bage_mod"
objects"multi"
option for optimizer
argument to fit()
. With
"multi"
, the fit()
function first tries nlminb()
and if that
fails switches to optim()
with method "BFGS"
. "bage_mod"
objects to show the time
spent by TMB::sdreport
rather than the time spent by drawing from
the multivariate normal (which, since bage started using
sparseMVN, is very short).gdp_pc_2023
and dens_2020
variables to kor_births
report_sim()
excludes comparisons of "hyper"
parameters (eg
standard deviations) if the simulation model and estimation model
use different priors with different classes for that term. For
instance if the simulation model uses a RW()
prior for age and the
estimation model uses a RW2()
prior for age, then report_sim()
will not report on the standard deviation parameter for age.report_sim()
stating that the
interface is still under development.zero_sum
argument to con
(short for "constraint"). con
= "none"
corresponds to zero_sum = FALSE
, and con = "by"
corresponds to zero_sum = TRUE
. Additional options will be added
in future.sd
argument to RW()
, RW2()
, SVD_RW()
and
SVD_RW2()
. The initial value of the random walks are drawn from a
N(0, sd^2)
prior. By default sd
equals 1
, but it can be set to
0.AR()
and Lin_AR()
priors so that the
coefficients no longer need to be consistent with stationarity. The
Stan user guide recommends against building in stationarity:
https://mc-stan.org/docs/stan-users-guide/time-series.html#autoregressive.section
Also, testing for stationarity often causes numerical problems.AR()
and Lin_AR()
priors. AR()
and Lin_AR()
priors, so
that partical autocorrelation function (PACF), rather than the AR
coefficients themselves, are restricted to (-1, 1). Restricting the
PACF to (-1,1) ensures stationarity.optimizer
argument to fit()
, giving choice between three
ways of optimizingquiet
argument to fit()
so that when it is
TRUE
, trace output from the optimizer is shown.start_oldpar
argument to fit()
, to allow calculations to
be restarted on a model that has already been fitted."bage_mod"
object.computations
part of models so that it
works with models fitted using the "inner-outer" method. Extended
the print()
method for "bage_mod"
so that it shows extra output
for models fitted using the "inner-outer"
method."bage_mod"
objects. (Thank you to Andrew Taylor for suggesting this.)s = 0
in Lin()
priorszero_sum
argument to priors with an along
dimension. When
zero_sum
is TRUE
, values for each combination of a by
variable
and the along
variable are constrained to sum to zero. This can
allow better identification of higher-level terms in complicated
models. It can also slow computations, and has virtually no effect on
estimates of the lowest-level rates, probabilities, and means.RW2_Infant()
prior for modelling age-patterns of mortality
rates.s_seas
parameter in RW_Seas()
and RW2_Seas()
now defaults
to 0, rather than 1, so that seasonal effects are by default fixed
over time rather than varying. Using varying seasonal effects can
greatly increase computation times.computations()
, which can be used to extract this
information from fitted model objects.quiet
argument to fit()
. When quiet
is TRUE
(the
default), warnings generated by nlminb()
are suppressed. (These
warnings are virtually always about NAs early in the optimization
process and are nothing to worry about.)HFD
, a scaled SVD object holding data from the Human
Fertiltiy Databasedeaths
--> isl_deaths
expenditure
--> nld_expenditure
divorces
--> nzl_divorces
injuries
--> nzl_injuries
us_acc_deaths
--> usa_deaths
kor_births
, births in South Koreareport_sim()
now works on fitted models. Thank you to Ollie Pike
for pointing out that it previously did not.age
variable in divorces
.rr3()
. Call poputils
function rr3()
instead.newdata
argument to forecast()
.Lin()
and Lin_AR()
priors.method
and vars_inner
to fit()
. When
method
is "standard"
(the default) fit()
uses the existing
calculation methods. When method
is "inner-outer"
, fit()
uses
a new, somewhat experimental calculation method that involves
fitting an inner model using a subset of variables, and then an
outer model using the remaining variables. With big datasets,
"inner-outer"
can be faster, and use less memory, but give very
similar results.fit()
now internally aggregates input data before fitting, so that
cells with the same combinations of predictor variables are
combined. This increases speed and reduces memory usage.print.bage_mod
ssvd()
no longer exported. Will export once package
bssvd matures.augment()
so it runs fasterdivorces
datasetset_datamod_outcome_rr3()
,
which deals with the case where the outcome variable has been
randomly rounded to base 3.augment()
now creates a new version of the outcome variable if (i)
the outcome variable has NA
s, or (ii) a data model is being
applied to the outcome variable. The name of the new variable is
created by added a .
to the start of the name of the outcome
variable.standardization
argument:
"terms"
, "anova"
, and "none"
. With "terms"
, all effects,
plus assoicated SVD coefficients, and trend, cyclical, and
seasonal terms, are centered independently. With "anova"
, the type
of standardization descibed in Section 15.6 of Gelman et al (2014)
Bayesian Data Analysis, is applied to the effects.SVDS()
, SVDS_AR()
, SVDS_AR1()
, SVDS_RW()
, and
SVDS_RW2()
priors. Added indep
argument to corresponding SVD
priors. SVD
priors now choose between 'total', 'independent' and
'joint' models based on (1) the value of indep
argument, (2) the
value of var_sexgender
and the name of the term.HMD
now contains 5 components, rather than 10.Lin()
and LinAR()
priorsSVD_AR()
, SVDS_AR()
, SVD_AR1()
, SVDS_AR1()
,
SVD_RW()
, SVDS_RW()
, SVD_RW2()
, SVDS_RW2()
draws_linpred
, added
draws_effectfree
, draws_spline
, and draws_svd
. Modified/added
downstream functions.compose_time()
report_sim()
components()
.augment()
method for bage_mod
objects now calculated value for
.fitted
in cases where the outcome or exposure/size is NA, rather
than setting the value of .fitted
to NA
.components()
is
called. augment()
uses the linear predictor (which does not need
standardization.)disp
are stored, rather than the full
standardized components.ssvd_comp()
.forecast.bage_mod()
Forecasting. Interface not yet finalised.generate.bage_ssvd()
Generate random age-sex profiles from SVD.draw_vals_effect_mod()
was malfunctioning on models that contained SVD priors.Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.