Usage
elca.rh(dat, year = dat$year, age = dat$age, dec.conv = 6,
error = c("poisson", "gaussian"),
restype = c("logrates", "rates", "deaths", "deviance"),
scale = F, interpolate = F, verbose = T, spar = NULL, ax.fix = NULL)
Arguments
dat
rhdata
class multidimensional mortality data object
year
vector of years to be included in the regression (all available years by default)
age
vector of ages to be included in the regression (all available ages by default)
dec.conv
number of decimal places used to achieve convergence. The lower the value the faster the convergence of the fitting algorithm. Note: very high values could over fit the parameters.
error
type of error structure of the model choice (Poisson distribution of the errors by default)
restype
types of residuals, which also controls the type of the fitted value.
Thus, in the cases of logrates
and rates
the function returns as fitted values the log and untransformed mortality rates, respectively. Likewise, the choices of deaths
and deviance
correspond to the fitted number of deaths
scale
logical, if TRUE, re-scale the interaction parameters so that the $k_t$ has drift parameter equal to 1 (see also lca
) interpolate
logical, if TRUE, replace before regression all zero or missing values in the mortality rates of dat
argument by interpolation across calendar years (see also smooth.demogdata
) verbose
logical, it controls the amount of process information
spar
numerical smoothing spline parameter in the interval (0,1] (with a recommended value of 0.6). If it is not NULL, the interaction effects (i.e. $\beta_x^{(0,1)}$) are smoothed out after the initial regression. Consequently, the period and/or cohort effects are adjusted (smoothed out) accordingly.
ax.fix
vector of constant age effect to be used in the model (e.g. the fitted values of a standard LC regression to the experience of a large population). If NULL the base ax values are estimated from dat