]> henry.ined.fr Git - .git/commitdiff
Documentation corrected by Carol
authorAgnès Lièvre <agnes.lievre@education.gouv.fr>
Fri, 10 Jun 2005 08:54:06 +0000 (08:54 +0000)
committerAgnès Lièvre <agnes.lievre@education.gouv.fr>
Fri, 10 Jun 2005 08:54:06 +0000 (08:54 +0000)
html/doc/imach.htm

index 71dfce306713e19396c7f5b3f617da807eef337d..2b226787c2130a02716ecc9fd29c9d26d39d4b2b 100644 (file)
-<!-- $Id$ --!>\r
-<html>\r
-\r
-<head>\r
-<meta http-equiv="Content-Type"\r
-content="text/html; charset=iso-8859-1">\r
-<title>Computing Health Expectancies using IMaCh</title>\r
-<html>\r
-\r
-<head>\r
-<meta http-equiv="Content-Type"\r
-content="text/html; charset=iso-8859-1">\r
-<title>IMaCh</title>\r
-</head>\r
-\r
-<body bgcolor="#FFFFFF">\r
-\r
-<hr size="3" color="#EC5E5E">\r
-\r
-<h1 align="center"><font color="#00006A">Computing Health\r
-Expectancies using IMaCh</font></h1>\r
-\r
-<h1 align="center"><font color="#00006A" size="5">(a Maximum\r
-Likelihood Computer Program using Interpolation of Markov Chains)</font></h1>\r
-\r
-<p align="center">&nbsp;</p>\r
-\r
-<p align="center"><a href="http://www.ined.fr/"><img\r
-src="logo-ined.gif" border="0" width="151" height="76"></a><img\r
-src="euroreves2.gif" width="151" height="75"></p>\r
-\r
-<h3 align="center"><a href="http://www.ined.fr/"><font\r
-color="#00006A">INED</font></a><font color="#00006A"> and </font><a\r
-href="http://euroreves.ined.fr"><font color="#00006A">EUROREVES</font></a></h3>\r
-\r
-<p align="center"><font color="#00006A" size="4"><strong>Version\r
-0.97, June 2004</strong></font></p>\r
-\r
-<hr size="3" color="#EC5E5E">\r
-\r
-<p align="center"><font color="#00006A"><strong>Authors of the\r
-program: </strong></font><a href="http://sauvy.ined.fr/brouard"><font\r
-color="#00006A"><strong>Nicolas Brouard</strong></font></a><font\r
-color="#00006A"><strong>, senior researcher at the </strong></font><a\r
-href="http://www.ined.fr"><font color="#00006A"><strong>Institut\r
-National d'Etudes Démographiques</strong></font></a><font\r
-color="#00006A"><strong> (INED, Paris) in the &quot;Mortality,\r
-Health and Epidemiology&quot; Research Unit </strong></font></p>\r
-\r
-<p align="center"><font color="#00006A"><strong>and Agnès\r
-Lièvre<br clear="left">\r
-</strong></font></p>\r
-\r
-<h4><font color="#00006A">Contribution to the mathematics: C. R.\r
-Heathcote </font><font color="#00006A" size="2">(Australian\r
-National University, Canberra).</font></h4>\r
-\r
-<h4><font color="#00006A">Contact: Agnès Lièvre (</font><a\r
-href="mailto:lievre@ined.fr"><font color="#00006A"><i>lievre@ined.fr</i></font></a><font\r
-color="#00006A">) </font></h4>\r
-\r
-<hr>\r
-\r
-<ul>\r
-    <li><a href="#intro">Introduction</a> </li>\r
-    <li><a href="#data">On what kind of data can it be used?</a></li>\r
-    <li><a href="#datafile">The data file</a> </li>\r
-    <li><a href="#biaspar">The parameter file</a> </li>\r
-    <li><a href="#running">Running Imach</a> </li>\r
-    <li><a href="#output">Output files and graphs</a> </li>\r
-    <li><a href="#example">Exemple</a> </li>\r
-</ul>\r
-\r
-<hr>\r
-\r
-<h2><a name="intro"><font color="#00006A">Introduction</font></a></h2>\r
-\r
-<p>This program computes <b>Healthy Life Expectancies</b> from <b>cross-longitudinal\r
-data</b> using the methodology pioneered by Laditka and Wolf (1).\r
-Within the family of Health Expectancies (HE), Disability-free\r
-life expectancy (DFLE) is probably the most important index to\r
-monitor. In low mortality countries, there is a fear that when\r
-mortality declines, the increase in DFLE is not proportionate to\r
-the increase in total Life expectancy. This case is called the <em>Expansion\r
-of morbidity</em>. Most of the data collected today, in\r
-particular by the international <a href="http://www.reves.org">REVES</a>\r
-network on Health expectancy, and most HE indices based on these\r
-data, are <em>cross-sectional</em>. It means that the information\r
-collected comes from a single cross-sectional survey: people from\r
-various ages (but mostly old people) are surveyed on their health\r
-status at a single date. Proportion of people disabled at each\r
-age, can then be measured at that date. This age-specific\r
-prevalence curve is then used to distinguish, within the\r
-stationary population (which, by definition, is the life table\r
-estimated from the vital statistics on mortality at the same\r
-date), the disable population from the disability-free\r
-population. Life expectancy (LE) (or total population divided by\r
-the yearly number of births or deaths of this stationary\r
-population) is then decomposed into DFLE and DLE. This method of\r
-computing HE is usually called the Sullivan method (from the name\r
-of the author who first described it).</p>\r
-\r
-<p>Age-specific proportions of people disabled (prevalence of\r
-disability) are dependent on the historical flows from entering\r
-disability and recovering in the past until today. The age-specific\r
-forces (or incidence rates), estimated over a recent period of time\r
-(like for period forces of mortality), of entering disability or\r
-recovering a good health, are reflecting current conditions and\r
-therefore can be used at each age to forecast the future of this\r
-cohort<em>if nothing changes in the future</em>, i.e to forecast the\r
-prevalence of disability of each cohort. Our finding (2) is that the period\r
-prevalence of disability (computed from period incidences) is lower\r
-than the cross-sectional prevalence. For example if a country is\r
-improving its technology of prosthesis, the incidence of recovering\r
-the ability to walk will be higher at each (old) age, but the\r
-prevalence of disability will only slightly reflect an improve because\r
-the prevalence is mostly affected by the history of the cohort and not\r
-by recent period effects. To measure the period improvement we have to\r
-simulate the future of a cohort of new-borns entering or leaving at\r
-each age the disability state or dying according to the incidence\r
-rates measured today on different cohorts. The proportion of people\r
-disabled at each age in this simulated cohort will be much lower that\r
-the proportions observed at each age in a cross-sectional survey. This\r
-new prevalence curve introduced in a life table will give a more\r
-realistic HE level than the Sullivan method which mostly measured the\r
-History of health conditions in this country.</p>\r
-\r
-<p>Therefore, the main question is how to measure incidence rates\r
-from cross-longitudinal surveys? This is the goal of the IMaCH\r
-program. From your data and using IMaCH you can estimate period\r
-HE and not only Sullivan's HE. Also the standard errors of the HE\r
-are computed.</p>\r
-\r
-<p>A cross-longitudinal survey consists in a first survey\r
-(&quot;cross&quot;) where individuals from different ages are\r
-interviewed on their health status or degree of disability. At\r
-least a second wave of interviews (&quot;longitudinal&quot;)\r
-should measure each new individual health status. Health\r
-expectancies are computed from the transitions observed between\r
-waves and are computed for each degree of severity of disability\r
-(number of life states). More degrees you consider, more time is\r
-necessary to reach the Maximum Likelihood of the parameters\r
-involved in the model. Considering only two states of disability\r
-(disable and healthy) is generally enough but the computer\r
-program works also with more health statuses.<br>\r
-<br>\r
-The simplest model is the multinomial logistic model where <i>pij</i>\r
-is the probability to be observed in state <i>j</i> at the second\r
-wave conditional to be observed in state <em>i</em> at the first\r
-wave. Therefore a simple model is: log<em>(pij/pii)= aij +\r
-bij*age+ cij*sex,</em> where '<i>age</i>' is age and '<i>sex</i>'\r
-is a covariate. The advantage that this computer program claims,\r
-comes from that if the delay between waves is not identical for\r
-each individual, or if some individual missed an interview, the\r
-information is not rounded or lost, but taken into account using\r
-an interpolation or extrapolation. <i>hPijx</i> is the\r
-probability to be observed in state <i>i</i> at age <i>x+h</i>\r
-conditional to the observed state <i>i</i> at age <i>x</i>. The\r
-delay '<i>h</i>' can be split into an exact number (<i>nh*stepm</i>)\r
-of unobserved intermediate states. This elementary transition (by\r
-month or quarter trimester, semester or year) is modeled as a\r
-multinomial logistic. The <i>hPx</i> matrix is simply the matrix\r
-product of <i>nh*stepm</i> elementary matrices and the\r
-contribution of each individual to the likelihood is simply <i>hPijx</i>.\r
-<br>\r
-</p>\r
-\r
-<p>The program presented in this manual is a quite general\r
-program named <strong>IMaCh</strong> (for <strong>I</strong>nterpolated\r
-<strong>MA</strong>rkov <strong>CH</strong>ain), designed to\r
-analyse transition data from longitudinal surveys. The first step\r
-is the parameters estimation of a transition probabilities model\r
-between an initial status and a final status. From there, the\r
-computer program produces some indicators such as observed and\r
-stationary prevalence, life expectancies and their variances and\r
-graphs. Our transition model consists in absorbing and\r
-non-absorbing states with the possibility of return across the\r
-non-absorbing states. The main advantage of this package,\r
-compared to other programs for the analysis of transition data\r
-(For example: Proc Catmod of SAS<sup>®</sup>) is that the whole\r
-individual information is used even if an interview is missing, a\r
-status or a date is unknown or when the delay between waves is\r
-not identical for each individual. The program can be executed\r
-according to parameters: selection of a sub-sample, number of\r
-absorbing and non-absorbing states, number of waves taken in\r
-account (the user inputs the first and the last interview), a\r
-tolerance level for the maximization function, the periodicity of\r
-the transitions (we can compute annual, quarterly or monthly\r
-transitions), covariates in the model. It works on Windows or on\r
-Unix.<br>\r
-</p>\r
-\r
-<hr>\r
-\r
-<p>(1) Laditka, Sarah B. and Wolf, Douglas A. (1998), &quot;New\r
-Methods for Analyzing Active Life Expectancy&quot;. <i>Journal of\r
-Aging and Health</i>. Vol 10, No. 2. </p>\r
-<p>(2) <a href=http://taylorandfrancis.metapress.com/app/home/contribution.asp?wasp=1f99bwtvmk5yrb7hlhw3&referrer=parent&backto=issue,1,2;journal,2,5;linkingpublicationresults,1:300265,1\r
->Lièvre A., Brouard N. and Heathcote Ch. (2003) Estimating Health Expectancies \r
-from Cross-longitudinal surveys. <em>Mathematical Population Studies</em>.- 10(4), pp. 211-248</a>\r
-\r
-<hr>\r
-\r
-<h2><a name="data"><font color="#00006A">On what kind of data can\r
-it be used?</font></a></h2>\r
-\r
-<p>The minimum data required for a transition model is the\r
-recording of a set of individuals interviewed at a first date and\r
-interviewed again at least one another time. From the\r
-observations of an individual, we obtain a follow-up over time of\r
-the occurrence of a specific event. In this documentation, the\r
-event is related to health status at older ages, but the program\r
-can be applied on a lot of longitudinal studies in different\r
-contexts. To build the data file explained into the next section,\r
-you must have the month and year of each interview and the\r
-corresponding health status. But in order to get age, date of\r
-birth (month and year) is required (missing values is allowed for\r
-month). Date of death (month and year) is an important\r
-information also required if the individual is dead. Shorter\r
-steps (i.e. a month) will more closely take into account the\r
-survival time after the last interview.</p>\r
-\r
-<hr>\r
-\r
-<h2><a name="datafile"><font color="#00006A">The data file</font></a></h2>\r
-\r
-<p>In this example, 8,000 people have been interviewed in a\r
-cross-longitudinal survey of 4 waves (1984, 1986, 1988, 1990).  Some\r
-people missed 1, 2 or 3 interviews. Health statuses are healthy (1)\r
-and disable (2). The survey is not a real one. It is a simulation of\r
-the American Longitudinal Survey on Aging. The disability state is\r
-defined if the individual missed one of four ADL (Activity of daily\r
-living, like bathing, eating, walking).  Therefore, even if the\r
-individuals interviewed in the sample are virtual, the information\r
-brought with this sample is close to the situation of the United\r
-States. Sex is not recorded is this sample. The LSOA survey is biased\r
-in the sense that people living in an institution were not surveyed at\r
-first pass in 1984. Thus the prevalence of disability in 1984 is\r
-biased downwards at old ages. But when people left their household to\r
-an institution, they have been surveyed in their institution in 1986,\r
-1988 or 1990. Thus incidences are not biased. But cross-sectional\r
-prevalences of disability at old ages are thus artificially increasing\r
-in 1986, 1988 and 1990 because of a higher weight of people\r
-institutionalized in the sample. Our article shows the\r
-opposite: the period prevalence is lower at old ages than the\r
-adjusted cross-sectional prevalence proving important current progress\r
-against disability.</p>\r
-\r
-<p>Each line of the data set (named <a href="data1.txt">data1.txt</a>\r
-in this first example) is an individual record. Fields are separated\r
-by blanks: </p>\r
-\r
-<ul>\r
-    <li><b>Index number</b>: positive number (field 1) </li>\r
-    <li><b>First covariate</b> positive number (field 2) </li>\r
-    <li><b>Second covariate</b> positive number (field 3) </li>\r
-    <li><a name="Weight"><b>Weight</b></a>: positive number\r
-        (field 4) . In most surveys individuals are weighted\r
-        according to the stratification of the sample.</li>\r
-    <li><b>Date of birth</b>: coded as mm/yyyy. Missing dates are\r
-        coded as 99/9999 (field 5) </li>\r
-    <li><b>Date of death</b>: coded as mm/yyyy. Missing dates are\r
-        coded as 99/9999 (field 6) </li>\r
-    <li><b>Date of first interview</b>: coded as mm/yyyy. Missing\r
-        dates are coded as 99/9999 (field 7) </li>\r
-    <li><b>Status at first interview</b>: positive number.\r
-        Missing values ar coded -1. (field 8) </li>\r
-    <li><b>Date of second interview</b>: coded as mm/yyyy.\r
-        Missing dates are coded as 99/9999 (field 9) </li>\r
-    <li><strong>Status at second interview</strong> positive\r
-        number. Missing values ar coded -1. (field 10) </li>\r
-    <li><b>Date of third interview</b>: coded as mm/yyyy. Missing\r
-        dates are coded as 99/9999 (field 11) </li>\r
-    <li><strong>Status at third interview</strong> positive\r
-        number. Missing values ar coded -1. (field 12) </li>\r
-    <li><b>Date of fourth interview</b>: coded as mm/yyyy.\r
-        Missing dates are coded as 99/9999 (field 13) </li>\r
-    <li><strong>Status at fourth interview</strong> positive\r
-        number. Missing values are coded -1. (field 14) </li>\r
-    <li>etc</li>\r
-</ul>\r
-\r
-<p>&nbsp;</p>\r
-\r
-<p>If your longitudinal survey does not include information about\r
-weights or covariates, you must fill the column with a number\r
-(e.g. 1) because a missing field is not allowed.</p>\r
-\r
-<hr>\r
-\r
-<h2><font color="#00006A">Your first example parameter file</font><a\r
-href="http://euroreves.ined.fr/imach"></a><a name="uio"></a></h2>\r
-\r
-<h2><a name="biaspar"></a>#Imach version 0.97b, June 2004,\r
-INED-EUROREVES </h2>\r
-\r
-<p>This first line was a comment. Comments line start with a '#'.</p>\r
-\r
-<h4><font color="#FF0000">First uncommented line</font></h4>\r
-\r
-<pre>title=1st_example datafile=data1.txt lastobs=8600 firstpass=1 lastpass=4</pre>\r
-\r
-<ul>\r
-    <li><b>title=</b> 1st_example is title of the run. </li>\r
-    <li><b>datafile=</b> data1.txt is the name of the data set.\r
-        Our example is a six years follow-up survey. It consists\r
-        in a baseline followed by 3 reinterviews. </li>\r
-    <li><b>lastobs=</b> 8600 the program is able to run on a\r
-        subsample where the last observation number is lastobs.\r
-        It can be set a bigger number than the real number of\r
-        observations (e.g. 100000). In this example, maximisation\r
-        will be done on the 8600 first records. </li>\r
-    <li><b>firstpass=1</b> , <b>lastpass=4 </b>In case of more\r
-        than two interviews in the survey, the program can be run\r
-        on selected transitions periods. firstpass=1 means the\r
-        first interview included in the calculation is the\r
-        baseline survey. lastpass=4 means that the information\r
-        brought by the 4th interview is taken into account.</li>\r
-</ul>\r
-\r
-<p>&nbsp;</p>\r
-\r
-<h4><a name="biaspar-2"><font color="#FF0000">Second uncommented\r
-line</font></a></h4>\r
-\r
-<pre>ftol=1.e-08 stepm=1 ncovcol=2 nlstate=2 ndeath=1 maxwav=4 mle=1 weight=0</pre>\r
-\r
-<ul>\r
-    <li><b>ftol=1e-8</b> Convergence tolerance on the function\r
-        value in the maximisation of the likelihood. Choosing a\r
-        correct value for ftol is difficult. 1e-8 is a correct\r
-        value for a 32 bits computer.</li>\r
-    <li><b>stepm=1</b> Time unit in months for interpolation.\r
-        Examples:<ul>\r
-            <li>If stepm=1, the unit is a month </li>\r
-            <li>If stepm=4, the unit is a trimester</li>\r
-            <li>If stepm=12, the unit is a year </li>\r
-            <li>If stepm=24, the unit is two years</li>\r
-            <li>... </li>\r
-        </ul>\r
-    </li>\r
-    <li><b>ncovcol=2</b> Number of covariate columns included in the\r
-        datafile before the column of the date of birth. You can have\r
-covariates that won't necessary be used during the\r
-        run. It is not the number of covariates that will be\r
-        specified by the model. The 'model' syntax describes the\r
-        covariates to be taken into account during the run. </li>\r
-    <li><b>nlstate=2</b> Number of non-absorbing (alive) states.\r
-        Here we have two alive states: disability-free is coded 1\r
-        and disability is coded 2. </li>\r
-    <li><b>ndeath=1</b> Number of absorbing states. The absorbing\r
-        state death is coded 3. </li>\r
-    <li><b>maxwav=4</b> Number of waves in the datafile.</li>\r
-    <li><a name="mle"><b>mle</b></a><b>=1</b> Option for the\r
-        Maximisation Likelihood Estimation. <ul>\r
-            <li>If mle=1 the program does the maximisation and\r
-                the calculation of health expectancies </li>\r
-            <li>If mle=0 the program only does the calculation of\r
-                the health expectancies and other indices and graphs\r
-but without the maximization.. </li>\r
-               There also other possible values:\r
-          <ul>\r
-            <li>If mle=-1 you get a template which can be useful if\r
-your model is complex with many covariates.</li>\r
-            <li> If mle=-3 IMaCh computes the mortality but without\r
-            any health status (May 2004)</li> <li>If mle=2 IMach\r
-            likelihood corresponds to a linear interpolation</li> <li>\r
-            If mle=3 IMach likelihood corresponds to an exponential\r
-            inter-extrapolation</li> \r
-            <li> If mle=4 IMach likelihood\r
-            corresponds to no inter-extrapolation, and thus biasing\r
-            the results. </li> \r
-            <li> If mle=5 IMach likelihood\r
-            corresponds to no inter-extrapolation, and before the\r
-            correction of the Jackson's bug (avoid this).</li>\r
-            </ul>\r
-        </ul>\r
-    </li>\r
-    <li><b>weight=0</b> Possibility to add weights. <ul>\r
-            <li>If weight=0 no weights are included </li>\r
-            <li>If weight=1 the maximisation integrates the\r
-                weights which are in field <a href="#Weight">4</a></li>\r
-        </ul>\r
-    </li>\r
-</ul>\r
-\r
-<h4><font color="#FF0000">Covariates</font></h4>\r
-\r
-<p>Intercept and age are systematically included in the model.\r
-Additional covariates can be included with the command: </p>\r
-\r
-<pre>model=<em>list of covariates</em></pre>\r
-\r
-<ul>\r
-    <li>if<strong> model=. </strong>then no covariates are\r
-        included</li>\r
-    <li>if <strong>model=V1</strong> the model includes the first\r
-        covariate (field 2)</li>\r
-    <li>if <strong>model=V2 </strong>the model includes the\r
-        second covariate (field 3)</li>\r
-    <li>if <strong>model=V1+V2 </strong>the model includes the\r
-        first and the second covariate (fields 2 and 3)</li>\r
-    <li>if <strong>model=V1*V2 </strong>the model includes the\r
-        product of the first and the second covariate (fields 2\r
-        and 3)</li>\r
-    <li>if <strong>model=V1+V1*age</strong> the model includes\r
-        the product covariate*age</li>\r
-</ul>\r
-\r
-<p>In this example, we have two covariates in the data file\r
-(fields 2 and 3). The number of covariates included in the data\r
-file between the id and the date of birth is ncovcol=2 (it was\r
-named ncov in version prior to 0.8). If you have 3 covariates in\r
-the datafile (fields 2, 3 and 4), you will set ncovcol=3. Then\r
-you can run the programme with a new parametrisation taking into\r
-account the third covariate. For example, <strong>model=V1+V3 </strong>estimates\r
-a model with the first and third covariates. More complicated\r
-models can be used, but it will takes more time to converge. With\r
-a simple model (no covariates), the programme estimates 8\r
-parameters. Adding covariates increases the number of parameters\r
-: 12 for <strong>model=V1, </strong>16 for <strong>model=V1+V1*age\r
-</strong>and 20 for <strong>model=V1+V2+V3.</strong></p>\r
-\r
-<h4><font color="#FF0000">Guess values for optimization</font><font\r
-color="#00006A"> </font></h4>\r
-\r
-<p>You must write the initial guess values of the parameters for\r
-optimization. The number of parameters, <em>N</em> depends on the\r
-number of absorbing states and non-absorbing states and on the\r
-number of covariates. <br>\r
-<em>N</em> is given by the formula <em>N</em>=(<em>nlstate</em> +\r
-<em>ndeath</em>-1)*<em>nlstate</em>*<em>ncovmodel</em>&nbsp;. <br>\r
-<br>\r
-Thus in the simple case with 2 covariates (the model is log\r
-(pij/pii) = aij + bij * age where intercept and age are the two\r
-covariates), and 2 health degrees (1 for disability-free and 2\r
-for disability) and 1 absorbing state (3), you must enter 8\r
-initials values, a12, b12, a13, b13, a21, b21, a23, b23. You can\r
-start with zeros as in this example, but if you have a more\r
-precise set (for example from an earlier run) you can enter it\r
-and it will speed up them<br>\r
-Each of the four lines starts with indices &quot;ij&quot;: <b>ij\r
-aij bij</b> </p>\r
-\r
-<blockquote>\r
-    <pre># Guess values of aij and bij in log (pij/pii) = aij + bij * age\r
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">\r
+<!-- saved from url=(0044)http://euroreves.ined.fr/imach/doc/imach.htm -->\r
+<!-- $Id$ --!><HTML><HEAD><TITLE>Computing Health Expectancies using IMaCh</TITLE>\r
+<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>\r
+<META content="MSHTML 5.00.3315.2870" name=GENERATOR></HEAD>\r
+<BODY bgColor=#ffffff>\r
+<HR color=#ec5e5e SIZE=3> \r
+\r
+<H1 align=center><FONT color=#00006a>Computing Health Expectancies using \r
+IMaCh</FONT></H1>\r
+<H1 align=center><FONT color=#00006a size=5>(a Maximum Likelihood Computer \r
+Program using Interpolation of Markov Chains)</FONT></H1>\r
+<P align=center>&nbsp;</P>\r
+<P align=center><A href="http://www.ined.fr/"><IMG border=0 height=76 \r
+src="Computing Health Expectancies using IMaCh_fichiers/logo-ined.gif" \r
+width=151></A><IMG height=75 \r
+src="Computing Health Expectancies using IMaCh_fichiers/euroreves2.gif" \r
+width=151></P>\r
+<H3 align=center><A href="http://www.ined.fr/"><FONT \r
+color=#00006a>INED</FONT></A><FONT color=#00006a> and </FONT><A \r
+href="http://euroreves.ined.fr/"><FONT color=#00006a>EUROREVES</FONT></A></H3>\r
+<P align=center><FONT color=#00006a size=4><STRONG>Version 0.97, June \r
+2004</STRONG></FONT></P>\r
+<HR color=#ec5e5e SIZE=3>\r
+\r
+<P align=center><FONT color=#00006a><STRONG>Authors of the program: \r
+</STRONG></FONT><A href="http://sauvy.ined.fr/brouard"><FONT \r
+color=#00006a><STRONG>Nicolas Brouard</STRONG></FONT></A><FONT \r
+color=#00006a><STRONG>, senior researcher at the </STRONG></FONT><A \r
+href="http://www.ined.fr/"><FONT color=#00006a><STRONG>Institut National \r
+d'Etudes Démographiques</STRONG></FONT></A><FONT color=#00006a><STRONG> (INED, \r
+Paris) in the "Mortality, Health and Epidemiology" Research Unit \r
+</STRONG></FONT></P>\r
+<P align=center><FONT color=#00006a><STRONG>and Agnès Lièvre<BR \r
+clear=left></STRONG></FONT></P>\r
+<H4><FONT color=#00006a>Contribution to the mathematics: C. R. Heathcote \r
+</FONT><FONT color=#00006a size=2>(Australian National University, \r
+Canberra).</FONT></H4>\r
+<H4><FONT color=#00006a>Contact: Agnès Lièvre (</FONT><A \r
+href="mailto:lievre@ined.fr"><FONT \r
+color=#00006a><I>lievre@ined.fr</I></FONT></A><FONT color=#00006a>) </FONT></H4>\r
+<HR>\r
+\r
+<UL>\r
+  <LI><A \r
+  href="http://euroreves.ined.fr/imach/doc/imach.htm#intro">Introduction</A> \r
+  <LI><A href="http://euroreves.ined.fr/imach/doc/imach.htm#data">On what kind \r
+  of data can it be used?</A> \r
+  <LI><A href="http://euroreves.ined.fr/imach/doc/imach.htm#datafile">The data \r
+  file</A> \r
+  <LI><A href="http://euroreves.ined.fr/imach/doc/imach.htm#biaspar">The \r
+  parameter file</A> \r
+  <LI><A href="http://euroreves.ined.fr/imach/doc/imach.htm#running">Running \r
+  Imach</A> \r
+  <LI><A href="http://euroreves.ined.fr/imach/doc/imach.htm#output">Output files \r
+  and graphs</A> \r
+  <LI><A href="http://euroreves.ined.fr/imach/doc/imach.htm#example">Exemple</A> \r
+  </LI></UL>\r
+<HR>\r
+\r
+<H2><A name=intro><FONT color=#00006a>Introduction</FONT></A></H2>\r
+<P>This program computes <B>Healthy Life Expectancies</B> from \r
+<B>cross-longitudinal data</B> using the methodology pioneered by Laditka and \r
+Wolf (1). Within the family of Health Expectancies (HE), disability-free life \r
+expectancy (DFLE) is probably the most important index to monitor. In low \r
+mortality countries, there is a fear that when mortality declines (and therefore total life expectancy improves), the increase will not be as great, leading to an <EM>Expansion of morbidity</EM>. Most of the data collected today, \r
+in particular by the international <A href="http://www.reves.org/">REVES</A> \r
+network on Health Expectancy and the disability process, and most HE indices based on these data, are \r
+<EM>cross-sectional</EM>. This means that the information collected comes from a \r
+single cross-sectional survey: people from a variety of ages (but often old people) \r
+are surveyed on their health status at a single date. The proportion of people \r
+disabled at each age can then be estimated at that date. This age-specific \r
+prevalence curve is used to distinguish, within the stationary population \r
+(which, by definition, is the life table estimated from the vital statistics on \r
+mortality at the same date), the disabled population from the disability-free \r
+population. Life expectancy (LE) (or total population divided by the yearly \r
+number of births or deaths of this stationary population) is then decomposed \r
+into disability-free life expectancy (DFLE) and disability life \r
+expectancy (DLE). This method of computing HE is usually called the Sullivan \r
+method (after the author who first described it).</P>\r
+<P>The age-specific proportions of people disabled (prevalence of disability) are \r
+dependent upon the historical flows from entering disability and recovering in the past. The age-specific forces (or incidence rates) of entering \r
+disability or recovering a good health, estimated over a recent period of time (as period forces of mortality), are reflecting current conditions and \r
+therefore can be used at each age to forecast the future of this cohort <EM>if \r
+nothing changes in the future</EM>, i.e to forecast the prevalence of disability of each cohort. Our finding (2) is that the period prevalence of disability \r
+(computed from period incidences) is lower than the cross-sectional prevalence. \r
+For example if a country is improving its technology of prosthesis, the \r
+incidence of recovering the ability to walk will be higher at each (old) age, \r
+but the prevalence of disability will only slightly reflect an improvement because \r
+the prevalence is mostly affected by the history of the cohort and not by recent \r
+period effects. To measure the period improvement we have to simulate the future \r
+of a cohort of new-borns entering or leaving the disability state or \r
+dying at each age according to the incidence rates measured today on different cohorts. The \r
+proportion of people disabled at each age in this simulated cohort will be much \r
+lower that the proportions observed at each age in a cross-sectional survey. \r
+This new prevalence curve introduced in a life table will give a more realistic \r
+HE level than the Sullivan method which mostly reflects the history of health \r
+conditions in a country.</P>\r
+<P>Therefore, the main question is how can we measure incidence rates from \r
+cross-longitudinal surveys? This is the goal of the IMaCH program. From your \r
+data and using IMaCH you can estimate period HE as well as the Sullivan HE. In addition the standard errors of the HE are computed.</P>\r
+<P>A cross-longitudinal survey consists of a first survey ("cross") where \r
+individuals of different ages are interviewed about their health status or degree \r
+of disability. At least a second wave of interviews ("longitudinal") should \r
+measure each individual new health status. Health expectancies are computed from \r
+the transitions observed between waves (interviews) and are computed for each degree of \r
+severity of disability (number of health states). The more degrees of severity considered, the more \r
+time is necessary to reach the Maximum Likelihood of the parameters involved in \r
+the model. Considering only two states of disability (disabled and healthy) is \r
+generally enough but the computer program works also with more health \r
+states.<BR><BR>The simplest model for the transition probabilities is the multinomial logistic model where \r
+<I>pij</I> is the probability to be observed in state <I>j</I> at the second \r
+wave conditional to be observed in state <EM>i</EM> at the first wave. Therefore \r
+a simple model is: log<EM>(pij/pii)= aij + bij*age+ cij*sex,</EM> where \r
+'<I>age</I>' is age and '<I>sex</I>' is a covariate. The advantage that this \r
+computer program claims, is that if the delay between waves is not \r
+identical for each individual, or if some individual missed an interview, the \r
+information is not rounded or lost, but taken into account using an \r
+interpolation or extrapolation. <I>hPijx</I> is the probability to be observed \r
+in state <I>i</I> at age <I>x+h</I> conditional on the observed state <I>i</I> \r
+at age <I>x</I>. The delay '<I>h</I>' can be split into an exact number \r
+(<I>nh*stepm</I>) of unobserved intermediate states. This elementary transition \r
+(by month or quarter, trimester, semester or year) is modeled as the above multinomial \r
+logistic. The <I>hPx</I> matrix is simply the matrix product of <I>nh*stepm</I> \r
+elementary matrices and the contribution of each individual to the likelihood is \r
+simply <I>hPijx</I>. <BR></P>\r
+<P>The program presented in this manual is a general program named \r
+<STRONG>IMaCh</STRONG> (for <STRONG>I</STRONG>nterpolated \r
+<STRONG>MA</STRONG>rkov <STRONG>CH</STRONG>ain), designed to analyse transitions from longitudinal surveys. The first step is the estimation of the set of the parameters of a model for the  \r
+transition probabilities between an initial state and a final state. \r
+From there, the computer program produces indicators such as the observed and \r
+stationary prevalence, life expectancies and their variances both numerically and graphically. Our \r
+transition model consists of absorbing and non-absorbing states assuming the \r
+possibility of return across the non-absorbing states. The main advantage of \r
+this package, compared to other programs for the analysis of transition data \r
+(for example: Proc Catmod of SAS<SUP>®</SUP>) is that the whole individual \r
+information is used even if an interview is missing, a state or a date is \r
+unknown or when the delay between waves is not identical for each individual. \r
+The program is dependent upon a set of parameters inputted by the user: selection of a sub-sample, \r
+number of absorbing and non-absorbing states, number of waves to be taken in account , a tolerance level for the \r
+maximization function, the periodicity of the transitions (we can compute \r
+annual, quarterly or monthly transitions), covariates in the model. IMaCh works on \r
+Windows or on Unix platform.<BR></P>\r
+<HR>\r
+\r
+<P>(1) Laditka S. B. and Wolf, D. (1998), New Methods for Analyzing \r
+Active Life Expectancy. <I>Journal of Aging and Health</I>. Vol 10, No. 2. </P>\r
+<P>(2) <A \r
+href="http://taylorandfrancis.metapress.com/app/home/contribution.asp?wasp=1f99bwtvmk5yrb7hlhw3&amp;referrer=parent&amp;backto=issue,1,2;journal,2,5;linkingpublicationresults,1:300265,1">Lièvre \r
+A., Brouard N. and Heathcote Ch. (2003) Estimating Health Expectancies from \r
+Cross-longitudinal surveys. <EM>Mathematical Population Studies</EM>.- 10(4), \r
+pp. 211-248</A> \r
+<HR>\r
+\r
+<H2><A name=data><FONT color=#00006a>What kind of data is required?</FONT></A></H2>\r
+<P>The minimum data required for a transition model is the recording of a set of \r
+individuals interviewed at a first date and interviewed once more. From the observations of an individual, we obtain a follow-up over \r
+time of the occurrence of a specific event. In this documentation, the event is \r
+related to health state, but the program can be applied to many\r
+longitudinal studies with different contexts. To build the data file\r
+as explained \r
+in the next section, you must have the month and year of each interview and \r
+the corresponding health state. In order to get age, date of birth (month \r
+and year) are required (missing values are allowed for month). Date of death \r
+(month and year) is an important information also required if the individual is \r
+dead. Shorter steps (i.e. a month) will more closely take into account the \r
+survival time after the last interview.</P>\r
+<HR>\r
+\r
+<H2><A name=datafile><FONT color=#00006a>The data file</FONT></A></H2>\r
+<P>In this example, 8,000 people have been interviewed in a cross-longitudinal \r
+survey of 4 waves (1984, 1986, 1988, 1990). Some people missed 1, 2 or 3 \r
+interviews. Health states are healthy (1) and disabled (2). The survey is not a \r
+real one but a simulation of the American Longitudinal Survey on Aging. The \r
+disability state is defined as dependence in at least one of four ADLs (Activities \r
+of daily living, like bathing, eating, walking). Therefore, even if the \r
+individuals interviewed in the sample are virtual, the information in \r
+this sample is close to reality for the United States. Sex is not recorded \r
+is this sample. The LSOA survey is biased in the sense that people\r
+living in an institution were not included in the first interview in\r
+1984. Thus the prevalence of disability observed in 1984 is lower than\r
+the true prevalence at old ages. However when people moved into an\r
+institution, they were interviewed there in 1986, 1988 and 1990. Thus\r
+the incidences of disabilities are not biased. Cross-sectional \r
+prevalences of disability at old ages are thus artificially increasing in 1986, \r
+1988 and 1990 because of a greater proportion of the sample\r
+institutionalized. Our article (Lièvre A., Brouard N. and Heathcote\r
+Ch. (2003)) shows the opposite: the period prevalence based on the\r
+incidences is lower at old  \r
+ages than the adjusted cross-sectional prevalence illustrating that\r
+there has been significant progress against disability.</P>\r
+<P>Each line of the data set (named <A \r
+href="http://euroreves.ined.fr/imach/doc/data1.txt">data1.txt</A> in this first \r
+example) is an individual record. Fields are separated by blanks: </P>\r
+<UL>\r
+  <LI><B>Index number</B>: positive number (field 1) \r
+  <LI><B>First covariate</B> positive number (field 2) \r
+  <LI><B>Second covariate</B> positive number (field 3) \r
+  <LI><A name=Weight><B>Weight</B></A>: positive number (field 4) . In most \r
+  surveys individuals are weighted to account for stratification of the \r
+  sample. \r
+  <LI><B>Date of birth</B>: coded as mm/yyyy. Missing dates are coded as 99/9999 \r
+  (field 5) \r
+  <LI><B>Date of death</B>: coded as mm/yyyy. Missing dates are coded as 99/9999 \r
+  (field 6) \r
+  <LI><B>Date of first interview</B>: coded as mm/yyyy. Missing dates are coded \r
+  as 99/9999 (field 7) \r
+  <LI><B>Status at first interview</B>: positive number. Missing values ar coded \r
+  -1. (field 8) \r
+  <LI><B>Date of second interview</B>: coded as mm/yyyy. Missing dates are coded \r
+  as 99/9999 (field 9) \r
+  <LI><STRONG>Status at second interview</STRONG> positive number. Missing \r
+  values ar coded -1. (field 10) \r
+  <LI><B>Date of third interview</B>: coded as mm/yyyy. Missing dates are coded \r
+  as 99/9999 (field 11) \r
+  <LI><STRONG>Status at third interview</STRONG> positive number. Missing values \r
+  ar coded -1. (field 12) \r
+  <LI><B>Date of fourth interview</B>: coded as mm/yyyy. Missing dates are coded \r
+  as 99/9999 (field 13) \r
+  <LI><STRONG>Status at fourth interview</STRONG> positive number. Missing \r
+  values are coded -1. (field 14) \r
+  <LI>etc </LI></UL>\r
+<P>&nbsp;</P>\r
+<P>If you do not wish to include information on weights or \r
+covariates, you must fill the column with a number (e.g. 1) since all\r
+fields must be present.</P>\r
+<HR>\r
+\r
+<H2><FONT color=#00006a>Your first example parameter file</FONT><A \r
+href="http://euroreves.ined.fr/imach"></A><A name=uio></A></H2>\r
+<H2><A name=biaspar></A>#Imach version 0.97b, June 2004, INED-EUROREVES </H2>\r
+<P>This first line was a comment. Comments line start with a '#'.</P>\r
+<H4><FONT color=#ff0000>First uncommented line</FONT></H4><PRE>title=1st_example datafile=data1.txt lastobs=8600 firstpass=1 lastpass=4</PRE>\r
+<UL>\r
+  <LI><B>title=</B> 1st_example is title of the run. \r
+  <LI><B>datafile=</B> data1.txt is the name of the data set. Our example is a \r
+  six years follow-up survey. It consists of a baseline followed by 3 \r
+  reinterviews. \r
+  <LI><B>lastobs=</B> 8600 the program is able to run on a subsample where the \r
+  last observation number is lastobs. It can be set a bigger number than the \r
+  real number of observations (e.g. 100000). In this example, maximisation will \r
+  be done on the first 8600 records. \r
+  <LI><B>firstpass=1</B> , <B>lastpass=4 </B>If there are more than two interviews \r
+  in the survey, the program can be run on selected transitions periods. \r
+  firstpass=1 means the first interview included in the calculation is the \r
+  baseline survey. lastpass=4 means that the last interview to be\r
+  included will be by the 4th. </LI></UL>\r
+<P>&nbsp;</P>\r
+<H4><A name=biaspar-2><FONT color=#ff0000>Second uncommented \r
+line</FONT></A></H4><PRE>ftol=1.e-08 stepm=1 ncovcol=2 nlstate=2 ndeath=1 maxwav=4 mle=1 weight=0</PRE>\r
+<UL>\r
+  <LI><B>ftol=1e-8</B> Convergence tolerance on the function value in the \r
+  maximisation of the likelihood. Choosing a correct value for ftol is \r
+  difficult. 1e-8 is the correct value for a 32 bit computer. \r
+  <LI><B>stepm=1</B> The time unit in months for interpolation. Examples:\r
+  <UL>\r
+    <LI>If stepm=1, the unit is a month \r
+    <LI>If stepm=4, the unit is a trimester \r
+    <LI>If stepm=12, the unit is a year \r
+    <LI>If stepm=24, the unit is two years \r
+    <LI>... </LI></UL>\r
+  <LI><B>ncovcol=2</B> Number of covariate columns included in the datafile \r
+  before the column for the date of birth. You can include covariates\r
+  that will not be used in the model as this number is not the number of covariates that will \r
+  be specified by the model. The 'model' syntax describes the covariates to be \r
+  taken into account during the run. \r
+  <LI><B>nlstate=2</B> Number of non-absorbing (alive) states. Here we have two \r
+  alive states: disability-free is coded 1 and disability is coded 2. \r
+  <LI><B>ndeath=1</B> Number of absorbing states. The absorbing state death is \r
+  coded 3. \r
+  <LI><B>maxwav=4</B> Number of waves in the datafile. \r
+  <LI><A name=mle><B>mle</B></A><B>=1</B> Option for the Maximisation Likelihood \r
+  Estimation. \r
+  <UL>\r
+    <LI>If mle=1 the program does the maximisation and the calculation of health \r
+    expectancies \r
+    <LI>If mle=0 the program only does the calculation of the health \r
+    expectancies and other indices and graphs but without the maximization. \r
+    There are also other possible values: \r
+    <UL>\r
+      <LI>If mle=-1 you get a template for the number of parameters\r
+      and the size of the variance-covariance matrix. This is useful if the model is \r
+      complex with many covariates. \r
+      <LI>If mle=-3 IMaCh computes the mortality but without any health status \r
+      (May 2004) \r
+      <LI>If mle=2 IMach likelihood corresponds to a linear interpolation \r
+      <LI>If mle=3 IMach likelihood corresponds to an exponential \r
+      inter-extrapolation \r
+      <LI>If mle=4 IMach likelihood corresponds to no inter-extrapolation, thus biasing the results. \r
+      <LI>If mle=5 IMach likelihood corresponds to no inter-extrapolation, and \r
+      before the correction of the Jackson's bug (avoid this). </LI></UL></LI></UL>\r
+  <LI><B>weight=0</B> Provides the possibility of adding weights. \r
+  <UL>\r
+    <LI>If weight=0 no weights are included \r
+    <LI>If weight=1 the maximisation integrates the weights which are in field \r
+    <A href="http://euroreves.ined.fr/imach/doc/imach.htm#Weight">4</A> \r
+  </LI></UL></LI></UL>\r
+<H4><FONT color=#ff0000>Covariates</FONT></H4>\r
+<P>Intercept and age are automatically included in the model. Additional \r
+covariates can be included with the command: </P><PRE>model=<EM>list of covariates</EM></PRE>\r
+<UL>\r
+  <LI>if<STRONG> model=. </STRONG>then no covariates are included \r
+  <LI>if <STRONG>model=V1</STRONG> the model includes the first covariate (field \r
+  2) \r
+  <LI>if <STRONG>model=V2 </STRONG>the model includes the second covariate \r
+  (field 3) \r
+  <LI>if <STRONG>model=V1+V2 </STRONG>the model includes the first and the \r
+  second covariate (fields 2 and 3) \r
+  <LI>if <STRONG>model=V1*V2 </STRONG>the model includes the product of the \r
+  first and the second covariate (fields 2 and 3) \r
+  <LI>if <STRONG>model=V1+V1*age</STRONG> the model includes the product \r
+  covariate*age </LI></UL>\r
+<P>In this example, we have two covariates in the data file (fields 2 and 3). \r
+The number of covariates included in the data file between the id and the date \r
+of birth is ncovcol=2 (it was named ncov in version prior to 0.8). If you have 3 \r
+covariates in the datafile (fields 2, 3 and 4), you will set ncovcol=3. Then you \r
+can run the programme with a new parametrisation taking into account the third \r
+covariate. For example, <STRONG>model=V1+V3 </STRONG>estimates a model with the \r
+first and third covariates. More complicated models can be used, but this will \r
+take more time to converge. With a simple model (no covariates), the programme \r
+estimates 8 parameters. Adding covariates increases the number of parameters : \r
+12 for <STRONG>model=V1, </STRONG>16 for <STRONG>model=V1+V1*age </STRONG>and 20 \r
+for <STRONG>model=V1+V2+V3.</STRONG></P>\r
+<H4><FONT color=#ff0000>Guess values for optimization</FONT><FONT color=#00006a> \r
+</FONT></H4>\r
+<P>You must write the initial guess values of the parameters for optimization. \r
+The number of parameters, <EM>N</EM> depends on the number of absorbing states \r
+and non-absorbing states and on the number of covariates in the model (ncovmodel). <BR><EM>N</EM> is \r
+given by the formula <EM>N</EM>=(<EM>nlstate</EM> + \r
+<EM>ndeath</EM>-1)*<EM>nlstate</EM>*<EM>ncovmodel</EM>&nbsp;. <BR><BR>Thus in \r
+the simple case with 2 covariates in the model(the model is log (pij/pii) = aij + bij * age \r
+where intercept and age are the two covariates), and 2 health states (1 for \r
+disability-free and 2 for disability) and 1 absorbing state (3), you must enter \r
+8 initials values, a12, b12, a13, b13, a21, b21, a23, b23. You can start with \r
+zeros as in this example, but if you have a more precise set (for example from \r
+an earlier run) you can enter it and it will speed up the convergence<BR>Each of the four \r
+lines starts with indices "ij": <B>ij aij bij</B> </P>\r
+<BLOCKQUOTE><PRE># Guess values of aij and bij in log (pij/pii) = aij + bij * age\r
 12 -14.155633  0.110794 \r
 13  -7.925360  0.032091 \r
 21  -1.890135 -0.029473 \r
-23  -6.234642  0.022315 </pre>\r
-</blockquote>\r
-\r
-<p>or, to simplify (in most of cases it converges but there is no\r
-warranty!): </p>\r
-\r
-<blockquote>\r
-    <pre>12 0.0 0.0\r
+23  -6.234642  0.022315 </PRE></BLOCKQUOTE>\r
+<P>or, to simplify (in most of cases it converges but there is no warranty!): \r
+</P>\r
+<BLOCKQUOTE><PRE>12 0.0 0.0\r
 13 0.0 0.0\r
 21 0.0 0.0\r
-23 0.0 0.0</pre>\r
-</blockquote>\r
-\r
-<p>In order to speed up the convergence you can make a first run\r
-with a large stepm i.e stepm=12 or 24 and then decrease the stepm\r
-until stepm=1 month. If newstepm is the new shorter stepm and\r
-stepm can be expressed as a multiple of newstepm, like newstepm=n\r
-stepm, then the following approximation holds: </p>\r
-\r
-<pre>aij(stepm) = aij(n . stepm) - ln(n)\r
-</pre>\r
-\r
-<p>and </p>\r
-\r
-<pre>bij(stepm) = bij(n . stepm) .</pre>\r
-\r
-<p>For example if you already ran for a 6 months interval and\r
-got:<br>\r
-</p>\r
-\r
-<pre># Parameters\r
+23 0.0 0.0</PRE></BLOCKQUOTE>\r
+<P>In order to speed up the convergence you can make a first run with a large \r
+stepm i.e stepm=12 or 24 and then decrease the stepm until stepm=1 month. If \r
+newstepm is the new shorter stepm and stepm can be expressed as a multiple of \r
+newstepm, like newstepm=n stepm, then the following approximation holds: </P><PRE>aij(stepm) = aij(n . stepm) - ln(n)\r
+</PRE>\r
+<P>and </P><PRE>bij(stepm) = bij(n . stepm) .</PRE>\r
+<P>For example if you already ran with stepm=6 (a 6 months interval) and got:<BR></P><PRE># Parameters\r
 12 -13.390179  0.126133 \r
 13  -7.493460  0.048069 \r
 21   0.575975 -0.041322 \r
 23  -4.748678  0.030626 \r
-</pre>\r
-\r
-<p>If you now want to get the monthly estimates, you can guess\r
-the aij by substracting ln(6)= 1,7917<br>\r
-and running<br>\r
-</p>\r
-\r
-<pre>12 -15.18193847  0.126133 \r
+</PRE>\r
+<P>Then you now want to get the monthly estimates, you can guess the aij by \r
+subtracting ln(6)= 1.7917<BR>and running using<BR></P><PRE>12 -15.18193847  0.126133 \r
 13 -9.285219469  0.048069\r
 21 -1.215784469 -0.041322\r
 23 -6.540437469  0.030626\r
-</pre>\r
-\r
-<p>and get<br>\r
-</p>\r
-\r
-<pre>12 -15.029768 0.124347 \r
+</PRE>\r
+<P>and get<BR></P><PRE>12 -15.029768 0.124347 \r
 13 -8.472981 0.036599 \r
 21 -1.472527 -0.038394 \r
 23 -6.553602 0.029856 \r
 \r
-which is closer to the results. The approximation is probably useful\r
+<P>which is closer to the results. The approximation is probably useful\r
 only for very small intervals and we don't have enough experience to\r
-know if you will speed up the convergence or not.\r
-</pre>\r
-\r
-<pre>         -ln(12)= -2.484\r
+know if you will speed up the convergence or not.<BR></P>\r
+</PRE><PRE>         -ln(12)= -2.484\r
  -ln(6/1)=-ln(6)= -1.791\r
  -ln(3/1)=-ln(3)= -1.0986\r
 -ln(12/6)=-ln(2)= -0.693\r
-</pre>\r
-\r
-In version 0.9 and higher you can still have valuable results even if\r
-your stepm parameter is bigger than a month. The idea is to run with\r
-bigger stepm in order to have a quicker convergence at the price of a\r
-small bias. Once you know which model you want to fit, you can put\r
-stepm=1 and wait hours or days to get the convergence!\r
-\r
-To get unbiased results even with large stepm we introduce the idea of\r
-pseudo likelihood by interpolating two exact likelihoods. Let us\r
-detail this:\r
-<p>\r
-If the interval of <em>d</em> months between two waves is not a\r
-mutliple of 'stepm', but is comprised between <em>(n-1) stepm</em> and\r
-<em>n stepm</em> then both exact likelihoods are computed (the\r
-contribution to the likelihood at <em>n stepm</em> requires one matrix\r
-product more) (let us remember that we are modelling the probability\r
-to be observed in a particular state after <em>d</em> months being\r
-observed at a particular state at 0). The distance, (<em>bh</em> in\r
-the program), from the month of interview to the rounded date of <em>n\r
-stepm</em> is computed. It can be negative (interview occurs before\r
-<em>n stepm</em>) or positive if the interview occurs after <em>n\r
-stepm</em> (and before <em>(n+1)stepm</em>).\r
-<br>\r
-Then the final contribution to the total likelihood is a weighted\r
-average of these two exact likelihoods at <em>n stepm</em> (out) and\r
-at <em>(n-1)stepm</em>(savm). We did not want to compute the third\r
-likelihood at <em>(n+1)stepm</em> because it is too costly in time, so\r
-we used an extrapolation if <em>bh</em> is positive.  <br> Formula of\r
-inter/extrapolation may vary according to the value of parameter mle:\r
-<pre>\r
-mle=1    lli= log((1.+bbh)*out[s1][s2]- bbh*savm[s1][s2]); /* linear interpolation */\r
-\r
-mle=2  lli= (savm[s1][s2]>(double)1.e-8 ? \\r
+</PRE>In version 0.9 and higher you can still have valuable results even if your \r
+stepm parameter is bigger than a month. The idea is to run with bigger stepm in \r
+order to have a quicker convergence at the price of a small bias. Once you know \r
+which model you want to fit, you can put stepm=1 and wait hours or days to get \r
+the convergence! To get unbiased results even with large stepm we introduce the \r
+idea of pseudo likelihood by interpolating two exact likelihoods. In\r
+more detail: \r
+<P>If the interval of <EM>d</EM> months between two waves is not a multiple of \r
+'stepm', but is between <EM>(n-1) stepm</EM> and <EM>n stepm</EM> then \r
+both exact likelihoods are computed (the contribution to the likelihood at <EM>n \r
+stepm</EM> requires one matrix product more) (let us remember that we are \r
+modelling the probability to be observed in a particular state after <EM>d</EM> \r
+months being observed at a particular state at 0). The distance, (<EM>bh</EM> in \r
+the program), from the month of interview to the rounded date of <EM>n \r
+stepm</EM> is computed. It can be negative (interview occurs before <EM>n \r
+stepm</EM>) or positive if the interview occurs after <EM>n stepm</EM> (and \r
+before <EM>(n+1)stepm</EM>). <BR>Then the final contribution to the total \r
+likelihood is a weighted average of these two exact likelihoods at <EM>n \r
+stepm</EM> (out) and at <EM>(n-1)stepm</EM>(savm). We did not want to compute \r
+the third likelihood at <EM>(n+1)stepm</EM> because it is too costly in time, so \r
+we used an extrapolation if <EM>bh</EM> is positive. <BR>The formula\r
+for the inter/extrapolation may vary according to the value of parameter mle: <PRE>mle=1         lli= log((1.+bbh)*out[s1][s2]- bbh*savm[s1][s2]); /* linear interpolation */\r
\r
+mle=2  lli= (savm[s1][s2]&gt;(double)1.e-8 ? \\r
           log((1.+bbh)*out[s1][s2]- bbh*(savm[s1][s2])): \\r
           log((1.+bbh)*out[s1][s2])); /* linear interpolation */\r
-mle=3  lli= (savm[s1][s2]>1.e-8 ? \\r
+mle=3  lli= (savm[s1][s2]&gt;1.e-8 ? \\r
           (1.+bbh)*log(out[s1][s2])- bbh*log(savm[s1][s2]): \\r
           log((1.+bbh)*out[s1][s2])); /* exponential inter-extrapolation */\r
 \r
 mle=4   lli=log(out[s[mw[mi][i]][i]][s[mw[mi+1][i]][i]]); /* No interpolation  */\r
         no need to save previous likelihood into memory.\r
-</pre>\r
-<p>\r
-If the death occurs between first and second pass, and for example\r
-more precisely between <em>n stepm</em> and <em>(n+1)stepm</em> the\r
-contribution of this people to the likelihood is simply the difference\r
-between the probability of dying before <em>n stepm</em> and the\r
-probability of dying before <em>(n+1)stepm</em>. There was a bug in\r
-version 0.8 and death was treated as any other state, i.e. as if it\r
-was an observed death at second pass. This was not precise but\r
-correct, but when information on the precise month of death came\r
-(death occuring prior to second pass) we did not change the likelihood\r
-accordingly. Thanks to Chris Jackson for correcting us. In earlier\r
+</PRE>\r
+<P>If the death occurs between the first and second pass, and for example more \r
+precisely between <EM>n stepm</EM> and <EM>(n+1)stepm</EM> the contribution of \r
+these people to the likelihood is simply the difference between the probability \r
+of dying before <EM>n stepm</EM> and the probability of dying before \r
+<EM>(n+1)stepm</EM>. There was a bug in version 0.8 and death was treated as any \r
+other state, i.e. as if it was an observed death at second pass. This was not \r
+precise but correct, although when information on the precise month of\r
+death came (death occuring prior to second pass) we did not change the\r
+likelihood accordingly. We thank Chris Jackson for correcting it. In earlier\r
 versions (fortunately before first publication) the total mortality\r
-was overestimated (people were dying too early) of about 10%. Version\r
-0.95 and higher are correct.\r
-\r
-<p> Our suggested choice is mle=1 . If stepm=1 there is no difference\r
-between various mle options (methods of interpolation). If stepm is\r
-big, like 12 or 24 or 48 and mle=4 (no interpolation) the bias may be\r
-very important if the mean duration between two waves is not a\r
-multiple of stepm. See the appendix in our main publication concerning\r
-the sine curve of biases.\r
\r
-\r
-<h4><font color="#FF0000">Guess values for computing variances</font></h4>\r
-\r
-<p>These values are output by the maximisation of the likelihood <a\r
-href="#mle">mle</a>=1. These valuse can be used as an input of a\r
-second run in order to get the various output data files (Health\r
-expectancies, period prevalence etc.) and figures without rerunning\r
-the long maximisation phase (mle=0). </p>\r
-\r
-<p>These 'scales' are small values needed for the computing of\r
-numerical derivatives. These derivatives are used to compute the\r
-hessian matrix of the parameters, that is the inverse of the\r
-covariance matrix. They are often used for estimating variances and\r
-confidence intervals. Each line consists in indices &quot;ij&quot;\r
-followed by the initial scales (zero to simplify) associated with aij\r
-and bij. </p>\r
-\r
-<ul>\r
-    <li>If mle=1 you can enter zeros:</li>\r
-    <li><blockquote>\r
-            <pre># Scales (for hessian or gradient estimation)\r
+was thus overestimated (people were dying too early) by about 10%. Version\r
+0.95 and higher are correct. \r
+\r
+<P>Our suggested choice is mle=1 . If stepm=1 there is no difference between \r
+various mle options (methods of interpolation). If stepm is big, like 12 or 24 \r
+or 48 and mle=4 (no interpolation) the bias may be very important if the mean \r
+duration between two waves is not a multiple of stepm. See the appendix in our \r
+main publication concerning the sine curve of biases. \r
+<H4><FONT color=#ff0000>Guess values for computing variances</FONT></H4>\r
+<P>These values are output by the maximisation of the likelihood <A \r
+href="http://euroreves.ined.fr/imach/doc/imach.htm#mle">mle</A>=1 and\r
+can be used as an input for a second run in order to get the various output data \r
+files (Health expectancies, period prevalence etc.) and figures without \r
+rerunning the long maximisation phase (mle=0). </P>\r
+<P>The 'scales' are small values needed for the computing of numerical \r
+derivatives. These derivatives are used to compute the hessian matrix of the \r
+parameters, that is the inverse of the covariance matrix. They are often used \r
+for estimating variances and confidence intervals. Each line consists of indices \r
+"ij" followed by the initial scales (zero to simplify) associated with aij and \r
+bij. </P>\r
+<UL>\r
+  <LI>If mle=1 you can enter zeros: \r
+  <LI>\r
+  <BLOCKQUOTE><PRE># Scales (for hessian or gradient estimation)\r
 12 0. 0. \r
 13 0. 0. \r
 21 0. 0. \r
-23 0. 0. </pre>\r
-        </blockquote>\r
-    </li>\r
-    <li>If mle=0 (no maximisation of Likelihood) you must enter a covariance matrix (usually\r
-        obtained from an earlier run).</li>\r
-</ul>\r
-\r
-<h4><font color="#FF0000">Covariance matrix of parameters</font></h4>\r
-\r
-<p>The covariance matrix is output if <a href="#mle">mle</a>=1. But it can be\r
-also used as an input to get the various output data files (Health\r
-expectancies, period prevalence etc.) and figures without\r
-rerunning the maximisation phase (mle=0). <br>\r
-Each line starts with indices &quot;ijk&quot; followed by the\r
-covariances between aij and bij:<br>\r
-</p>\r
-\r
-<pre>\r
-   121 Var(a12) \r
+23 0. 0. </PRE></BLOCKQUOTE>\r
+  <LI>If mle=0 (no maximisation of Likelihood) you must enter a covariance \r
+  matrix (usually obtained from an earlier run). </LI></UL>\r
+<H4><FONT color=#ff0000>Covariance matrix of parameters</FONT></H4>\r
+<P>The covariance matrix is output if <A \r
+href="http://euroreves.ined.fr/imach/doc/imach.htm#mle">mle</A>=1. But it can be \r
+also be used as an input to get the various output data files (Health\r
+expectancies, period prevalence etc.) and figures without rerunning\r
+the maximisation phase (mle=0). <BR>Each line starts with indices\r
+"ijk" followed by the covariances  between aij and bij:<BR>\r
+</P><PRE>   121 Var(a12) \r
    122 Cov(b12,a12)  Var(b12) \r
           ...\r
-   232 Cov(b23,a12)  Cov(b23,b12) ... Var (b23) </pre>\r
-\r
-<ul>\r
-    <li>If mle=1 you can enter zeros. </li>\r
-    <li><pre># Covariance matrix\r
+   232 Cov(b23,a12)  Cov(b23,b12) ... Var (b23) </PRE>\r
+<UL>\r
+  <LI>If mle=1 you can enter zeros. \r
+  <LI><PRE># Covariance matrix\r
 121 0.\r
 122 0. 0.\r
 131 0. 0. 0. \r
@@ -634,306 +470,203 @@ covariances between aij and bij:<br>
 211 0. 0. 0. 0. 0. \r
 212 0. 0. 0. 0. 0. 0. \r
 231 0. 0. 0. 0. 0. 0. 0. \r
-232 0. 0. 0. 0. 0. 0. 0. 0.</pre>\r
-    </li>\r
-    <li>If mle=0 you must enter a covariance matrix (usually\r
-        obtained from an earlier run). </li>\r
-</ul>\r
-\r
-<h4><font color="#FF0000">Age range for calculation of stationary\r
-prevalences and health expectancies</font></h4>\r
-\r
-<pre>agemin=70 agemax=100 bage=50 fage=100</pre>\r
-\r
-<p>\r
-Once we obtained the estimated parameters, the program is able\r
-to calculate period prevalence, transitions probabilities\r
-and life expectancies at any age. Choice of age range is useful\r
-for extrapolation. In this example, age of people interviewed varies\r
-from 69 to 102 and the model is estimated using their exact ages. But\r
-if you are interested in the age-specific period prevalence you can\r
-start the simulation at an exact age like 70 and stop at 100. Then the\r
-program will draw at least two curves describing the forecasted\r
-prevalences of two cohorts, one for healthy people at age 70 and the second\r
-for disabled people at the same initial age. And according to the\r
-mixing property (ergodicity) and because of recovery, both prevalences\r
-will tend to be identical at later ages. Thus if you want to compute\r
-the prevalence at age 70, you should enter a lower agemin value.\r
-\r
-<p>\r
-Setting bage=50 (begin age) and fage=100 (final age), let\r
-the program compute life expectancy from age 'bage' to age\r
-'fage'. As we use a model, we can interessingly compute life\r
-expectancy on a wider age range than the age range from the data.\r
-But the model can be rather wrong on much larger intervals.\r
-Program is limited to around 120 for upper age!\r
-</pre>\r
-\r
-<ul>\r
-    <li><b>agemin=</b> Minimum age for calculation of the\r
-        period prevalence </li>\r
-    <li><b>agemax=</b> Maximum age for calculation of the\r
-        period prevalence </li>\r
-    <li><b>bage=</b> Minimum age for calculation of the health\r
-        expectancies </li>\r
-    <li><b>fage=</b> Maximum age for calculation of the health\r
-        expectancies </li>\r
-</ul>\r
-\r
-<h4><a name="Computing"><font color="#FF0000">Computing</font></a><font\r
-color="#FF0000"> the cross-sectional prevalence</font></h4>\r
-\r
-<pre>begin-prev-date=1/1/1984 end-prev-date=1/6/1988 estepm=1</pre>\r
-\r
-<p>\r
-Statements 'begin-prev-date' and 'end-prev-date' allow to\r
-select the period in which we calculate the observed prevalences\r
-in each state. In this example, the prevalences are calculated on\r
-data survey collected between 1 january 1984 and 1 june 1988. \r
-</p>\r
-\r
-<ul>\r
-    <li><strong>begin-prev-date= </strong>Starting date\r
-        (day/month/year)</li>\r
-    <li><strong>end-prev-date= </strong>Final date\r
-        (day/month/year)</li>\r
-    <li><strong>estepm= </strong>Unit (in months).We compute the\r
-        life expectancy from trapezoids spaced every estepm\r
-        months. This is mainly to measure the difference between\r
-        two models: for example if stepm=24 months pijx are given\r
-        only every 2 years and by summing them we are calculating\r
-        an estimate of the Life Expectancy assuming a linear\r
-        progression inbetween and thus overestimating or\r
-        underestimating according to the curvature of the\r
-        survival function. If, for the same date, we estimate the\r
-        model with stepm=1 month, we can keep estepm to 24 months\r
-        to compare the new estimate of Life expectancy with the\r
-        same linear hypothesis. A more precise result, taking\r
-        into account a more precise curvature will be obtained if\r
-        estepm is as small as stepm.</li>\r
-</ul>\r
-\r
-<h4><font color="#FF0000">Population- or status-based health\r
-expectancies</font></h4>\r
-\r
-<pre>pop_based=0</pre>\r
-\r
-<p>The program computes status-based health expectancies, i.e health\r
-expectancies which depend on the initial health state.  If you are\r
-healthy, your healthy life expectancy (e11) is higher than if you were\r
-disabled (e21, with e11 &gt; e21).<br> To compute a healthy life\r
-expectancy 'independent' of the initial status we have to weight e11\r
-and e21 according to the probability to be in each state at initial\r
-age which are corresponding to the proportions of people in each health\r
-state (cross-sectional prevalences).<p> \r
-\r
-We could also compute e12 and e12 and get e.2 by weighting them\r
-according to the observed cross-sectional prevalences at initial age.\r
-<p> In a similar way we could compute the total life expectancy by\r
-summing e.1 and e.2 .\r
-<br>\r
-The main difference between 'population based' and 'implied' or\r
-'period' consists in the weights used. 'Usually', cross-sectional\r
-prevalences of disability are higher than period prevalences\r
-particularly at old ages. This is true if the country is improving its\r
-health system by teaching people how to prevent disability as by\r
-promoting better screening, for example of people needing cataracts\r
-surgeryand for many unknown reasons that this program may help to\r
-discover. Then the proportion of disabled people at age 90 will be\r
-lower than the current observed proportion.\r
-<p>\r
-Thus a better Health Expectancy and even a better Life Expectancy\r
-value is given by forecasting not only the current lower mortality at\r
-all ages but also a lower incidence of disability and higher recovery.\r
-<br> Using the period prevalences as weight instead of the\r
-cross-sectional prevalences we are computing indices which are more\r
-specific to the current situations and therefore more useful to\r
-predict improvements or regressions in the future as to compare\r
-different policies in various countries.\r
-\r
-<ul>\r
-    <li><strong>popbased= 0 </strong>Health expectancies are computed\r
-    at each age from period prevalences 'expected' at this initial\r
-    age.</li> \r
-    <li><strong>popbased= 1 </strong>Health expectancies are\r
-    computed at each age from cross-sectional 'observed' prevalence at\r
-    this initial age. As all the population is not observed at the\r
-    same exact date we define a short period were the observed\r
-    prevalence can be computed.<br>\r
-\r
- We simply sum all people surveyed within these two exact dates\r
- who belong to a particular age group (single year) at the date of\r
- interview and being in a particular health state. Then it is easy to\r
-get the proportion of people of a particular health status among all\r
-people of the same age group.<br>\r
-\r
-If both dates are spaced and are covering two waves or more, people\r
-being interviewed twice or more are counted twice or more. The program\r
-takes into account the selection of individuals interviewed between\r
-firstpass and lastpass too (we don't know if it can be useful).\r
-</li>\r
-</ul>\r
-\r
-<h4><font color="#FF0000">Prevalence forecasting (Experimental)</font></h4>\r
-\r
-<pre>starting-proj-date=1/1/1989 final-proj-date=1/1/1992 mov_average=0 </pre>\r
-\r
-<p>Prevalence and population projections are only available if\r
-the interpolation unit is a month, i.e. stepm=1 and if there are\r
-no covariate. The programme estimates the prevalence in each\r
-state at a precise date expressed in day/month/year. The\r
-programme computes one forecasted prevalence a year from a\r
-starting date (1 january of 1989 in this example) to a final date\r
-(1 january 1992). The statement mov_average allows to compute\r
-smoothed forecasted prevalences with a five-age moving average\r
-centered at the mid-age of the five-age period. <br>\r
-</p>\r
-\r
-<h4><font color="#FF0000">Population forecasting (Experimental)</font></h4>\r
-\r
-<ul>\r
-    <li><strong>starting-proj-date</strong>= starting date\r
-        (day/month/year) of forecasting</li>\r
-    <li><strong>final-proj-date= </strong>final date\r
-        (day/month/year) of forecasting</li>\r
-    <li><strong>mov_average</strong>= smoothing with a five-age\r
-        moving average centered at the mid-age of the five-age\r
-        period. The command<strong> mov_average</strong> takes\r
-        value 1 if the prevalences are smoothed and 0 otherwise.</li>\r
-</ul>\r
-\r
-\r
-<ul type="disc">\r
-    <li><b>popforecast=\r
-        0 </b>Option for population forecasting. If\r
-        popforecast=1, the programme does the forecasting<b>.</b></li>\r
-    <li><b>popfile=\r
-        </b>name of the population file</li>\r
-    <li><b>popfiledate=</b>\r
-        date of the population population</li>\r
-    <li><b>last-popfiledate</b>=\r
-        date of the last population projection&nbsp;</li>\r
-</ul>\r
-\r
-<hr>\r
-\r
-<h2><a name="running"></a><font color="#00006A">Running Imach\r
-with this example</font></h2>\r
-\r
-<p>We assume that you already typed your <a href="biaspar.imach">1st_example\r
-parameter file</a> as explained <a href="#biaspar">above</a>. \r
-\r
-To run the program under Windows you should either:\r
-</p>\r
-\r
-<ul>\r
-    <li>click on the imach.exe icon and either:\r
-      <ul>\r
-         <li>enter the name of the\r
-        parameter file which is for example <tt>\r
-C:\home\myname\lsoa\biaspar.imach"</tt></li>\r
-    <li>or locate the biaspar.imach icon in your folder such as\r
-    <tt>C:\home\myname\lsoa</tt> \r
-    and drag it, with your mouse, on the already open imach window. </li>\r
-  </ul>\r
-\r
- <li>With version (0.97b) if you ran setup at installation, Windows is\r
- supposed to understand the &quot;.imach&quot; extension and you can\r
- right click the biaspar.imach icon and either edit with wordpad\r
- (better than notepad) the parameter file or execute it with\r
- IMaCh. </li>\r
-</ul>\r
-\r
-<p>The time to converge depends on the step unit that you used (1\r
-month is more precise but more cpu consuming), on the number of cases,\r
-and on the number of variables (covariates).\r
-\r
-<p>\r
-The program outputs many files. Most of them are files which will be\r
-plotted for better understanding.\r
-\r
-</p>\r
-To run under Linux it is mostly the same.\r
-<p>\r
-It is neither more difficult to run it under a MacIntosh.\r
-<hr>\r
-\r
-<h2><a name="output"><font color="#00006A">Output of the program\r
-and graphs</font> </a></h2>\r
-\r
-<p>Once the optimization is finished (once the convergence is\r
-reached), many tables and graphics are produced.<p>\r
-The IMaCh program will create a subdirectory of the same name as your\r
-parameter file (here mypar) where all the tables and figures will be\r
-stored.<br>\r
-\r
-Important files like the log file and the output parameter file (which\r
-contains the estimates of the maximisation) are stored at the main\r
-level not in this subdirectory. File with extension .log and .txt can\r
-be edited with a standard editor like wordpad or notepad or even can be\r
-viewed with a browser like Internet Explorer or Mozilla.\r
-\r
-<p> The main html file is also named with the same name <a\r
-href="biaspar.htm">biaspar.htm</a>. You can click on it by holding\r
-your shift key in order to open it in another window (Windows).\r
-<p>\r
- Our grapher is Gnuplot, it is an interactive plotting program (GPL) which\r
- can also work in batch. A gnuplot reference manual is available <a\r
- href="http://www.gnuplot.info/">here</a>. <br> When the run is\r
- finished, and in order that the window doesn't disappear, the user\r
- should enter a character like <tt>q</tt> for quitting. <br> These\r
- characters are:<br>\r
-</p>\r
-<ul>\r
-    <li>'e' for opening the main result html file <a\r
-    href="biaspar.htm"><strong>biaspar.htm</strong></a> file to edit\r
-    the output files and graphs. </li> \r
-    <li>'g' to graph again</li>\r
-    <li>'c' to start again the program from the beginning.</li>\r
-    <li>'q' for exiting.</li>\r
-</ul>\r
-\r
-The main gnuplot file is named <tt>biaspar.gp</tt> and can be edited (right\r
-click) and run again.\r
-<p>Gnuplot is easy and you can use it to make more complex\r
-graphs. Just click on gnuplot and type plot sin(x) to see how easy it\r
-is.\r
-\r
-\r
-<h5><font size="4"><strong>Results files </strong></font><br>\r
-<br>\r
-<font color="#EC5E5E" size="3"><strong>- </strong></font><a\r
-name="cross-sectional prevalence in each state"><font color="#EC5E5E"\r
-size="3"><strong>cross-sectional prevalence in each state</strong></font></a><font\r
-color="#EC5E5E" size="3"><strong> (and at first pass)</strong></font><b>:\r
-</b><a href="biaspar/prbiaspar.txt"><b>biaspar/prbiaspar.txt</b></a><br>\r
-</h5>\r
-\r
-<p>The first line is the title and displays each field of the\r
-file. First column corresponds to age. Fields 2 and 6 are the\r
-proportion of individuals in states 1 and 2 respectively as\r
-observed at first exam. Others fields are the numbers of\r
-people in states 1, 2 or more. The number of columns increases if\r
-the number of states is higher than 2.<br>\r
-The header of the file is </p>\r
-\r
-<pre># Age Prev(1) N(1) N Age Prev(2) N(2) N\r
+232 0. 0. 0. 0. 0. 0. 0. 0.</PRE>\r
+  <LI>If mle=0 you must enter a covariance matrix (usually obtained from an \r
+  earlier run). </LI></UL>\r
+<H4><FONT color=#ff0000>Age range for calculation of stationary prevalences and \r
+health expectancies</FONT></H4><PRE>agemin=70 agemax=100 bage=50 fage=100</PRE>\r
+<P>Once we obtained the estimated parameters, the program is able to calculate \r
+period prevalence, transitions probabilities and life expectancies at any age. \r
+Choice of the age range is useful for extrapolation. In this example,\r
+the age of people interviewed varies from 69 to 102 and the model is\r
+estimated using their exact ages. But if you are interested in the\r
+age-specific period prevalence you can start the simulation at an\r
+exact age like 70 and stop at 100. Then the program  will draw at\r
+least two curves describing the forecasted prevalences of two cohorts,\r
+one for healthy people at age 70 and the second for disabled people at\r
+the same initial age. And according to the mixing property\r
+(ergodicity) and because of recovery, both prevalences will tend to be\r
+identical at later ages. Thus if you want to compute the prevalence at\r
+age 70, you should enter a lower agemin value. \r
+<P>Setting bage=50 (begin age) and fage=100 (final age), let the program compute \r
+life expectancy from age 'bage' to age 'fage'. As we use a model, we can \r
+interessingly compute life expectancy on a wider age range than the age range \r
+from the data. But the model can be rather wrong on much larger intervals. \r
+Program is limited to around 120 for upper age! <PRE></PRE>\r
+<UL>\r
+  <LI><B>agemin=</B> Minimum age for calculation of the period prevalence \r
+  <LI><B>agemax=</B> Maximum age for calculation of the period prevalence \r
+  <LI><B>bage=</B> Minimum age for calculation of the health expectancies \r
+  <LI><B>fage=</B> Maximum age for calculation of the health expectancies \r
+</LI></UL>\r
+<H4><A name=Computing><FONT color=#ff0000>Computing</FONT></A><FONT \r
+color=#ff0000> the cross-sectional prevalence</FONT></H4><PRE>begin-prev-date=1/1/1984 end-prev-date=1/6/1988 estepm=1</PRE>\r
+<P>Statements 'begin-prev-date' and 'end-prev-date' allow the user to\r
+select the period in which the observed prevalences in each state. In\r
+this example, the prevalences are calculated on data survey collected\r
+between 1 January 1984 and 1 June 1988. </P>\r
+<UL>\r
+  <LI><STRONG>begin-prev-date= </STRONG>Starting date (day/month/year) \r
+  <LI><STRONG>end-prev-date= </STRONG>Final date (day/month/year) \r
+  <LI><STRONG>estepm= </STRONG>Unit (in months).We compute the life expectancy \r
+  from trapezoids spaced every estepm months. This is mainly to measure the \r
+  difference between two models: for example if stepm=24 months pijx are given \r
+  only every 2 years and by summing them we are calculating an estimate of the \r
+  Life Expectancy assuming a linear progression inbetween and thus \r
+  overestimating or underestimating according to the curvature of the survival \r
+  function. If, for the same date, we estimate the model with stepm=1 month, we \r
+  can keep estepm to 24 months to compare the new estimate of Life expectancy \r
+  with the same linear hypothesis. A more precise result, taking into account a \r
+  more precise curvature will be obtained if estepm is as small as stepm. \r
+</LI></UL>\r
+<H4><FONT color=#ff0000>Population- or status-based health \r
+expectancies</FONT></H4><PRE>pop_based=0</PRE>\r
+<P>The program computes status-based health expectancies, i.e health \r
+expectancies which depend on the initial health state. If you are healthy, your \r
+healthy life expectancy (e11) is higher than if you were disabled (e21, with e11 \r
+&gt; e21).<BR>To compute a healthy life expectancy 'independent' of the initial \r
+status we have to weight e11 and e21 according to the probability of\r
+being in each state at initial age which correspond to the proportions\r
+of people in each health state (cross-sectional prevalences).\r
+<P>We could also compute e12 and e12 and get e.2 by weighting them according to \r
+the observed cross-sectional prevalences at initial age. \r
+<P>In a similar way we could compute the total life expectancy by summing e.1 \r
+and e.2 . <BR>The main difference between 'population based' and 'implied' or \r
+'period' is in the weights used. 'Usually', cross-sectional prevalences of \r
+disability are higher than period prevalences particularly at old ages. This is \r
+true if the country is improving its health system by teaching people how to \r
+prevent disability by promoting better screening, for example of people \r
+needing cataract surgery. Then the proportion of disabled people at\r
+age 90 will be lower than the current observed proportion. \r
+<P>Thus a better Health Expectancy and even a better Life Expectancy value is \r
+given by forecasting not only the current lower mortality at all ages but also a \r
+lower incidence of disability and higher recovery. <BR>Using the period \r
+prevalences as weight instead of the cross-sectional prevalences we are \r
+computing indices which are more specific to the current situations and \r
+therefore more useful to predict improvements or regressions in the future as to \r
+compare different policies in various countries. \r
+<UL>\r
+  <LI><STRONG>popbased= 0 </STRONG>Health expectancies are computed at each age \r
+  from period prevalences 'expected' at this initial age. \r
+  <LI><STRONG>popbased= 1 </STRONG>Health expectancies are computed at each age \r
+  from cross-sectional 'observed' prevalence at the initial age. As all the \r
+  population is not observed at the same exact date we define a short period \r
+  where the observed prevalence can be computed as follows:<BR>we simply sum all people \r
+  surveyed within these two exact dates who belong to a particular age group \r
+  (single year) at the date of interview and are in a particular health state. \r
+  Then it is easy to get the proportion of people in a particular\r
+  health state as a percentage of all people of the same age group.<BR>If both dates are spaced and are \r
+  covering two waves or more, people being interviewed twice or more are counted \r
+  twice or more. The program takes into account the selection of individuals \r
+  interviewed between firstpass and lastpass too (we don't know if\r
+  this is useful). </LI></UL>\r
+<H4><FONT color=#ff0000>Prevalence forecasting (Experimental)</FONT></H4><PRE>starting-proj-date=1/1/1989 final-proj-date=1/1/1992 mov_average=0 </PRE>\r
+<P>Prevalence and population projections are only available if the interpolation \r
+unit is a month, i.e. stepm=1 and if there are no covariate. The programme \r
+estimates the prevalence in each state at a precise date expressed in \r
+day/month/year. The programme computes one forecasted prevalence a year from a \r
+starting date (1 January 1989 in this example) to a final date (1 January \r
+1992). The statement mov_average allows computation of smoothed forecasted \r
+prevalences with a five-age moving average centered at the mid-age of the \r
+fiveyear-age period. <BR></P>\r
+<H4><FONT color=#ff0000>Population forecasting (Experimental)</FONT></H4>\r
+<UL>\r
+  <LI><STRONG>starting-proj-date</STRONG>= starting date (day/month/year) of \r
+  forecasting \r
+  <LI><STRONG>final-proj-date= </STRONG>final date (day/month/year) of \r
+  forecasting \r
+  <LI><STRONG>mov_average</STRONG>= smoothing with a five-age moving average \r
+  centered at the mid-age of the fiveyear-age period. The command<STRONG> \r
+  mov_average</STRONG> takes value 1 if the prevalences are smoothed and 0 \r
+  otherwise. </LI></UL>\r
+<UL type=disc>\r
+  <LI><B>popforecast= 0 </B>Option for population forecasting. If popforecast=1, \r
+  the programme does the forecasting<B>.</B> \r
+  <LI><B>popfile= </B>name of the population file \r
+  <LI><B>popfiledate=</B> date of the population population \r
+  <LI><B>last-popfiledate</B>= date of the last population projection&nbsp; \r
+</LI></UL>\r
+<HR>\r
+\r
+<H2><A name=running></A><FONT color=#00006a>Running Imach with this \r
+example</FONT></H2>\r
+<P>We assume that you have already typed your <A \r
+href="http://euroreves.ined.fr/imach/doc/biaspar.imach">1st_example parameter \r
+file</A> as explained <A \r
+href="http://euroreves.ined.fr/imach/doc/imach.htm#biaspar">above</A>. To run \r
+the program under Windows you should either: </P>\r
+<UL>\r
+  <LI>click on the imach.exe icon and either: \r
+  <UL>\r
+    <LI>enter the name of the parameter file which is for example \r
+    <TT>C:\home\myname\lsoa\biaspar.imach</TT> \r
+    <LI>or locate the biaspar.imach icon in your folder such as \r
+    <TT>C:\home\myname\lsoa</TT> and drag it, with your mouse, on the already \r
+    open imach window. </LI></UL>\r
+  <LI>With version (0.97b) if you ran setup at installation, Windows is supposed \r
+  to understand the ".imach" extension and you can right click the biaspar.imach \r
+  icon and either edit with wordpad (better than notepad) the parameter file or \r
+  execute it with IMaCh. </LI></UL>\r
+<P>The time to converge depends on the step unit used (1 month is more \r
+precise but more cpu time consuming), on the number of cases, and on the number of \r
+variables (covariates). \r
+<P>The program outputs many files. Most of them are files which will be plotted \r
+for better understanding. </P>To run under Linux is mostly the same. \r
+<P>It is no more difficult to run IMaCh on a MacIntosh. \r
+<HR>\r
+\r
+<H2><A name=output><FONT color=#00006a>Output of the program and graphs</FONT> \r
+</A></H2>\r
+<P>Once the optimization is finished (once the convergence is reached), many \r
+tables and graphics are produced.\r
+<P>The IMaCh program will create a subdirectory with the same name as your \r
+parameter file (here mypar) where all the tables and figures will be \r
+stored.<BR>Important files like the log file and the output parameter file \r
+(the latter contains the maximum likelihood estimates) are stored at\r
+the main level not in this subdirectory. Files with extension .log and\r
+.txt can be edited with a standard editor like wordpad or notepad or\r
+even can be viewed with a browser like Internet Explorer or Mozilla. \r
+<P>The main html file is also named with the same name <A \r
+href="http://euroreves.ined.fr/imach/doc/biaspar.htm">biaspar.htm</A>. You can \r
+click on it by holding your shift key in order to open it in another window \r
+(Windows). \r
+<P>Our grapher is Gnuplot, an interactive plotting program (GPL) which can \r
+also work in batch mode. A gnuplot reference manual is available <A \r
+href="http://www.gnuplot.info/">here</A>. <BR>When the run is finished, and in \r
+order that the window doesn't disappear, the user should enter a character like \r
+<TT>q</TT> for quitting. <BR>These characters are:<BR></P>\r
+<UL>\r
+  <LI>'e' for opening the main result html file <A \r
+  href="http://euroreves.ined.fr/imach/doc/biaspar.htm"><STRONG>biaspar.htm</STRONG></A> \r
+  file to edit the output files and graphs. \r
+  <LI>'g' to graph again \r
+  <LI>'c' to start again the program from the beginning. \r
+  <LI>'q' for exiting. </LI></UL>The main gnuplot file is named \r
+<TT>biaspar.gp</TT> and can be edited (right click) and run again. \r
+<P>Gnuplot is easy and you can use it to make more complex graphs. Just click on \r
+gnuplot and type plot sin(x) to see how easy it is. \r
+<H5><FONT size=4><STRONG>Results files </STRONG></FONT><BR><BR><FONT \r
+color=#ec5e5e size=3><STRONG>- </STRONG></FONT><A \r
+name="cross-sectional prevalence in each state"><FONT color=#ec5e5e \r
+size=3><STRONG>cross-sectional prevalence in each state</STRONG></FONT></A><FONT \r
+color=#ec5e5e size=3><STRONG> (and at first pass)</STRONG></FONT><B>: </B><A \r
+href="http://euroreves.ined.fr/imach/doc/biaspar/prbiaspar.txt"><B>biaspar/prbiaspar.txt</B></A><BR></H5>\r
+<P>The first line is the title and displays each field of the file. First column \r
+corresponds to age. Fields 2 and 6 are the proportion of individuals in states 1 \r
+and 2 respectively as observed at first exam. Others fields are the numbers of \r
+people in states 1, 2 or more. The number of columns increases if the number of \r
+states is higher than 2.<BR>The header of the file is </P><PRE># Age Prev(1) N(1) N Age Prev(2) N(2) N\r
 70 1.00000 631 631 70 0.00000 0 631\r
 71 0.99681 625 627 71 0.00319 2 627 \r
-72 0.97125 1115 1148 72 0.02875 33 1148 </pre>\r
-\r
-<p>It means that at age 70 (between 70 and 71), the prevalence in state 1 is 1.000\r
-and in state 2 is 0.00 . At age 71 the number of individuals in\r
-state 1 is 625 and in state 2 is 2, hence the total number of\r
-people aged 71 is 625+2=627. <br>\r
-</p>\r
-\r
-<h5><font color="#EC5E5E" size="3"><b>- Estimated parameters and\r
-covariance matrix</b></font><b>: </b><a href="rbiaspar.txt"><b>rbiaspar.imach</b></a></h5>\r
-\r
-<p>This file contains all the maximisation results: </p>\r
-\r
-<pre> -2 log likelihood= 21660.918613445392\r
+72 0.97125 1115 1148 72 0.02875 33 1148 </PRE>\r
+<P>It means that at age 70 (between 70 and 71), the prevalence in state 1 is \r
+1.000 and in state 2 is 0.00 . At age 71 the number of individuals in state 1 is \r
+625 and in state 2 is 2, hence the total number of people aged 71 is 625+2=627. \r
+<BR></P>\r
+<H5><FONT color=#ec5e5e size=3><B>- Estimated parameters and covariance \r
+matrix</B></FONT><B>: </B><A \r
+href="http://euroreves.ined.fr/imach/doc/rbiaspar.txt"><B>rbiaspar.imach</B></A></H5>\r
+<P>This file contains all the maximisation results: </P><PRE> -2 log likelihood= 21660.918613445392\r
  Estimated parameters: a12 = -12.290174 b12 = 0.092161 \r
                        a13 = -9.155590  b13 = 0.046627 \r
                        a21 = -2.629849  b21 = -0.022030 \r
@@ -946,126 +679,103 @@ covariance matrix</b></font><b>: </b><a href="rbiaspar.txt"><b>rbiaspar.imach</b
                     Var(b21) = 1.29229e-004\r
                     Var(a23) = 4.48405e-001\r
                     Var(b23) = 5.85631e-005 \r
- </pre>\r
-\r
-<p>By substitution of these parameters in the regression model,\r
-we obtain the elementary transition probabilities:</p>\r
-\r
-<p><img src="biaspar/pebiaspar11.png" width="400" height="300"></p>\r
-\r
-<h5><font color="#EC5E5E" size="3"><b>- Transition probabilities</b></font><b>:\r
-</b><a href="biaspar/pijrbiaspar.txt"><b>biaspar/pijrbiaspar.txt</b></a></h5>\r
-\r
-<p>Here are the transitions probabilities Pij(x, x+nh). The second\r
-column is the starting age x (from age 95 to 65), the third is age\r
-(x+nh) and the others are the transition probabilities p11, p12, p13,\r
-p21, p22, p23. The first column indicates the value of the covariate\r
-(without any other variable than age it is equal to 1) For example, line 5 of the file\r
-is: </p>\r
-\r
-<pre>1 100 106 0.02655 0.17622 0.79722 0.01809 0.13678 0.84513 </pre>\r
-\r
-<p>and this means: </p>\r
-\r
-<pre>p11(100,106)=0.02655\r
+ </PRE>\r
+<P>By substitution of these parameters in the regression model, we obtain the \r
+elementary transition probabilities:</P>\r
+<P><IMG height=300 \r
+src="Computing Health Expectancies using IMaCh_fichiers/pebiaspar11.png" \r
+width=400></P>\r
+<H5><FONT color=#ec5e5e size=3><B>- Transition probabilities</B></FONT><B>: \r
+</B><A \r
+href="http://euroreves.ined.fr/imach/doc/biaspar/pijrbiaspar.txt"><B>biaspar/pijrbiaspar.txt</B></A></H5>\r
+<P>Here are the transitions probabilities Pij(x, x+nh). The second column is the \r
+starting age x (from age 95 to 65), the third is age (x+nh) and the others are \r
+the transition probabilities p11, p12, p13, p21, p22, p23. The first column \r
+indicates the value of the covariate (without any other variable than age it is \r
+equal to 1) For example, line 5 of the file is: </P><PRE>1 100 106 0.02655 0.17622 0.79722 0.01809 0.13678 0.84513 </PRE>\r
+<P>and this means: </P><PRE>p11(100,106)=0.02655\r
 p12(100,106)=0.17622\r
 p13(100,106)=0.79722\r
 p21(100,106)=0.01809\r
 p22(100,106)=0.13678\r
-p22(100,106)=0.84513 </pre>\r
-\r
-<h5><font color="#EC5E5E" size="3"><b>- </b></font><a\r
-name="Period prevalence in each state"><font color="#EC5E5E"\r
-size="3"><b>Period prevalence in each state</b></font></a><b>:\r
-</b><a href="biaspar/plrbiaspar.txt"><b>biaspar/plrbiaspar.txt</b></a></h5>\r
-\r
-<pre>#Prevalence\r
+p22(100,106)=0.84513 </PRE>\r
+<H5><FONT color=#ec5e5e size=3><B>- </B></FONT><A \r
+name="Period prevalence in each state"><FONT color=#ec5e5e size=3><B>Period \r
+prevalence in each state</B></FONT></A><B>: </B><A \r
+href="http://euroreves.ined.fr/imach/doc/biaspar/plrbiaspar.txt"><B>biaspar/plrbiaspar.txt</B></A></H5><PRE>#Prevalence\r
 #Age 1-1 2-2\r
 \r
 #************ \r
 70 0.90134 0.09866\r
 71 0.89177 0.10823 \r
 72 0.88139 0.11861 \r
-73 0.87015 0.12985 </pre>\r
-\r
-<p>At age 70 the period prevalence is 0.90134 in state 1 and 0.09866\r
-in state 2. This period prevalence differs from the cross-sectional\r
-prevalence. Here is the point. The cross-sectional prevalence at age\r
-70 results from the incidence of disability, incidence of recovery and\r
-mortality which occurred in the past of the cohort.  Period prevalence\r
-results from a simulation with current incidences of disability,\r
-recovery and mortality estimated from this cross-longitudinal\r
-survey. It is a good predictin of the prevalence in the\r
-future if &quot;nothing changes in the future&quot;. This is exactly\r
-what demographers do with a period life table. Life expectancy is the\r
-expected mean survival time if current mortality rates (age-specific incidences\r
-of mortality) &quot;remain constant&quot; in the future. </p>\r
-\r
-<h5><font color="#EC5E5E" size="3"><b>- Standard deviation of\r
-period prevalence</b></font><b>: </b><a\r
-href="biaspar/vplrbiaspar.txt"><b>biaspar/vplrbiaspar.txt</b></a></h5>\r
-\r
-<p>The period prevalence has to be compared with the cross-sectional\r
-prevalence. But both are statistical estimates and therefore\r
-have confidence intervals.\r
-<br>For the cross-sectional prevalence we generally need information on\r
-the design of the surveys. It is usually not enough to consider the\r
-number of people surveyed at a particular age and to estimate a\r
-Bernouilli confidence interval based on the prevalence at that\r
-age. But you can do it to have an idea of the randomness. At least you\r
-can get a visual appreciation of the randomness by looking at the\r
-fluctuation over ages.\r
-\r
-<p> For the period prevalence it is possible to estimate the\r
-confidence interval from the Hessian matrix (see the publication for\r
-details). We are supposing that the design of the survey will only\r
-alter the weight of each individual. IMaCh is scaling the weights of\r
-individuals-waves contributing to the likelihood by making the sum of\r
-the weights equal to the sum of individuals-waves contributing: a\r
-weighted survey doesn't increase or decrease the size of the survey,\r
-it only give more weights to some individuals and thus less to the\r
-others.\r
-\r
-<h5><font color="#EC5E5E" size="3">-cross-sectional and period\r
-prevalence in state (2=disable) with confidence interval</font>:<b>\r
-</b><a href="biaspar/vbiaspar21.htm"><b>biaspar/vbiaspar21.png</b></a></h5>\r
-\r
-<p>This graph exhibits the period prevalence in state (2) with the\r
-confidence interval in red. The green curve is the observed prevalence\r
-(or proportion of individuals in state (2)).  Without discussing the\r
-results (it is not the purpose here), we observe that the green curve\r
-is rather below the period prevalence. It the data where not biased by\r
-the non inclusion of people living in institutions we would have\r
-concluded that the prevalence of disability will increase in the\r
-future (see the main publication if you are interested in real data\r
-and results which are opposite).</p>\r
-\r
-<p><img src="biaspar/vbiaspar21.png" width="400" height="300"></p>\r
-\r
-<h5><font color="#EC5E5E" size="3"><b>-Convergence to the\r
-period prevalence of disability</b></font><b>: </b><a\r
-href="biaspar/pbiaspar11.png"><b>biaspar/pbiaspar11.png</b></a><br>\r
-<img src="biaspar/pbiaspar11.png" width="400" height="300"> </h5>\r
-\r
-<p>This graph plots the conditional transition probabilities from\r
-an initial state (1=healthy in red at the bottom, or 2=disable in\r
-green on top) at age <em>x </em>to the final state 2=disable<em> </em>at\r
-age <em>x+h. </em>Conditional means at the condition to be alive\r
-at age <em>x+h </em>which is <i>hP12x</i> + <em>hP22x</em>. The\r
-curves <i>hP12x/(hP12x</i> + <em>hP22x) </em>and <i>hP22x/(hP12x</i>\r
-+ <em>hP22x) </em>converge with <em>h, </em>to the <em>period\r
-prevalence of disability</em>. In order to get the period\r
-prevalence at age 70 we should start the process at an earlier\r
-age, i.e.50. If the disability state is defined by severe\r
-disability criteria with only a few chance to recover, then the\r
-incidence of recovery is low and the time to convergence is\r
-probably longer. But we don't have experience yet.</p>\r
-\r
-<h5><font color="#EC5E5E" size="3"><b>- Life expectancies by age\r
-and initial health status with standard deviation</b></font><b>: </b><a\r
-href="biaspar/erbiaspar.txt"><b>biaspar/erbiaspar.txt</b></a></h5>\r
-\r
-<pre># Health expectancies \r
+73 0.87015 0.12985 </PRE>\r
+<P>At age 70 the period prevalence is 0.90134 in state 1 and 0.09866 in state 2. \r
+This period prevalence differs from the cross-sectional prevalence and\r
+we explaining. The cross-sectional prevalence at age 70 results from\r
+the incidence of disability, incidence of recovery and mortality which\r
+occurred in the past for the cohort. Period prevalence results from a\r
+simulation with current incidences of disability, recovery and\r
+mortality estimated from this cross-longitudinal survey. It is a good\r
+prediction of the prevalence in the future if "nothing changes in the\r
+future". This is exactly what demographers do with a period life\r
+table. Life expectancy is the expected mean survival time if current\r
+mortality rates (age-specific incidences of mortality) "remain\r
+constant" in the future. \r
+</P>\r
+<H5><FONT color=#ec5e5e size=3><B>- Standard deviation of period \r
+prevalence</B></FONT><B>: </B><A \r
+href="http://euroreves.ined.fr/imach/doc/biaspar/vplrbiaspar.txt"><B>biaspar/vplrbiaspar.txt</B></A></H5>\r
+<P>The period prevalence has to be compared with the cross-sectional prevalence. \r
+But both are statistical estimates and therefore have confidence intervals. \r
+<BR>For the cross-sectional prevalence we generally need information on the \r
+design of the surveys. It is usually not enough to consider the number of people \r
+surveyed at a particular age and to estimate a Bernouilli confidence interval \r
+based on the prevalence at that age. But you can do it to have an idea of the \r
+randomness. At least you can get a visual appreciation of the randomness by \r
+looking at the fluctuation over ages. \r
+<P>For the period prevalence it is possible to estimate the confidence interval \r
+from the Hessian matrix (see the publication for details). We are supposing that \r
+the design of the survey will only alter the weight of each individual. IMaCh \r
+scales the weights of individuals-waves contributing to the likelihood by \r
+making the sum of the weights equal to the sum of individuals-waves \r
+contributing: a weighted survey doesn't increase or decrease the size of the \r
+survey, it only give more weight to some individuals and thus less to the \r
+others. \r
+<H5><FONT color=#ec5e5e size=3>-cross-sectional and period prevalence in state \r
+(2=disable) with confidence interval</FONT>:<B> </B><A \r
+href="http://euroreves.ined.fr/imach/doc/biaspar/vbiaspar21.htm"><B>biaspar/vbiaspar21.png</B></A></H5>\r
+<P>This graph exhibits the period prevalence in state (2) with the confidence \r
+interval in red. The green curve is the observed prevalence (or proportion of \r
+individuals in state (2)). Without discussing the results (it is not the purpose \r
+here), we observe that the green curve is somewhat below the period\r
+prevalence. If the data were not biased by the non inclusion of people\r
+living in institutions we would have concluded that the prevalence of\r
+disability will increase in the future (see the main publication if\r
+you are interested in real data and results which are opposite).</P>\r
+<P><IMG height=300 \r
+src="Computing Health Expectancies using IMaCh_fichiers/vbiaspar21.png" \r
+width=400></P>\r
+<H5><FONT color=#ec5e5e size=3><B>-Convergence to the period prevalence of \r
+disability</B></FONT><B>: </B><A \r
+href="Computing Health Expectancies using IMaCh_fichiers/pbiaspar11.png"><B>biaspar/pbiaspar11.png</B></A><BR><IMG \r
+height=300 \r
+src="Computing Health Expectancies using IMaCh_fichiers/pbiaspar11.png" \r
+width=400> </H5>\r
+<P>This graph plots the conditional transition probabilities from an initial \r
+state (1=healthy in red at the bottom, or 2=disabled in green on the top) at age \r
+<EM>x </EM>to the final state 2=disabled<EM> </EM>at age <EM>x+h\r
+</EM> where conditional means conditional on being alive at age <EM>x+h </EM>which is \r
+<I>hP12x</I> + <EM>hP22x</EM>. The curves <I>hP12x/(hP12x</I> + <EM>hP22x) \r
+</EM>and <I>hP22x/(hP12x</I> + <EM>hP22x) </EM>converge with <EM>h, </EM>to the \r
+<EM>period prevalence of disability</EM>. In order to get the period prevalence \r
+at age 70 we should start the process at an earlier age, i.e.50. If the \r
+disability state is defined by severe disability criteria with only a\r
+small chance of recovering, then the incidence of recovery is low and the time to convergence is \r
+probably longer. But we don't have experience of this yet.</P>\r
+<H5><FONT color=#ec5e5e size=3><B>- Life expectancies by age and initial health \r
+status with standard deviation</B></FONT><B>: </B><A \r
+href="http://euroreves.ined.fr/imach/doc/biaspar/erbiaspar.txt"><B>biaspar/erbiaspar.txt</B></A></H5><PRE># Health expectancies \r
 # Age 1-1 (SE) 1-2 (SE) 2-1 (SE) 2-2 (SE)\r
  70   11.0180 (0.1277)    3.1950 (0.3635)    4.6500 (0.0871)    4.4807 (0.2187)\r
  71   10.4786 (0.1184)    3.2093 (0.3212)    4.3384 (0.0875)    4.4820 (0.2076)\r
@@ -1079,304 +789,215 @@ href="biaspar/erbiaspar.txt"><b>biaspar/erbiaspar.txt</b></a></h5>
  79    6.7464 (0.0867)    3.3220 (0.1124)    2.3794 (0.1112)    4.4646 (0.1364)\r
  80    6.3538 (0.0868)    3.3354 (0.1014)    2.1949 (0.1168)    4.4587 (0.1331)\r
  81    5.9775 (0.0873)    3.3484 (0.0933)    2.0222 (0.1230)    4.4520 (0.1320)\r
-</pre>\r
-\r
-<pre>For example  70  11.0180 (0.1277) 3.1950 (0.3635) 4.6500 (0.0871)  4.4807 (0.2187)\r
+</PRE><PRE>For example  70  11.0180 (0.1277) 3.1950 (0.3635) 4.6500 (0.0871)  4.4807 (0.2187)\r
 means\r
-e11=11.0180 e12=3.1950 e21=4.6500 e22=4.4807 </pre>\r
-\r
-<pre><img src="biaspar/expbiaspar21.png" width="400" height="300"><img\r
-src="biaspar/expbiaspar11.png" width="400" height="300"></pre>\r
-\r
-<p>For example, life expectancy of a healthy individual at age 70\r
-is 11.0 in the healthy state and 3.2 in the disability state\r
-(total of 14.2 years). If he was disable at age 70, his life expectancy\r
-will be shorter, 4.65 years in the healthy state and 4.5 in the\r
-disability state (=9.15 years). The total life expectancy is a\r
-weighted mean of both, 14.2 and 9.15. The weight is the proportion\r
-of people disabled at age 70. In order to get a period index\r
-(i.e. based only on incidences) we use the <a\r
-href="#Period prevalence in each state">stable or\r
-period prevalence</a> at age 70 (i.e. computed from\r
-incidences at earlier ages) instead of the <a\r
-href="#cross-sectional prevalence in each state">cross-sectional prevalence</a>\r
-(observed for example at first medical exam) (<a href="#Health expectancies">see\r
-below</a>).</p>\r
-\r
-<h5><font color="#EC5E5E" size="3"><b>- Variances of life\r
-expectancies by age and initial health status</b></font><b>: </b><a\r
-href="biaspar/vrbiaspar.txt"><b>biaspar/vrbiaspar.txt</b></a></h5>\r
-\r
-<p>For example, the covariances of life expectancies Cov(ei,ej)\r
-at age 50 are (line 3) </p>\r
-\r
-<pre>   Cov(e1,e1)=0.4776  Cov(e1,e2)=0.0488=Cov(e2,e1)  Cov(e2,e2)=0.0424</pre>\r
-\r
-<h5><font color="#EC5E5E" size="3"><b>-Variances of one-step\r
-probabilities </b></font><b>: </b><a href="biaspar/probrbiaspar.txt"><b>biaspar/probrbiaspar.txt</b></a></h5>\r
-\r
-<p>For example, at age 65</p>\r
-\r
-<pre>   p11=9.960e-001 standard deviation of p11=2.359e-004</pre>\r
-\r
-<h5><font color="#EC5E5E" size="3"><b>- </b></font><a\r
-name="Health expectancies"><font color="#EC5E5E" size="3"><b>Health\r
-expectancies</b></font></a><font color="#EC5E5E" size="3"><b>\r
-with standard errors in parentheses</b></font><b>: </b><a\r
-href="biaspar/trbiaspar.txt"><font face="Courier New"><b>biaspar/trbiaspar.txt</b></font></a></h5>\r
-\r
-<pre>#Total LEs with variances: e.. (std) e.1 (std) e.2 (std) </pre>\r
-\r
-<pre>70 13.26 (0.22) 9.95 (0.20) 3.30 (0.14) </pre>\r
-\r
-<p>Thus, at age 70 the total life expectancy, e..=13.26 years is\r
-the weighted mean of e1.=13.46 and e2.=11.35 by the period\r
-prevalences at age 70 which are 0.90134 in state 1 and 0.09866 in\r
-state 2 respectively (the sum is equal to one). e.1=9.95 is the\r
-Disability-free life expectancy at age 70 (it is again a weighted\r
-mean of e11 and e21). e.2=3.30 is also the life expectancy at age\r
-70 to be spent in the disability state.</p>\r
-\r
-<h5><font color="#EC5E5E" size="3"><b>-Total life expectancy by\r
-age and health expectancies in states (1=healthy) and (2=disable)</b></font><b>:\r
-</b><a href="biaspar/ebiaspar1.png"><b>biaspar/ebiaspar1.png</b></a></h5>\r
-\r
-<p>This figure represents the health expectancies and the total\r
-life expectancy with a confidence interval (dashed line). </p>\r
-\r
-<pre>        <img src="biaspar/ebiaspar1.png" width="400" height="300"></pre>\r
-\r
-<p>Standard deviations (obtained from the information matrix of\r
-the model) of these quantities are very useful.\r
-Cross-longitudinal surveys are costly and do not involve huge\r
-samples, generally a few thousands; therefore it is very\r
-important to have an idea of the standard deviation of our\r
-estimates. It has been a big challenge to compute the Health\r
-Expectancy standard deviations. Don't be confuse: life expectancy\r
-is, as any expected value, the mean of a distribution; but here\r
-we are not computing the standard deviation of the distribution,\r
-but the standard deviation of the estimate of the mean.</p>\r
-\r
-<p>Our health expectancies estimates vary according to the sample\r
-size (and the standard deviations give confidence intervals of\r
-the estimates) but also according to the model fitted. Let us\r
-explain it in more details.</p>\r
-\r
-<p>Choosing a model means at least two kind of choices. At first we\r
-have to decide the number of disability states. And at second we have to\r
-design, within the logit model family, the model itself: variables,\r
-covariables, confounding factors etc. to be included.</p>\r
-\r
-<p>More disability states we have, better is our demographical\r
-approach of the disability process, but smaller are the number of\r
-transitions between each state and higher is the noise in the\r
-measurement. We do not have enough experiments of the various\r
-models to summarize the advantages and disadvantages, but it is\r
-important to say that even if we had huge and unbiased samples,\r
-the total life expectancy computed from a cross-longitudinal\r
-survey, varies with the number of states. If we define only two\r
-states, alive or dead, we find the usual life expectancy where it\r
-is assumed that at each age, people are at the same risk to die.\r
-If we are differentiating the alive state into healthy and\r
-disable, and as the mortality from the disability state is higher\r
-than the mortality from the healthy state, we are introducing\r
-heterogeneity in the risk of dying. The total mortality at each\r
-age is the weighted mean of the mortality in each state by the\r
-prevalence in each state. Therefore if the proportion of people\r
-at each age and in each state is different from the period\r
-equilibrium, there is no reason to find the same total mortality\r
-at a particular age. Life expectancy, even if it is a very useful\r
-tool, has a very strong hypothesis of homogeneity of the\r
-population. Our main purpose is not to measure differential\r
-mortality but to measure the expected time in a healthy or\r
-disability state in order to maximise the former and minimize the\r
-latter. But the differential in mortality complexifies the\r
-measurement.</p>\r
-\r
-<p>Incidences of disability or recovery are not affected by the number\r
-of states if these states are independent. But incidences estimates\r
-are dependent on the specification of the model. More covariates we\r
-added in the logit model better is the model, but some covariates are\r
-not well measured, some are confounding factors like in any\r
-statistical model. The procedure to &quot;fit the best model' is\r
-similar to logistic regression which itself is similar to regression\r
-analysis. We haven't yet been sofar because we also have a severe\r
-limitation which is the speed of the convergence. On a Pentium III,\r
-500 MHz, even the simplest model, estimated by month on 8,000 people\r
-may take 4 hours to converge.  Also, the IMaCh program is not a\r
-statistical package, and does not allow sophisticated design\r
-variables. If you need sophisticated design variable you have to them\r
-your self and and add them as ordinary variables. IMaCX allows up to 8\r
-variables. The current version of this program allows only to add\r
-simple variables like age+sex or age+sex+ age*sex but will never be\r
-general enough. But what is to remember, is that incidences or\r
-probability of change from one state to another is affected by the\r
-variables specified into the model.</p>\r
-\r
-<p>Also, the age range of the people interviewed is linked \r
-the age range of the life expectancy which can be estimated by\r
-extrapolation. If your sample ranges from age 70 to 95, you can\r
-clearly estimate a life expectancy at age 70 and trust your\r
-confidence interval because it is mostly based on your sample size,\r
-but if you want to estimate the life expectancy at age 50, you\r
-should rely in the design of your model. Fitting a logistic model on a age\r
-range of 70 to 95 and estimating probabilties of transition out of\r
-this age range, say at age 50, is very dangerous. At least you\r
-should remember that the confidence interval given by the\r
-standard deviation of the health expectancies, are under the\r
-strong assumption that your model is the 'true model', which is\r
-probably not the case outside the age range of your sample.</p>\r
-\r
-<h5><font color="#EC5E5E" size="3"><b>- Copy of the parameter\r
-file</b></font><b>: </b><a href="orbiaspar.txt"><b>orbiaspar.txt</b></a></h5>\r
-\r
-<p>This copy of the parameter file can be useful to re-run the\r
-program while saving the old output files. </p>\r
-\r
-<h5><font color="#EC5E5E" size="3"><b>- Prevalence forecasting</b></font><b>:\r
-</b><a href="biaspar/frbiaspar.txt"><b>biaspar/frbiaspar.txt</b></a></h5>\r
-\r
-<p>\r
-\r
-First,\r
-we have estimated the observed prevalence between 1/1/1984 and\r
-1/6/1988 (June, European syntax of dates). The mean date of all interviews (weighted average of the\r
-interviews performed between 1/1/1984 and 1/6/1988) is estimated\r
-to be 13/9/1985, as written on the top on the file. Then we\r
-forecast the probability to be in each state. </p>\r
-\r
-<p>\r
-For example on 1/1/1989 : </p>\r
-\r
-<pre class="MsoNormal"># StartingAge FinalAge P.1 P.2 P.3\r
+e11=11.0180 e12=3.1950 e21=4.6500 e22=4.4807 </PRE><PRE><IMG height=300 src="Computing Health Expectancies using IMaCh_fichiers/expbiaspar21.png" width=400><IMG height=300 src="Computing Health Expectancies using IMaCh_fichiers/expbiaspar11.png" width=400></PRE>\r
+<P>For example, life expectancy of a healthy individual at age 70 is 11.0 in the \r
+healthy state and 3.2 in the disability state (total of 14.2 years). If he was \r
+disabled at age 70, his life expectancy will be shorter, 4.65 years in the \r
+healthy state and 4.5 in the disability state (=9.15 years). The total life \r
+expectancy is a weighted mean of both, 14.2 and 9.15. The weight is the \r
+proportion of people disabled at age 70. In order to get a period index (i.e. \r
+based only on incidences) we use the <A \r
+href="http://euroreves.ined.fr/imach/doc/imach.htm#Period prevalence in each state">stable \r
+or period prevalence</A> at age 70 (i.e. computed from incidences at earlier \r
+ages) instead of the <A \r
+href="http://euroreves.ined.fr/imach/doc/imach.htm#cross-sectional prevalence in each state">cross-sectional \r
+prevalence</A> (observed for example at first interview) (<A \r
+href="http://euroreves.ined.fr/imach/doc/imach.htm#Health expectancies">see \r
+below</A>).</P>\r
+<H5><FONT color=#ec5e5e size=3><B>- Variances of life expectancies by age and \r
+initial health status</B></FONT><B>: </B><A \r
+href="http://euroreves.ined.fr/imach/doc/biaspar/vrbiaspar.txt"><B>biaspar/vrbiaspar.txt</B></A></H5>\r
+<P>For example, the covariances of life expectancies Cov(ei,ej) at age 50 are \r
+(line 3) </P><PRE>   Cov(e1,e1)=0.4776  Cov(e1,e2)=0.0488=Cov(e2,e1)  Cov(e2,e2)=0.0424</PRE>\r
+<H5><FONT color=#ec5e5e size=3><B>-Variances of one-step probabilities \r
+</B></FONT><B>: </B><A \r
+href="http://euroreves.ined.fr/imach/doc/biaspar/probrbiaspar.txt"><B>biaspar/probrbiaspar.txt</B></A></H5>\r
+<P>For example, at age 65</P><PRE>   p11=9.960e-001 standard deviation of p11=2.359e-004</PRE>\r
+<H5><FONT color=#ec5e5e size=3><B>- </B></FONT><A \r
+name="Health expectancies"><FONT color=#ec5e5e size=3><B>Health \r
+expectancies</B></FONT></A><FONT color=#ec5e5e size=3><B> with standard errors \r
+in parentheses</B></FONT><B>: </B><A \r
+href="http://euroreves.ined.fr/imach/doc/biaspar/trbiaspar.txt"><FONT \r
+face="Courier New"><B>biaspar/trbiaspar.txt</B></FONT></A></H5><PRE>#Total LEs with variances: e.. (std) e.1 (std) e.2 (std) </PRE><PRE>70 13.26 (0.22) 9.95 (0.20) 3.30 (0.14) </PRE>\r
+<P>Thus, at age 70 the total life expectancy, e..=13.26 years is the weighted \r
+mean of e1.=13.46 and e2.=11.35 by the period prevalences at age 70 which are \r
+0.90134 in state 1 and 0.09866 in state 2 respectively (the sum is equal to \r
+one). e.1=9.95 is the Disability-free life expectancy at age 70 (it is again a \r
+weighted mean of e11 and e21). e.2=3.30 is also the life expectancy at age 70 to \r
+be spent in the disability state.</P>\r
+<H5><FONT color=#ec5e5e size=3><B>-Total life expectancy by age and health \r
+expectancies in states (1=healthy) and (2=disable)</B></FONT><B>: </B><A \r
+href="Computing Health Expectancies using IMaCh_fichiers/ebiaspar1.png"><B>biaspar/ebiaspar1.png</B></A></H5>\r
+<P>This figure represents the health expectancies and the total life expectancy \r
+with a confidence interval (dashed line). </P><PRE>        <IMG height=300 src="Computing Health Expectancies using IMaCh_fichiers/ebiaspar1.png" width=400></PRE>\r
+<P>Standard deviations (obtained from the information matrix of the model) of \r
+these quantities are very useful. Cross-longitudinal surveys are costly and do \r
+not involve huge samples, generally a few thousands; therefore it is very \r
+important to have an idea of the standard deviation of our estimates. It has \r
+been a big challenge to compute the Health Expectancy standard deviations. Don't \r
+be confused: life expectancy is, as any expected value, the mean of a \r
+distribution; but here we are not computing the standard deviation of the \r
+distribution, but the standard deviation of the estimate of the mean.</P>\r
+<P>Our health expectancy estimates vary according to the sample size (and the \r
+standard deviations give confidence intervals of the estimates) but also \r
+according to the model fitted. We explain this in more detail.</P>\r
+<P>Choosing a model means at least two kind of choices. First we have to \r
+decide the number of disability states. And second we have to design, within \r
+the logit model family, the model itself: variables, covariates, confounding \r
+factors etc. to be included.</P>\r
+<P>The more disability states we have, the better is our demographical\r
+approximation of the disability process, but the smaller the number of\r
+transitions between each state and the higher the noise in the\r
+measurement. We have not experimented enough with the various models\r
+to summarize the advantages and disadvantages, but it is important to\r
+note that even if we had huge unbiased samples, the total life\r
+expectancy computed from a cross-longitudinal survey would vary with\r
+the number of states. If we define only two states, alive or dead, we\r
+find the usual life expectancy where it is assumed that at each age,\r
+people are at the same risk of dying. If we are differentiating the\r
+alive state into healthy and disabled, and as mortality from the\r
+disabled state is higher than mortality from the healthy state, we are\r
+introducing heterogeneity in the risk of dying. The total mortality at\r
+each age is the weighted mean of the mortality from each state by the\r
+prevalence of each state. Therefore if the proportion of people at each age and \r
+in each state is different from the period equilibrium, there is no reason to \r
+find the same total mortality at a particular age. Life expectancy, even if it \r
+is a very useful tool, has a very strong hypothesis of homogeneity of the \r
+population. Our main purpose is not to measure differential mortality but to \r
+measure the expected time in a healthy or disabled state in order to maximise \r
+the former and minimize the latter. But the differential in mortality \r
+complicates the measurement.</P>\r
+<P>Incidences of disability or recovery are not affected by the number of states \r
+if these states are independent. But incidence estimates are dependent on the \r
+specification of the model. The more covariates we add in the logit\r
+model the better \r
+is the model, but some covariates are not well measured, some are confounding \r
+factors like in any statistical model. The procedure to "fit the best model' is \r
+similar to logistic regression which itself is similar to regression analysis. \r
+We haven't yet been sofar because we also have a severe limitation which is the \r
+speed of the convergence. On a Pentium III, 500 MHz, even the simplest model, \r
+estimated by month on 8,000 people may take 4 hours to converge. Also, the IMaCh \r
+program is not a statistical package, and does not allow sophisticated design \r
+variables. If you need sophisticated design variable you have to them your self \r
+and and add them as ordinary variables. IMaCh allows up to 8 variables. The \r
+current version of this program allows only to add simple variables like age+sex \r
+or age+sex+ age*sex but will never be general enough. But what is to remember, \r
+is that incidences or probability of change from one state to another is \r
+affected by the variables specified into the model.</P>\r
+<P>Also, the age range of the people interviewed is linked the age range of the \r
+life expectancy which can be estimated by extrapolation. If your sample ranges \r
+from age 70 to 95, you can clearly estimate a life expectancy at age 70 and \r
+trust your confidence interval because it is mostly based on your sample size, \r
+but if you want to estimate the life expectancy at age 50, you should rely in \r
+the design of your model. Fitting a logistic model on a age range of 70 to 95 \r
+and estimating probabilties of transition out of this age range, say at age 50, \r
+is very dangerous. At least you should remember that the confidence interval \r
+given by the standard deviation of the health expectancies, are under the strong \r
+assumption that your model is the 'true model', which is probably not the case \r
+outside the age range of your sample.</P>\r
+<H5><FONT color=#ec5e5e size=3><B>- Copy of the parameter file</B></FONT><B>: \r
+</B><A \r
+href="http://euroreves.ined.fr/imach/doc/orbiaspar.txt"><B>orbiaspar.txt</B></A></H5>\r
+<P>This copy of the parameter file can be useful to re-run the program while \r
+saving the old output files. </P>\r
+<H5><FONT color=#ec5e5e size=3><B>- Prevalence forecasting</B></FONT><B>: </B><A \r
+href="http://euroreves.ined.fr/imach/doc/biaspar/frbiaspar.txt"><B>biaspar/frbiaspar.txt</B></A></H5>\r
+<P>First, we have estimated the observed prevalence between 1/1/1984 and \r
+1/6/1988 (June, European syntax of dates). The mean date of all interviews \r
+(weighted average of the interviews performed between 1/1/1984 and 1/6/1988) is \r
+estimated to be 13/9/1985, as written on the top on the file. Then we forecast \r
+the probability to be in each state. </P>\r
+<P>For example on 1/1/1989 : </P><PRE class=MsoNormal># StartingAge FinalAge P.1 P.2 P.3\r
 # Forecasting at date 1/1/1989\r
-  73 0.807 0.078 0.115</pre>\r
-\r
-<p>\r
-\r
-Since the minimum age is 70 on the 13/9/1985, the youngest forecasted\r
-age is 73. This means that at age a person aged 70 at 13/9/1989 has a\r
-probability to enter state1 of 0.807 at age 73 on 1/1/1989.\r
-Similarly, the probability to be in state 2 is 0.078 and the\r
-probability to die is 0.115. Then, on the 1/1/1989, the prevalence of\r
-disability at age 73 is estimated to be 0.088.</p>\r
-\r
-<h5><font color="#EC5E5E" size="3"><b>- Population forecasting</b></font><b>:\r
-</b><a href="biaspar/poprbiaspar.txt"><b>biaspar/poprbiaspar.txt</b></a></h5>\r
-\r
-<pre># Age P.1 P.2 P.3 [Population]\r
+  73 0.807 0.078 0.115</PRE>\r
+<P>Since the minimum age is 70 on the 13/9/1985, the youngest forecasted age is \r
+73. This means that at age a person aged 70 at 13/9/1989 has a probability to \r
+enter state1 of 0.807 at age 73 on 1/1/1989. Similarly, the probability to be in \r
+state 2 is 0.078 and the probability to die is 0.115. Then, on the 1/1/1989, the \r
+prevalence of disability at age 73 is estimated to be 0.088.</P>\r
+<H5><FONT color=#ec5e5e size=3><B>- Population forecasting</B></FONT><B>: </B><A \r
+href="http://euroreves.ined.fr/imach/doc/biaspar/poprbiaspar.txt"><B>biaspar/poprbiaspar.txt</B></A></H5><PRE># Age P.1 P.2 P.3 [Population]\r
 # Forecasting at date 1/1/1989 \r
 75 572685.22 83798.08 \r
 74 621296.51 79767.99 \r
-73 645857.70 69320.60 </pre>\r
-\r
-<pre># Forecasting at date 1/1/19909 \r
+73 645857.70 69320.60 </PRE><PRE># Forecasting at date 1/1/19909 \r
 76 442986.68 92721.14 120775.48\r
 75 487781.02 91367.97 121915.51\r
-74 512892.07 85003.47 117282.76 </pre>\r
-\r
-<p>From the population file, we estimate the number of people in\r
-each state. At age 73, 645857 persons are in state 1 and 69320\r
-are in state 2. One year latter, 512892 are still in state 1,\r
-85003 are in state 2 and 117282 died before 1/1/1990.</p>\r
-\r
-<hr>\r
-\r
-<h2><a name="example"></a><font color="#00006A">Trying an example</font></h2>\r
-\r
-<p>Since you know how to run the program, it is time to test it\r
-on your own computer. Try for example on a parameter file named <a\r
-href="imachpar.imach">imachpar.imach</a> which is a copy\r
-of <font size="2" face="Courier New">mypar.imach</font> included\r
-in the subdirectory of imach, <font size="2" face="Courier New">mytry</font>.\r
-Edit it and change the name of the data file to <font size="2"\r
-face="Courier New">mydata.txt</font> if you don't want to\r
-copy it on the same directory. The file <font face="Courier New">mydata.txt</font>\r
-is a smaller file of 3,000 people but still with 4 waves. </p>\r
-\r
-<p>Right click on the .imach file and a window will popup with the\r
-string '<strong>Enter the parameter file name:'</strong></p>\r
-\r
-<table border="1">\r
-    <tr>\r
-        <td width="100%"><strong>IMACH, Version 0.97b</strong><p><strong>Enter\r
-        the parameter file name: imachpar.imach</strong></p>\r
-        </td>\r
-    </tr>\r
-</table>\r
-\r
-<p>Most of the data files or image files generated, will use the\r
-'imachpar' string into their name. The running time is about 2-3\r
-minutes on a Pentium III. If the execution worked correctly, the\r
-outputs files are created in the current directory, and should be\r
-the same as the mypar files initially included in the directory <font\r
-size="2" face="Courier New">mytry</font>.</p>\r
-\r
-<ul>\r
-    <li><pre><u>Output on the screen</u> The output screen looks like <a\r
-href="biaspar.log">biaspar.log</a>\r
+74 512892.07 85003.47 117282.76 </PRE>\r
+<P>From the population file, we estimate the number of people in each state. At \r
+age 73, 645857 persons are in state 1 and 69320 are in state 2. One year latter, \r
+512892 are still in state 1, 85003 are in state 2 and 117282 died before \r
+1/1/1990.</P>\r
+<HR>\r
+\r
+<H2><A name=example></A><FONT color=#00006a>Trying an example</FONT></H2>\r
+<P>Since you know how to run the program, it is time to test it on your own \r
+computer. Try for example on a parameter file named <A \r
+href="http://euroreves.ined.fr/imach/doc/imachpar.imach">imachpar.imach</A> \r
+which is a copy of <FONT face="Courier New" size=2>mypar.imach</FONT> included \r
+in the subdirectory of imach, <FONT face="Courier New" size=2>mytry</FONT>. Edit \r
+it and change the name of the data file to <FONT face="Courier New" \r
+size=2>mydata.txt</FONT> if you don't want to copy it on the same directory. The \r
+file <FONT face="Courier New">mydata.txt</FONT> is a smaller file of 3,000 \r
+people but still with 4 waves. </P>\r
+<P>Right click on the .imach file and a window will popup with the string \r
+'<STRONG>Enter the parameter file name:'</STRONG></P>\r
+<TABLE border=1>\r
+  <TBODY>\r
+  <TR>\r
+    <TD width="100%"><STRONG>IMACH, Version 0.97b</STRONG>\r
+      <P><STRONG>Enter the parameter file name: \r
+  imachpar.imach</STRONG></P></TD></TR></TBODY></TABLE>\r
+<P>Most of the data files or image files generated, will use the 'imachpar' \r
+string into their name. The running time is about 2-3 minutes on a Pentium III. \r
+If the execution worked correctly, the outputs files are created in the current \r
+directory, and should be the same as the mypar files initially included in the \r
+directory <FONT face="Courier New" size=2>mytry</FONT>.</P>\r
+<UL>\r
+  <LI><PRE><U>Output on the screen</U> The output screen looks like <A href="http://euroreves.ined.fr/imach/doc/biaspar.log">biaspar.log</A>\r
 #\r
 title=MLE datafile=mydaiata.txt lastobs=3000 firstpass=1 lastpass=3\r
-ftol=1.000000e-008 stepm=24 ncovcol=2 nlstate=2 ndeath=1 maxwav=4 mle=1 weight=0</pre>\r
-    </li>\r
-    <li><pre>Total number of individuals= 2965, Agemin = 70.00, Agemax= 100.92\r
+ftol=1.000000e-008 stepm=24 ncovcol=2 nlstate=2 ndeath=1 maxwav=4 mle=1 weight=0</PRE>\r
+  <LI><PRE>Total number of individuals= 2965, Agemin = 70.00, Agemax= 100.92\r
 \r
 Warning, no any valid information for:126 line=126\r
 Warning, no any valid information for:2307 line=2307\r
 Delay (in months) between two waves Min=21 Max=51 Mean=24.495826\r
-<font face="Times New Roman">These lines give some warnings on the data file and also some raw statistics on frequencies of transitions.</font>\r
+<FONT face="Times New Roman">These lines give some warnings on the data file and also some raw statistics on frequencies of transitions.</FONT>\r
 Age 70 1.=230 loss[1]=3.5% 2.=16 loss[2]=12.5% 1.=222 prev[1]=94.1% 2.=14\r
  prev[2]=5.9% 1-1=8 11=200 12=7 13=15 2-1=2 21=6 22=7 23=1\r
-Age 102 1.=0 loss[1]=NaNQ% 2.=0 loss[2]=NaNQ% 1.=0 prev[1]=NaNQ% 2.=0 </pre>\r
-    </li>\r
-</ul>\r
-It includes some warnings or errors which are very important for\r
-you. Be careful with such warnings because your results may be biased\r
-if, for example, you have people who accepted to be interviewed at\r
-first pass but never after. Or if you don't have the exact month of\r
-death. In such cases IMaCh doesn't take any initiative, it does only\r
-warn you. It is up to you to decide what to do with these\r
-people. Excluding them is usually a wrong decision. It is better to\r
-decide that the month of death is at the mid-interval between the last\r
-two waves for example.<p>\r
-\r
-If you survey suffers from severe attrition, you have to analyse the\r
-characteristics of the lost people and overweight people with same\r
-characteristics for example.\r
-<p>\r
-By default, IMaCH warns and excludes these problematic people, but you\r
-have to be careful with such results.\r
-\r
-<p>&nbsp;</p>\r
-\r
-<ul>\r
-    <li>Maximisation with the Powell algorithm. 8 directions are\r
-        given corresponding to the 8 parameters. this can be\r
-        rather long to get convergence.<br>\r
-        <font size="1" face="Courier New"><br>\r
-        Powell iter=1 -2*LL=11531.405658264877 1 0.000000000000 2\r
-        0.000000000000 3<br>\r
-        0.000000000000 4 0.000000000000 5 0.000000000000 6\r
-        0.000000000000 7 <br>\r
-        0.000000000000 8 0.000000000000<br>\r
-        1..........2.................3..........4.................5.........<br>\r
-        6................7........8...............<br>\r
-        Powell iter=23 -2*LL=6744.954108371555 1 -12.967632334283\r
-        <br>\r
-        2 0.135136681033 3 -7.402109728262 4 0.067844593326 <br>\r
-        5 -0.673601538129 6 -0.006615504377 7 -5.051341616718 <br>\r
-        8 0.051272038506<br>\r
-        1..............2...........3..............4...........<br>\r
-        5..........6................7...........8.........<br>\r
-        #Number of iterations = 23, -2 Log likelihood =\r
-        6744.954042573691<br>\r
-        # Parameters<br>\r
-        12 -12.966061 0.135117 <br>\r
-        13 -7.401109 0.067831 <br>\r
-        21 -0.672648 -0.006627 <br>\r
-        23 -5.051297 0.051271 </font><br>\r
-        </li>\r
-    <li><pre><font size="2">Calculation of the hessian matrix. Wait...\r
+Age 102 1.=0 loss[1]=NaNQ% 2.=0 loss[2]=NaNQ% 1.=0 prev[1]=NaNQ% 2.=0 </PRE></LI></UL>It \r
+includes some warnings or errors which are very important for you. Be careful \r
+with such warnings because your results may be biased if, for example, you have \r
+people who accepted to be interviewed at first pass but never after. Or if you \r
+don't have the exact month of death. In such cases IMaCh doesn't take any \r
+initiative, it does only warn you. It is up to you to decide what to do with \r
+these people. Excluding them is usually a wrong decision. It is better to decide \r
+that the month of death is at the mid-interval between the last two waves for \r
+example.\r
+<P>If you survey suffers from severe attrition, you have to analyse the \r
+characteristics of the lost people and overweight people with same \r
+characteristics for example. \r
+<P>By default, IMaCH warns and excludes these problematic people, but you have \r
+to be careful with such results. \r
+<P>&nbsp;</P>\r
+<UL>\r
+  <LI>Maximisation with the Powell algorithm. 8 directions are given \r
+  corresponding to the 8 parameters. this can be rather long to get \r
+  convergence.<BR><FONT face="Courier New" size=1><BR>Powell iter=1 \r
+  -2*LL=11531.405658264877 1 0.000000000000 2 0.000000000000 3<BR>0.000000000000 \r
+  4 0.000000000000 5 0.000000000000 6 0.000000000000 7 <BR>0.000000000000 8 \r
+  0.000000000000<BR>1..........2.................3..........4.................5.........<BR>6................7........8...............<BR>Powell \r
+  iter=23 -2*LL=6744.954108371555 1 -12.967632334283 <BR>2 0.135136681033 3 \r
+  -7.402109728262 4 0.067844593326 <BR>5 -0.673601538129 6 -0.006615504377 7 \r
+  -5.051341616718 <BR>8 \r
+  0.051272038506<BR>1..............2...........3..............4...........<BR>5..........6................7...........8.........<BR>#Number \r
+  of iterations = 23, -2 Log likelihood = 6744.954042573691<BR># \r
+  Parameters<BR>12 -12.966061 0.135117 <BR>13 -7.401109 0.067831 <BR>21 \r
+  -0.672648 -0.006627 <BR>23 -5.051297 0.051271 </FONT><BR>\r
+  <LI><PRE><FONT size=2>Calculation of the hessian matrix. Wait...\r
 12345678.12.13.14.15.16.17.18.23.24.25.26.27.28.34.35.36.37.38.45.46.47.48.56.57.58.67.68.78\r
 \r
 Inverting the hessian to get the covariance matrix. Wait...\r
@@ -1415,86 +1036,66 @@ Computing Variance-covariance of DFLEs: file 'vrmypar.txt'
 Computing Total LEs with variances: file 'trmypar.txt' \r
 Computing Variance-covariance of Prevalence limit: file 'vplrmypar.txt' \r
 End of Imach\r
-</font></pre>\r
-    </li>\r
-</ul>\r
-\r
-<p><font size="3">Once the running is finished, the program\r
-requires a character:</font></p>\r
-\r
-<table border="1">\r
-    <tr>\r
-        <td width="100%"><strong>Type e to edit output files, g\r
-        to graph again, c to start again, and q for exiting:</strong></td>\r
-    </tr>\r
-</table>\r
-\r
-In order to have an idea of the time needed to reach convergence,\r
-IMaCh gives an estimation if the convergence needs 10, 20 or 30\r
-iterations. It might be useful.\r
-\r
-<p><font size="3">First you should enter <strong>e </strong>to\r
-edit the master file mypar.htm. </font></p>\r
-\r
-<ul>\r
-    <li><u>Outputs files</u> <br>\r
-        <br>\r
-        - Copy of the parameter file: <a href="ormypar.txt">ormypar.txt</a><br>\r
-        - Gnuplot file name: <a href="mypar.gp.txt">mypar.gp.txt</a><br>\r
-        - Cross-sectional prevalence in each state: <a\r
-        href="prmypar.txt">prmypar.txt</a> <br>\r
-        - Period prevalence in each state: <a\r
-        href="plrmypar.txt">plrmypar.txt</a> <br>\r
-        - Transition probabilities: <a href="pijrmypar.txt">pijrmypar.txt</a><br>\r
-        - Life expectancies by age and initial health status\r
-        (estepm=24 months): <a href="ermypar.txt">ermypar.txt</a>\r
-        <br>\r
-        - Parameter file with estimated parameters and the\r
-        covariance matrix: <a href="rmypar.txt">rmypar.txt</a> <br>\r
-        - Variance of one-step probabilities: <a\r
-        href="probrmypar.txt">probrmypar.txt</a> <br>\r
-        - Variances of life expectancies by age and initial\r
-        health status (estepm=24 months): <a href="vrmypar.txt">vrmypar.txt</a><br>\r
-        - Health expectancies with their variances: <a\r
-        href="trmypar.txt">trmypar.txt</a> <br>\r
-        - Standard deviation of period prevalences: <a\r
-        href="vplrmypar.txt">vplrmypar.txt</a> <br>\r
-        No population forecast: popforecast = 0 (instead of 1) or\r
-        stepm = 24 (instead of 1) or model=. (instead of .)<br>\r
-        <br>\r
-        </li>\r
-    <li><u>Graphs</u> <br>\r
-        <br>\r
-        -<a href="../mytry/pemypar1.gif">One-step transition\r
-        probabilities</a><br>\r
-        -<a href="../mytry/pmypar11.gif">Convergence to the\r
-        period prevalence</a><br>\r
-        -<a href="..\mytry\vmypar11.gif">Cross-sectional and period\r
-        prevalence in state (1) with the confident interval</a> <br>\r
-        -<a href="..\mytry\vmypar21.gif">Cross-sectional and period\r
-        prevalence in state (2) with the confident interval</a> <br>\r
-        -<a href="..\mytry\expmypar11.gif">Health life\r
-        expectancies by age and initial health state (1)</a> <br>\r
-        -<a href="..\mytry\expmypar21.gif">Health life\r
-        expectancies by age and initial health state (2)</a> <br>\r
-        -<a href="..\mytry\emypar1.gif">Total life expectancy by\r
-        age and health expectancies in states (1) and (2).</a> </li>\r
-</ul>\r
-\r
-<p>This software have been partly granted by <a\r
-href="http://euroreves.ined.fr">Euro-REVES</a>, a concerted action\r
-from the European Union. Since 2003 it is also partly granted by the\r
-French Institute on Longevity. It will be copyrighted identically to a\r
-GNU software product, i.e. program and software can be distributed\r
-freely for non commercial use. Sources are not widely distributed\r
-today because some part of the codes are copyrighted by Numerical\r
-Recipes in C. You can get our GPL codes by asking us with a simple\r
-justification (name, email, institute) <a\r
-href="mailto:brouard@ined.fr">mailto:brouard@ined.fr</a> and <a\r
-href="mailto:lievre@ined.fr">mailto:lievre@ined.fr</a> .</p>\r
-\r
-<p>Latest version (0.97b of June 2004) can be accessed at <a\r
-href="http://euroreves.ined.fr/imach">http://euroreves.ined.fr/imach</a><br>\r
-</p>\r
-</body>\r
-</html>\r
+</FONT></PRE></LI></UL>\r
+<P><FONT size=3>Once the running is finished, the program requires a \r
+character:</FONT></P>\r
+<TABLE border=1>\r
+  <TBODY>\r
+  <TR>\r
+    <TD width="100%"><STRONG>Type e to edit output files, g to graph again, c \r
+      to start again, and q for exiting:</STRONG></TD></TR></TBODY></TABLE>In order to \r
+have an idea of the time needed to reach convergence, IMaCh gives an estimation \r
+if the convergence needs 10, 20 or 30 iterations. It might be useful. \r
+<P><FONT size=3>First you should enter <STRONG>e </STRONG>to edit the master \r
+file mypar.htm. </FONT></P>\r
+<UL>\r
+  <LI><U>Outputs files</U> <BR><BR>- Copy of the parameter file: <A \r
+  href="http://euroreves.ined.fr/imach/doc/ormypar.txt">ormypar.txt</A><BR>- \r
+  Gnuplot file name: <A \r
+  href="http://euroreves.ined.fr/imach/doc/mypar.gp.txt">mypar.gp.txt</A><BR>- \r
+  Cross-sectional prevalence in each state: <A \r
+  href="http://euroreves.ined.fr/imach/doc/prmypar.txt">prmypar.txt</A> <BR>- \r
+  Period prevalence in each state: <A \r
+  href="http://euroreves.ined.fr/imach/doc/plrmypar.txt">plrmypar.txt</A> <BR>- \r
+  Transition probabilities: <A \r
+  href="http://euroreves.ined.fr/imach/doc/pijrmypar.txt">pijrmypar.txt</A><BR>- \r
+  Life expectancies by age and initial health status (estepm=24 months): <A \r
+  href="http://euroreves.ined.fr/imach/doc/ermypar.txt">ermypar.txt</A> <BR>- \r
+  Parameter file with estimated parameters and the covariance matrix: <A \r
+  href="http://euroreves.ined.fr/imach/doc/rmypar.txt">rmypar.txt</A> <BR>- \r
+  Variance of one-step probabilities: <A \r
+  href="http://euroreves.ined.fr/imach/doc/probrmypar.txt">probrmypar.txt</A> \r
+  <BR>- Variances of life expectancies by age and initial health status \r
+  (estepm=24 months): <A \r
+  href="http://euroreves.ined.fr/imach/doc/vrmypar.txt">vrmypar.txt</A><BR>- \r
+  Health expectancies with their variances: <A \r
+  href="http://euroreves.ined.fr/imach/doc/trmypar.txt">trmypar.txt</A> <BR>- \r
+  Standard deviation of period prevalences: <A \r
+  href="http://euroreves.ined.fr/imach/doc/vplrmypar.txt">vplrmypar.txt</A> \r
+  <BR>No population forecast: popforecast = 0 (instead of 1) or stepm = 24 \r
+  (instead of 1) or model=. (instead of .)<BR><BR>\r
+  <LI><U>Graphs</U> <BR><BR>-<A \r
+  href="http://euroreves.ined.fr/imach/mytry/pemypar1.gif">One-step transition \r
+  probabilities</A><BR>-<A \r
+  href="http://euroreves.ined.fr/imach/mytry/pmypar11.gif">Convergence to the \r
+  period prevalence</A><BR>-<A \r
+  href="http://euroreves.ined.fr/imach/mytry/vmypar11.gif">Cross-sectional and \r
+  period prevalence in state (1) with the confident interval</A> <BR>-<A \r
+  href="http://euroreves.ined.fr/imach/mytry/vmypar21.gif">Cross-sectional and \r
+  period prevalence in state (2) with the confident interval</A> <BR>-<A \r
+  href="http://euroreves.ined.fr/imach/mytry/expmypar11.gif">Health life \r
+  expectancies by age and initial health state (1)</A> <BR>-<A \r
+  href="http://euroreves.ined.fr/imach/mytry/expmypar21.gif">Health life \r
+  expectancies by age and initial health state (2)</A> <BR>-<A \r
+  href="http://euroreves.ined.fr/imach/mytry/emypar1.gif">Total life expectancy \r
+  by age and health expectancies in states (1) and (2).</A> </LI></UL>\r
+<P>This software have been partly granted by <A \r
+href="http://euroreves.ined.fr/">Euro-REVES</A>, a concerted action from the \r
+European Union. It will be copyrighted identically to a GNU software product, \r
+i.e. program and software can be distributed freely for non commercial use. \r
+Sources are not widely distributed today. You can get them by asking us with a \r
+simple justification (name, email, institute) <A \r
+href="mailto:brouard@ined.fr">mailto:brouard@ined.fr</A> and <A \r
+href="mailto:lievre@ined.fr">mailto:lievre@ined.fr</A> .</P>\r
+<P>Latest version (0.97b of June 2004) can be accessed at <A \r
+href="http://euroreves.ined.fr/imach">http://euroreves.ined.fr/imach</A><BR></P></BODY></HTML>\r