--- imach096d/doc/imach.htm 2001/03/14 08:24:41 1.2 +++ imach096d/doc/imach.htm 2002/03/06 18:56:09 1.6 @@ -28,8 +28,8 @@ src="euroreves2.gif" width="151" height= color="#00006A">INED and EUROREVES -
March -2000
+Version +0.7, February 2002
This is a comment. Comments start with a '#'.
@@ -365,6 +365,8 @@ Additional covariates can be included wi: This file contains all the maximisation results: -# Guess values of aij and bij in log (pij/pii) = aij + bij * age @@ -409,7 +410,7 @@ Each of the four lines starts with indicGuess values for computing variances
This is an output if mle=1. But it can be -used as an input to get the vairous output data files (Health +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).
@@ -440,7 +441,7 @@ consists in indices "ij" folloCovariance matrix of parameters
This is an output if mle=1. But it can be -used as an input to get the vairous output data files (Health +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).
@@ -475,14 +476,14 @@ covariances between aij and bij: -last -uncommented line
+Age range for calculation of stationary +prevalences and health expectancies
agemin=70 agemax=100 bage=50 fage=100Once we obtained the estimated parameters, the program is able to calculated stationary prevalence, transitions probabilities -and life expectancies at any age. Choice of age ranges is useful +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. Setting bage=50 and fage=100, makes the program computing life expectancy from age bage to age fage. As we use a model, we @@ -491,7 +492,7 @@ range from the data. But the model can b intervals.
Similarly, it is possible to get extrapolated stationary -prevalence by age raning from agemin to agemax.
+prevalence by age ranging from agemin to agemax.+
- agemin= Minimum age for calculation of the @@ -500,16 +501,87 @@ prevalence by age raning from agemin to stationary prevalence
- bage= Minimum age for calculation of the health expectancies
-- fage= Maximum ages for calculation of the health +
- fage= Maximum age for calculation of the health expectancies
Computing the observed prevalence
+ +begin-prev-date=1/1/1984 end-prev-date=1/6/1988+ +Statements 'begin-prev-date' and 'end-prev-date' allow to +select the period in which we calculate the observed prevalences +in each state. In this example, the prevalences are calculated on +data survey collected between 1 january 1984 and 1 june 1988.
+ ++
+ +- begin-prev-date= Starting date + (day/month/year)
+- end-prev-date= Final date + (day/month/year)
+Population- or status-based health +expectancies
+ +pop_based=0+ +The user has the possibility to choose between +population-based or status-based health expectancies. If +pop_based=0 then status-based health expectancies are computed +and if pop_based=1, the programme computes population-based +health expectancies. Health expectancies are weighted averages of +health expectancies respective of the initial state. For a +status-based index, the weights are the cross-sectional +prevalences observed between two dates, as previously +explained, whereas for a population-based index, the weights +are the stationary prevalences.
+ +Prevalence forecasting
+ +starting-proj-date=1/1/1989 final-proj-date=1/1/1992 mov_average=0+ +Prevalence and population projections are only available if +the interpolation unit is a month, i.e. stepm=1. The programme +estimates the prevalence in each state at a precise date +expressed in day/month/year. The programme computes one +forecasted prevalence a year from a starting date (1 january of +1989 in this example) to a final date (1 january 1992). The +statement mov_average allows to compute smoothed forecasted +prevalences with a five-age moving average centered at the +mid-age of the five-age period.
+ ++
+ +- starting-proj-date= starting date + (day/month/year) of forecasting
+- final-proj-date= final date + (day/month/year) of forecasting
+- mov_average= smoothing with a five-age + moving average centered at the mid-age of the five-age + period. The command mov_average takes + value 1 if the prevalences are smoothed and 0 otherwise.
+Last uncommented line : Population +forecasting
+ +popforecast=0 popfile=pyram.txt popfiledate=1/1/1989 last-popfiledate=1/1/1992+ +This command is available if the interpolation unit is a +month, i.e. stepm=1 and if popforecast=1. From a data file
+ +Structure of the data file pyram.txt +: age numbers
+ ++
Running Imach with this example
-We assume that you entered your 1st_example +
We assume that you entered your 1st_example parameter file as explained above. To run the program you should click on the imach.exe icon and enter the name of the parameter file which is for example
Once the optimization is finished, some graphics can be made with a grapher. We use Gnuplot which is an interactive plotting -program copyrighted but freely distributed. Imach outputs the -source of a gnuplot file, named 'graph.gp', which can be directly -input into gnuplot.
@@ -543,16 +614,8 @@ for plotting and output editing.
+program copyrighted but freely distributed. A gnuplot reference +manual is available here.
When the running is finished, the user should enter a caracter for plotting and output editing.@@ -578,9 +641,6 @@ The header of the file is 71 0.99681 625 627 71 0.00319 2 627 72 0.97125 1115 1148 72 0.02875 33 1148 -
- 'c' to start again the program from the beginning.
-- 'g' to made graphics. The output graphs are in GIF format - and you have no control over which is produced. If you - want to modify the graphics or make another one, you - should modify the parameters in the file graph.gp - located in imach\bin. A gnuplot reference manual is - available here. -
-- 'e' opens the index.htm file to edit the - output files and graphs.
+- 'e' opens the biaspar.htm + file to edit the output files and graphs.
- 'q' for exiting.
# Age Prev(1) N(1) N Age Prev(2) N(2) N - 70 0.95721 604 631 70 0.04279 27 631-It means that at age 70, the prevalence in state 1 is 1.000 and in state 2 is 0.00 . At age 71 the number of individuals in state 1 is 625 and in state 2 is 2, hence the total number of @@ -592,22 +652,26 @@ covariance matrix
Number of iterations=47 - -2 log likelihood=46553.005854373667 - Estimated parameters: a12 = -12.691743 b12 = 0.095819 - a13 = -7.815392 b13 = 0.031851 - a21 = -1.809895 b21 = -0.030470 - a23 = -7.838248 b23 = 0.039490 - Covariance matrix: Var(a12) = 1.03611e-001 - Var(b12) = 1.51173e-005 - Var(a13) = 1.08952e-001 - Var(b13) = 1.68520e-005 - Var(a21) = 4.82801e-001 - Var(b21) = 6.86392e-005 - Var(a23) = 2.27587e-001 - Var(b23) = 3.04465e-005 ++70 10.9226 3.0401 5.6488 6.2122 +71 10.4384 3.0461 5.2477 6.1599 +72 9.9667 3.0502 4.8663 6.1025 +73 9.5077 3.0524 4.5044 6.0401 --2 log likelihood= 21660.918613445392 + Estimated parameters: a12 = -12.290174 b12 = 0.092161 + a13 = -9.155590 b13 = 0.046627 + a21 = -2.629849 b21 = -0.022030 + a23 = -7.958519 b23 = 0.042614 + Covariance matrix: Var(a12) = 1.47453e-001 + Var(b12) = 2.18676e-005 + Var(a13) = 2.09715e-001 + Var(b13) = 3.28937e-005 + Var(a21) = 9.19832e-001 + Var(b21) = 1.29229e-004 + Var(a23) = 4.48405e-001 + Var(b23) = 5.85631e-005+By substitution of these parameters in the regression model, +we obtain the elementary transition probabilities:
+ + +- Transition probabilities: pijrbiaspar.txt
@@ -617,30 +681,33 @@ is a multiple of 2 years. The first colu the transition probabilities p11, p12, p13, p21, p22, p23. For example, line 5 of the file is: -100 106 0.03286 0.23512 0.73202 0.02330 0.19210 0.78460+100 106 0.02655 0.17622 0.79722 0.01809 0.13678 0.84513and this means:
-p11(100,106)=0.03286 -p12(100,106)=0.23512 -p13(100,106)=0.73202 -p21(100,106)=0.02330 -p22(100,106)=0.19210 -p22(100,106)=0.78460+p11(100,106)=0.02655 +p12(100,106)=0.17622 +p13(100,106)=0.79722 +p21(100,106)=0.01809 +p22(100,106)=0.13678 +p22(100,106)=0.84513- Stationary prevalence in each state: plrbiaspar.txt
-#Age 1-1 2-2 -70 0.92274 0.07726 -71 0.91420 0.08580 -72 0.90481 0.09519 -73 0.89453 0.10547+#Prevalence +#Age 1-1 2-2 + +#************ +70 0.90134 0.09866 +71 0.89177 0.10823 +72 0.88139 0.11861 +73 0.87015 0.12985-At age 70 the stationary prevalence is 0.92274 in state 1 and -0.07726 in state 2. This stationary prevalence differs from +
At age 70 the stationary prevalence is 0.90134 in state 1 and +0.09866 in state 2. This stationary prevalence differs from observed prevalence. Here is the point. The observed prevalence at age 70 results from the incidence of disability, incidence of recovery and mortality which occurred in the past of the cohort. @@ -664,24 +731,24 @@ design of the survey, and, for the stati model used and fitted. It is possible to compute the standard deviation of the stationary prevalence at each age.
-Observed and stationary +
+vbiaspar21.gif --Observed and stationary prevalence in state (2=disable) with the confident interval: -vbiaspar2.gif
- - - -
-This graph exhibits the stationary prevalence in state (2) with -the confidence interval in red. The green curve is the observed -prevalence (or proportion of individuals in state (2)). Without -discussing the results (it is not the purpose here), we observe -that the green curve is rather below the stationary prevalence. -It suggests an increase of the disability prevalence in the -future.Convergence to the -stationary prevalence of disability: pbiaspar1.gif
+
-This graph exhibits the stationary prevalence in state (2) +with the confidence interval in red. The green curve is the +observed prevalence (or proportion of individuals in state (2)). +Without discussing the results (it is not the purpose here), we +observe that the green curve is rather below the stationary +prevalence. It suggests an increase of the disability prevalence +in the future.
+ + + +-Convergence to the +stationary prevalence of disability: pbiaspar11.gif
+This graph plots the conditional transition probabilities from an initial state (1=healthy in red at the bottom, or 2=disable in @@ -703,23 +770,23 @@ href="erbiaspar.txt">erbiaspar.txt# Health expectancies # Age 1-1 1-2 2-1 2-2 -70 10.7297 2.7809 6.3440 5.9813 -71 10.3078 2.8233 5.9295 5.9959 -72 9.8927 2.8643 5.5305 6.0033 -73 9.4848 2.9036 5.1474 6.0035
For example 70 10.7297 2.7809 6.3440 5.9813 means: -e11=10.7297 e12=2.7809 e21=6.3440 e22=5.9813+
For example 70 10.9226 3.0401 5.6488 6.2122 means: +e11=10.9226 e12=3.0401 e21=5.6488 e22=6.2122- +
For example, life expectancy of a healthy individual at age 70 -is 10.73 in the healthy state and 2.78 in the disability state -(=13.51 years). If he was disable at age 70, his life expectancy -will be shorter, 6.34 in the healthy state and 5.98 in the -disability state (=12.32 years). The total life expectancy is a -weighted mean of both, 13.51 and 12.32; weight is the proportion +is 10.92 in the healthy state and 3.04 in the disability state +(=13.96 years). If he was disable at age 70, his life expectancy +will be shorter, 5.64 in the healthy state and 6.21 in the +disability state (=11.85 years). The total life expectancy is a +weighted mean of both, 13.96 and 11.85; weight is the proportion of people disabled at age 70. In order to get a pure period index (i.e. based only on incidences) we use the computed or @@ -736,7 +803,7 @@ href="vrbiaspar.txt">vrbiaspar.txtFor example, the covariances of life expectancies Cov(ei,ej) at age 50 are (line 3)
-Cov(e1,e1)=0.4667 Cov(e1,e2)=0.0605=Cov(e2,e1) Cov(e2,e2)=0.0183+
Cov(e1,e1)=0.4776 Cov(e1,e2)=0.0488=Cov(e2,e1) Cov(e2,e2)=0.0424
This figure represents the health expectancies and the total life expectancy with the confident interval in dashed curve.
-+
Standard deviations (obtained from the information matrix of the model) of these quantities are very useful. @@ -826,9 +893,7 @@ estimated by month on 8,000 people may t Also, the program is not yet a statistical package, which permits a simple writing of the variables and the model to take into account in the maximisation. The actual program allows only to -add simple variables without covariations, like age+sex but -without age+sex+ age*sex . This can be done from the source code -(you have to change three lines in the source code) but will +add simple variables like age+sex or age+sex+ age*sex but will never be general enough. But what is to remember, is that incidences or probability of change from one state to another is affected by the variables specified into the model.
@@ -853,27 +918,54 @@ file: - Prevalence forecasting: +frbiaspar.txt + +On a d'abord estimé la date moyenne des interviaew. ie +13/9/1995. This file contains
+ +Example, at date 1/1/1989 :
+ +73 0.807 0.078 0.115
+ +This means that at age 73, the probability for a person age 70 +at 13/9/1989 to be in state 1 is 0.807, in state 2 is 0.078 and +to die is 0.115 at 1/1/1989.
+ +# Age P.1 P.2 P.3 [Population] +# Forecasting at date 1/1/1989 +75 572685.22 83798.08 +74 621296.51 79767.99 +73 645857.70 69320.60+ +
# Forecasting at date 1/1/19909 +76 442986.68 92721.14 120775.48 +75 487781.02 91367.97 121915.51 +74 512892.07 85003.47 117282.76+
Since you know how to run the program, it is time to test it on your own computer. Try for example on a parameter file named imachpar.txt which is a -copy of mypar.txt -included in the subdirectory of imach, mytry. Edit it to change the name of -the data file to ..\data\mydata.txt -if you don't want to copy it on the same directory. The file mydata.txt is a smaller file of 3,000 -people but still with 4 waves.
+href="..\mytry\imachpar.txt">imachpar.txt which is a copy of mypar.txt included in the +subdirectory of imach, mytry. +Edit it to change the name of the data file to ..\data\mydata.txt if you don't want to +copy it on the same directory. The file mydata.txt +is a smaller file of 3,000 people but still with 4 waves.Click on the imach.exe icon to open a window. Answer to the question:'Enter the parameter file name:'
IMACH, Version 0.63 Enter
+ Enter
the parameter file name: ..\mytry\imachpar.txt |
Type g for plotting (available
- if mle=1), e to edit output files, c to start again, and - q for exiting: - |
+ Type e to edit output files, c + to start again, and q for exiting: |
First you should enter g to -make the figures and then you can edit all the results by typing e. -
+First you should enter e to +edit the master file mypar.htm.
Latest version (0.63 of 16 march 2000) can be accessed at Latest version (0.7 of February 2002) can be accessed at http://euroreves.ined.fr/imach