fit.iMoMoI: Fit an Improvement Rate Model indirectly

Description Usage Arguments

View source: R/fitiMoMoI.R

Description

Fit an Improvement Rate Model indirectly via fiting the equivalent mortality rate model and then trasforming the output to improvement rates

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## S3 method for class 'iMoMoI'
fit(
  object,
  data = NULL,
  Dxt = NULL,
  Ext = NULL,
  ages = NULL,
  years = NULL,
  ages.fit = NULL,
  years.fit = NULL,
  wxt = NULL,
  start.ax = NULL,
  start.bx = NULL,
  start.kt = NULL,
  start.b0x = NULL,
  start.gc = NULL,
  verbose = TRUE,
  ...
)

Arguments

object

an object of class "iMoMoI" defining the improvement rate model.

data

an optional object of type StMoMoData containing information on deaths and exposures to be used for fitting the model. This is typically created with function StMoMoData. If this is not provided then the fitting data is taken from arguments, Dxt, Ext, ages, years.

Dxt

optional matrix of deaths data.

Ext

optional matrix of observed exposures of the same dimension of Dxt.

ages

optional vector of ages corresponding to rows of Dxt and Ext.

years

optional vector of years corresponding to rows of Dxt and Ext.

ages.fit

optional vector of ages to include in the fit. Must be a subset of ages.

years.fit

optional vector of years to include in the fit. Must be a subset of years.

wxt

optional matrix of 0-1 weights to be used in the fitting process. This can be used, for instance, to zero weight some cohorts in the data. See genWeightMat which is a helper function for defining weighting matrices.

start.ax

optional vector with starting values for α_x.

start.bx

optional matrix with starting values for β_x^{(i)}.

start.kt

optional matrix with starting values for κ_t^{(i)}.

start.b0x

optional vector with starting values for β_x^{(0)}.

start.gc

optional vector with starting values for γ_c.

verbose

a logical value. If TRUE progress indicators are printed as the model is fitted. Set verbose = FALSE to silent the fitting and avoid progress messages.

...

arguments to be passed to or from other methods. This can be used to control the fitting parameters of gnm. See gnm.


amvillegas/iMoMo documentation built on Sept. 18, 2020, 11:25 p.m.