--- imach096d/doc/imach.htm 2002/03/10 15:54:47 1.7 +++ imach096d/doc/imach.htm 2002/03/13 17:27:44 1.12 @@ -1,4 +1,4 @@ - + @@ -7,6 +7,13 @@ content="text/html; charset=iso-8859-1"> Computing Health Expectancies using IMaCh + + + + + + @@ -30,7 +37,7 @@ color="#00006A">INEDEUROREVES

Version -0.71a, March 2002

+0.8, March 2002


@@ -272,7 +279,7 @@ weights or covariates, you must fill the

Your first example parameter file

-

#Imach version 0.71a, March 2002, +

#Imach version 0.8, March 2002, INED-EUROREVES

This is a comment. Comments start with a '#'.

@@ -304,7 +311,7 @@ INED-EUROREVES

Second uncommented line

-
ftol=1.e-08 stepm=1 ncov=2 nlstate=2 ndeath=1 maxwav=4 mle=1 weight=0
+
ftol=1.e-08 stepm=1 ncovcol=2 nlstate=2 ndeath=1 maxwav=4 mle=1 weight=0
-
  • ncov=2 Number of covariates in the datafile. The - intercept and the age parameter are counting for 2 - covariates.
  • +
  • ncovcol=2 Number of covariate columns in the datafile + which precede the date of birth. Here you can put variables that + won't necessary be used during the run. It is not the number of + covariates that will be specified by the model. The 'model' + syntax describe the covariates to take into account.
  • nlstate=2 Number of non-absorbing (alive) states. Here we have two alive states: disability-free is coded 1 and disability is coded 2.
  • @@ -348,7 +357,7 @@ line

    Covariates

    Intercept and age are systematically included in the model. -Additional covariates (actually two) can be included with the command:

    +Additional covariates can be included with the command:

    model=list of covariates
    @@ -368,6 +377,20 @@ Additional covariates (actually two) can the product covariate*age +

    In this example, we have two covariates in the data file +(fields 2 and 3). The number of covariates included in the data file +between the id and the date of birth is ncovcol=2 (it was named ncov +in version prior to 0.8). If you have 3 covariates in the datafile +(fields 2, 3 and 4), you will set ncovcol=3. Then you can run the +programme with a new parametrisation taking into account the +third covariate. For example, model=V1+V3 estimates +a model with the first and third covariates. More complicated +models can be used, but it will takes more time to converge. With +a simple model (no covariates), the programme estimates 8 +parameters. Adding covariates increases the number of parameters +: 12 for model=V1, 16 for model=V1+V1*age +and 20 for model=V1+V2+V3.

    +

    Guess values for optimization

    @@ -376,7 +399,7 @@ optimization. The number of parameters, number of absorbing states and non-absorbing states and on the number of covariates.
    N is given by the formula N=(nlstate + -ndeath-1)*nlstate*ncov .
    +ndeath-1)*nlstate*ncovmodel .

    Thus in the simple case with 2 covariates (the model is log (pij/pii) = aij + bij * age where intercept and age are the two @@ -397,7 +420,8 @@ aij bij

    23 -6.234642 0.022315 -

    or, to simplify (in most of cases it converges but there is no warranty!):

    +

    or, to simplify (in most of cases it converges but there is no +warranty!):

    12 0.0 0.0
    @@ -406,6 +430,45 @@ aij bij 

    23 0.0 0.0
    +

    In order to speed up the convergence you can make a first run with +a large stepm i.e stepm=12 or 24 and then decrease the stepm until +stepm=1 month. If newstepm is the new shorter stepm and stepm can be +expressed as a multiple of newstepm, like newstepm=n stepm, then the +following approximation holds: +

    aij(stepm) = aij(n . stepm) - ln(n)
    +
    and +
    bij(stepm) = bij(n . stepm) .
    + +

    For example if you already ran for a 6 months interval and +got:
    +

    # Parameters
    +12 -13.390179  0.126133 
    +13  -7.493460  0.048069 
    +21   0.575975 -0.041322 
    +23  -4.748678  0.030626 
    +
    +If you now want to get the monthly estimates, you can guess the aij by +substracting ln(6)= 1,7917
    and running
    +
    12 -15.18193847  0.126133 
    +13 -9.285219469  0.048069
    +21 -1.215784469 -0.041322
    +23 -6.540437469  0.030626
    +
    +and get
    +
    12 -15.029768 0.124347 
    +13 -8.472981 0.036599 
    +21 -1.472527 -0.038394 
    +23 -6.553602 0.029856 
    +
    +which is closer to the results. The approximation is probably useful +only for very small intervals and we don't have enough experience to +know if you will speed up the convergence or not. +
             -ln(12)= -2.484
    + -ln(6/1)=-ln(6)= -1.791
    + -ln(3/1)=-ln(3)= -1.0986
    +-ln(12/6)=-ln(2)= -0.693
    +
    +

    Guess values for computing variances

    This is an output if mle=1. But it can be @@ -419,20 +482,13 @@ matrix of the parameters, that is the in matrix, and the variances of health expectancies. Each line consists in indices "ij" followed by the initial scales (zero to simplify) associated with aij and bij.

    - - - -
    -
    # Scales (for hessian or gradient estimation)
    +
    • If mle=1 you can enter zeros:
    • +
      # Scales (for hessian or gradient estimation)
       12 0. 0. 
       13 0. 0. 
       21 0. 0. 
       23 0. 0. 
      - -
      • If mle=0 you must enter a covariance matrix (usually obtained from an earlier run).
      @@ -442,22 +498,16 @@ consists in indices "ij" follo

      This is an output if mle=1. But it can be used as an input to get the various output data files (Health expectancies, stationary prevalence etc.) and figures without -rerunning the rather long maximisation phase (mle=0).

      - -

      Each line starts with indices "ijk" followed by the -covariances between aij and bij:

      - +rerunning the rather long maximisation phase (mle=0).
      +Each line starts with indices "ijk" followed by the +covariances between aij and bij:
          121 Var(a12) 
          122 Cov(b12,a12)  Var(b12) 
                 ...
          232 Cov(b23,a12)  Cov(b23,b12) ... Var (b23) 
      -
      • If mle=1 you can enter zeros.
      • -
      - -
      # Covariance matrix
       121 0.
       122 0. 0.
      @@ -467,12 +517,8 @@ covariances between aij and bij: 

      212 0. 0. 0. 0. 0. 0. 231 0. 0. 0. 0. 0. 0. 0. 232 0. 0. 0. 0. 0. 0. 0. 0.
      -
      - -
      • If mle=0 you must enter a covariance matrix (usually - obtained from an earlier run).
        -
      • + obtained from an earlier run).

      Age range for calculation of stationary @@ -480,20 +526,19 @@ prevalences and health expectanciesagemin=70 agemax=100 bage=50 fage=100

    -

    Once we obtained the estimated parameters, the program is able +
    Once we obtained the estimated parameters, the program is able to calculated stationary prevalence, transitions probabilities and life expectancies at any age. Choice of age range is useful for extrapolation. In our data file, ages varies from age 70 to -102. It is possible to get extrapolated stationary -prevalence by age ranging from agemin to agemax.

    - - -

    Setting bage=50 (begin age) and fage=100 (final age), makes the program computing -life expectancy from age 'bage' to age 'fage'. As we use a model, we -can interessingly compute life expectancy on a wider age range than the age -range from the data. But the model can be rather wrong on much larger -intervals. Program is limited to around 120 for upper age!

    +102. It is possible to get extrapolated stationary prevalence by +age ranging from agemin to agemax. +
    Setting bage=50 (begin age) and fage=100 (final age), makes +the program computing life expectancy from age 'bage' to age +'fage'. As we use a model, we can interessingly compute life +expectancy on a wider age range than the age range from the data. +But the model can be rather wrong on much larger intervals. +Program is limited to around 120 for upper age!
    +ftol=1.000000e-008 stepm=24 ncovcol=2 nlstate=2 ndeath=1 maxwav=4 mle=1 weight=0
  • Total number of individuals= 2965, Agemin = 70.00, Agemax= 100.92
     
    @@ -1141,7 +1190,7 @@ edit the master file mypar.htm. <
             - Observed prevalence in each state: pmypar.txt 
    - Estimated parameters and the covariance matrix: rmypar.txt
    + href="..\mytry\rmypar.txt">rmypar.imach
    - Stationary prevalence in each state: plrmypar.txt
    - Transition probabilities: <
  • Graphs

    - -
    One-step transition - probabilities
    - -Convergence to the - stationary prevalence
    - -Observed and stationary - prevalence in state (1) with the confident interval
    - -Observed and stationary - prevalence in state (2) with the confident interval
    - -Health life - expectancies by age and initial health state (1)
    - -Health life - expectancies by age and initial health state (2)
    - -Total life expectancy by - age and health expectancies in states (1) and (2).
  • + -One-step transition probabilities
    + -Convergence to the stationary prevalence
    + -Observed and stationary prevalence in state (1) with the confident interval
    + -Observed and stationary prevalence in state (2) with the confident interval
    + -Health life expectancies by age and initial health state (1)
    + -Health life expectancies by age and initial health state (2)
    + -Total life expectancy by age and health expectancies in states (1) and (2).

    This software have been partly granted by mailto:brouard@ined.fr and mailto:lievre@ined.fr .

    -

    Latest version (0.71a of March 2002) can be accessed at http://euroreves.ined.fr/imach
    +

    Latest version (0.8 of March 2002) can be accessed at http://euroreves.ined.fr/imach