Contains functions that lets you fit dynamic hazard models using
state space models. The first implemented model is described in Fahrmeir
type == "VAR"in particle filters in the smoothing proposal distribution. This has a major impact for most calls.
type == "VAR"in particle filters where the transition from the time zero state to time one was not used in the M-step estimation. This only has a larger impact for short series.
method == "bootstrap_filter"where a wrong covariance matrix was used for the proposal distribution.
method == "AUX_normal_approx_w_particles"where a wrong covariance matrix was used for the proposal distribution.
logLik.PF_clouds. The log-likelihood approximation was too high especially for the auxiliary particle filters.
..._w_particlesmethods so results have changed.
fixedargument is added to
PF_EMas an alternative way to specify the random and fixed effect parts.
PF_EMand can be estimated with
model = "exponential".
ddhazardobjects are no longer degenerate (e.g., in the case where a second order random walk is used). Instead the dimension is equal to the dimension of the error term.
PF_EMhas been moved from the
controllist. Further, there is a
PF_controlwhich should preferably be used to construct the object for the
PF_EMuses $Q_0$ instead of $Q$ for the artificial prior and a bug have been fixed for sampling in the initial state in the backward filter. This have changed the output.
PF_EMwith seed argument. The new way to get reproducible is to call
f1 <- PF_EM(...); .GlobalEnv$.Random.seed" <- f1$seed; f2 <- eval(f1$call)kinda as in
ddhazardshould be changed from
glmis used to find the first state vector.
ddhazardcontrol argument is changed.
The following has been changed or added:
is_for_discrete_model = TRUEin the call. The issue was that individuals who were right censored in the middle of an interval were included despite that we do not know that they survive the entire interval. This will potentially affect the output for logit fits with
ddhazard_bootnow provides the option of different learning rates to be used rather than one if the first fit succeeds.
control = list(criteria = "delta_likeli", ...). The relative change in coefficient seems "preferable" as a default since it tends to not converge when the fit is has large "odd" deviation due to a few observations. The likelihood method though stops earlier for model does not have such deviation.
ddhazard. These described "ddhazard" vignette and examples of usage are shown the vignette "Diagnostics".
residualsmethod and a vignette "Diagnostics" with examples of usage of the
rugcall in the shiny app demo, fixed a bug with the simulation function for the logit model and added the computation time of the estimation to the output.
control = list(use_pinv = FALSE, ...).
The following have been added:
weightsargument when calling
ddhazard_boot. See the new vignette 'Bootstrap_illustration' for details.