Annotation of imach/html/doc/imach.htm, revision 1.6

1.5       lievre      1: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
                      2: <!-- saved from url=(0044)http://euroreves.ined.fr/imach/doc/imach.htm -->
1.6     ! lievre      3: <!-- $Id: imach.htm,v 1.5 2005/06/10 08:54:06 lievre Exp $ --!><HTML><HEAD><TITLE>Computing Health Expectancies using IMaCh</TITLE>
1.5       lievre      4: <META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
                      5: <META content="MSHTML 5.00.3315.2870" name=GENERATOR></HEAD>
                      6: <BODY bgColor=#ffffff>
                      7: <HR color=#ec5e5e SIZE=3> 
                      8: 
                      9: <H1 align=center><FONT color=#00006a>Computing Health Expectancies using 
                     10: IMaCh</FONT></H1>
                     11: <H1 align=center><FONT color=#00006a size=5>(a Maximum Likelihood Computer 
                     12: Program using Interpolation of Markov Chains)</FONT></H1>
                     13: <P align=center>&nbsp;</P>
                     14: <P align=center><A href="http://www.ined.fr/"><IMG border=0 height=76 
1.6     ! lievre     15: src="logo-ined.gif" 
1.5       lievre     16: width=151></A><IMG height=75 
1.6     ! lievre     17: src="euroreves2.gif" 
1.5       lievre     18: width=151></P>
                     19: <H3 align=center><A href="http://www.ined.fr/"><FONT 
                     20: color=#00006a>INED</FONT></A><FONT color=#00006a> and </FONT><A 
                     21: href="http://euroreves.ined.fr/"><FONT color=#00006a>EUROREVES</FONT></A></H3>
                     22: <P align=center><FONT color=#00006a size=4><STRONG>Version 0.97, June 
                     23: 2004</STRONG></FONT></P>
                     24: <HR color=#ec5e5e SIZE=3>
                     25: 
                     26: <P align=center><FONT color=#00006a><STRONG>Authors of the program: 
                     27: </STRONG></FONT><A href="http://sauvy.ined.fr/brouard"><FONT 
                     28: color=#00006a><STRONG>Nicolas Brouard</STRONG></FONT></A><FONT 
                     29: color=#00006a><STRONG>, senior researcher at the </STRONG></FONT><A 
                     30: href="http://www.ined.fr/"><FONT color=#00006a><STRONG>Institut National 
                     31: d'Etudes Démographiques</STRONG></FONT></A><FONT color=#00006a><STRONG> (INED, 
                     32: Paris) in the "Mortality, Health and Epidemiology" Research Unit 
                     33: </STRONG></FONT></P>
                     34: <P align=center><FONT color=#00006a><STRONG>and Agnès Lièvre<BR 
                     35: clear=left></STRONG></FONT></P>
                     36: <H4><FONT color=#00006a>Contribution to the mathematics: C. R. Heathcote 
                     37: </FONT><FONT color=#00006a size=2>(Australian National University, 
                     38: Canberra).</FONT></H4>
                     39: <H4><FONT color=#00006a>Contact: Agnès Lièvre (</FONT><A 
                     40: href="mailto:lievre@ined.fr"><FONT 
                     41: color=#00006a><I>lievre@ined.fr</I></FONT></A><FONT color=#00006a>) </FONT></H4>
                     42: <HR>
                     43: 
                     44: <UL>
                     45:   <LI><A 
                     46:   href="http://euroreves.ined.fr/imach/doc/imach.htm#intro">Introduction</A> 
1.6     ! lievre     47:   <LI><A href="http://euroreves.ined.fr/imach/doc/imach.htm#data">What kind 
        !            48:   of data can is required?</A> 
1.5       lievre     49:   <LI><A href="http://euroreves.ined.fr/imach/doc/imach.htm#datafile">The data 
                     50:   file</A> 
                     51:   <LI><A href="http://euroreves.ined.fr/imach/doc/imach.htm#biaspar">The 
                     52:   parameter file</A> 
                     53:   <LI><A href="http://euroreves.ined.fr/imach/doc/imach.htm#running">Running 
                     54:   Imach</A> 
                     55:   <LI><A href="http://euroreves.ined.fr/imach/doc/imach.htm#output">Output files 
                     56:   and graphs</A> 
                     57:   <LI><A href="http://euroreves.ined.fr/imach/doc/imach.htm#example">Exemple</A> 
                     58:   </LI></UL>
                     59: <HR>
                     60: 
                     61: <H2><A name=intro><FONT color=#00006a>Introduction</FONT></A></H2>
                     62: <P>This program computes <B>Healthy Life Expectancies</B> from 
                     63: <B>cross-longitudinal data</B> using the methodology pioneered by Laditka and 
                     64: Wolf (1). Within the family of Health Expectancies (HE), disability-free life 
                     65: expectancy (DFLE) is probably the most important index to monitor. In low 
                     66: 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, 
                     67: in particular by the international <A href="http://www.reves.org/">REVES</A> 
                     68: network on Health Expectancy and the disability process, and most HE indices based on these data, are 
                     69: <EM>cross-sectional</EM>. This means that the information collected comes from a 
                     70: single cross-sectional survey: people from a variety of ages (but often old people) 
                     71: are surveyed on their health status at a single date. The proportion of people 
                     72: disabled at each age can then be estimated at that date. This age-specific 
                     73: prevalence curve is used to distinguish, within the stationary population 
                     74: (which, by definition, is the life table estimated from the vital statistics on 
                     75: mortality at the same date), the disabled population from the disability-free 
                     76: population. Life expectancy (LE) (or total population divided by the yearly 
                     77: number of births or deaths of this stationary population) is then decomposed 
                     78: into disability-free life expectancy (DFLE) and disability life 
                     79: expectancy (DLE). This method of computing HE is usually called the Sullivan 
                     80: method (after the author who first described it).</P>
                     81: <P>The age-specific proportions of people disabled (prevalence of disability) are 
                     82: dependent upon the historical flows from entering disability and recovering in the past. The age-specific forces (or incidence rates) of entering 
                     83: disability or recovering a good health, estimated over a recent period of time (as period forces of mortality), are reflecting current conditions and 
                     84: therefore can be used at each age to forecast the future of this cohort <EM>if 
                     85: 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 
                     86: (computed from period incidences) is lower than the cross-sectional prevalence. 
                     87: For example if a country is improving its technology of prosthesis, the 
                     88: incidence of recovering the ability to walk will be higher at each (old) age, 
                     89: but the prevalence of disability will only slightly reflect an improvement because 
                     90: the prevalence is mostly affected by the history of the cohort and not by recent 
                     91: period effects. To measure the period improvement we have to simulate the future 
                     92: of a cohort of new-borns entering or leaving the disability state or 
                     93: dying at each age according to the incidence rates measured today on different cohorts. The 
                     94: proportion of people disabled at each age in this simulated cohort will be much 
                     95: lower that the proportions observed at each age in a cross-sectional survey. 
                     96: This new prevalence curve introduced in a life table will give a more realistic 
                     97: HE level than the Sullivan method which mostly reflects the history of health 
                     98: conditions in a country.</P>
                     99: <P>Therefore, the main question is how can we measure incidence rates from 
                    100: cross-longitudinal surveys? This is the goal of the IMaCH program. From your 
                    101: 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>
                    102: <P>A cross-longitudinal survey consists of a first survey ("cross") where 
                    103: individuals of different ages are interviewed about their health status or degree 
                    104: of disability. At least a second wave of interviews ("longitudinal") should 
                    105: measure each individual new health status. Health expectancies are computed from 
                    106: the transitions observed between waves (interviews) and are computed for each degree of 
                    107: severity of disability (number of health states). The more degrees of severity considered, the more 
                    108: time is necessary to reach the Maximum Likelihood of the parameters involved in 
                    109: the model. Considering only two states of disability (disabled and healthy) is 
                    110: generally enough but the computer program works also with more health 
                    111: states.<BR><BR>The simplest model for the transition probabilities is the multinomial logistic model where 
                    112: <I>pij</I> is the probability to be observed in state <I>j</I> at the second 
                    113: wave conditional to be observed in state <EM>i</EM> at the first wave. Therefore 
                    114: a simple model is: log<EM>(pij/pii)= aij + bij*age+ cij*sex,</EM> where 
                    115: '<I>age</I>' is age and '<I>sex</I>' is a covariate. The advantage that this 
                    116: computer program claims, is that if the delay between waves is not 
                    117: identical for each individual, or if some individual missed an interview, the 
                    118: information is not rounded or lost, but taken into account using an 
                    119: interpolation or extrapolation. <I>hPijx</I> is the probability to be observed 
                    120: in state <I>i</I> at age <I>x+h</I> conditional on the observed state <I>i</I> 
                    121: at age <I>x</I>. The delay '<I>h</I>' can be split into an exact number 
                    122: (<I>nh*stepm</I>) of unobserved intermediate states. This elementary transition 
                    123: (by month or quarter, trimester, semester or year) is modeled as the above multinomial 
                    124: logistic. The <I>hPx</I> matrix is simply the matrix product of <I>nh*stepm</I> 
                    125: elementary matrices and the contribution of each individual to the likelihood is 
                    126: simply <I>hPijx</I>. <BR></P>
                    127: <P>The program presented in this manual is a general program named 
                    128: <STRONG>IMaCh</STRONG> (for <STRONG>I</STRONG>nterpolated 
                    129: <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  
                    130: transition probabilities between an initial state and a final state. 
                    131: From there, the computer program produces indicators such as the observed and 
                    132: stationary prevalence, life expectancies and their variances both numerically and graphically. Our 
                    133: transition model consists of absorbing and non-absorbing states assuming the 
                    134: possibility of return across the non-absorbing states. The main advantage of 
                    135: this package, compared to other programs for the analysis of transition data 
                    136: (for example: Proc Catmod of SAS<SUP>®</SUP>) is that the whole individual 
                    137: information is used even if an interview is missing, a state or a date is 
                    138: unknown or when the delay between waves is not identical for each individual. 
                    139: The program is dependent upon a set of parameters inputted by the user: selection of a sub-sample, 
                    140: number of absorbing and non-absorbing states, number of waves to be taken in account , a tolerance level for the 
                    141: maximization function, the periodicity of the transitions (we can compute 
                    142: annual, quarterly or monthly transitions), covariates in the model. IMaCh works on 
                    143: Windows or on Unix platform.<BR></P>
                    144: <HR>
                    145: 
                    146: <P>(1) Laditka S. B. and Wolf, D. (1998), New Methods for Analyzing 
                    147: Active Life Expectancy. <I>Journal of Aging and Health</I>. Vol 10, No. 2. </P>
                    148: <P>(2) <A 
                    149: 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 
                    150: A., Brouard N. and Heathcote Ch. (2003) Estimating Health Expectancies from 
                    151: Cross-longitudinal surveys. <EM>Mathematical Population Studies</EM>.- 10(4), 
                    152: pp. 211-248</A> 
                    153: <HR>
                    154: 
                    155: <H2><A name=data><FONT color=#00006a>What kind of data is required?</FONT></A></H2>
                    156: <P>The minimum data required for a transition model is the recording of a set of 
                    157: individuals interviewed at a first date and interviewed once more. From the observations of an individual, we obtain a follow-up over 
                    158: time of the occurrence of a specific event. In this documentation, the event is 
                    159: related to health state, but the program can be applied to many
                    160: longitudinal studies with different contexts. To build the data file
                    161: as explained 
                    162: in the next section, you must have the month and year of each interview and 
                    163: the corresponding health state. In order to get age, date of birth (month 
                    164: and year) are required (missing values are allowed for month). Date of death 
                    165: (month and year) is an important information also required if the individual is 
                    166: dead. Shorter steps (i.e. a month) will more closely take into account the 
                    167: survival time after the last interview.</P>
                    168: <HR>
                    169: 
                    170: <H2><A name=datafile><FONT color=#00006a>The data file</FONT></A></H2>
                    171: <P>In this example, 8,000 people have been interviewed in a cross-longitudinal 
                    172: survey of 4 waves (1984, 1986, 1988, 1990). Some people missed 1, 2 or 3 
                    173: interviews. Health states are healthy (1) and disabled (2). The survey is not a 
                    174: real one but a simulation of the American Longitudinal Survey on Aging. The 
                    175: disability state is defined as dependence in at least one of four ADLs (Activities 
                    176: of daily living, like bathing, eating, walking). Therefore, even if the 
                    177: individuals interviewed in the sample are virtual, the information in 
                    178: this sample is close to reality for the United States. Sex is not recorded 
                    179: is this sample. The LSOA survey is biased in the sense that people
                    180: living in an institution were not included in the first interview in
                    181: 1984. Thus the prevalence of disability observed in 1984 is lower than
                    182: the true prevalence at old ages. However when people moved into an
                    183: institution, they were interviewed there in 1986, 1988 and 1990. Thus
                    184: the incidences of disabilities are not biased. Cross-sectional 
                    185: prevalences of disability at old ages are thus artificially increasing in 1986, 
                    186: 1988 and 1990 because of a greater proportion of the sample
                    187: institutionalized. Our article (Lièvre A., Brouard N. and Heathcote
                    188: Ch. (2003)) shows the opposite: the period prevalence based on the
                    189: incidences is lower at old  
                    190: ages than the adjusted cross-sectional prevalence illustrating that
                    191: there has been significant progress against disability.</P>
                    192: <P>Each line of the data set (named <A 
                    193: href="http://euroreves.ined.fr/imach/doc/data1.txt">data1.txt</A> in this first 
                    194: example) is an individual record. Fields are separated by blanks: </P>
                    195: <UL>
                    196:   <LI><B>Index number</B>: positive number (field 1) 
                    197:   <LI><B>First covariate</B> positive number (field 2) 
                    198:   <LI><B>Second covariate</B> positive number (field 3) 
                    199:   <LI><A name=Weight><B>Weight</B></A>: positive number (field 4) . In most 
                    200:   surveys individuals are weighted to account for stratification of the 
                    201:   sample. 
                    202:   <LI><B>Date of birth</B>: coded as mm/yyyy. Missing dates are coded as 99/9999 
                    203:   (field 5) 
                    204:   <LI><B>Date of death</B>: coded as mm/yyyy. Missing dates are coded as 99/9999 
                    205:   (field 6) 
                    206:   <LI><B>Date of first interview</B>: coded as mm/yyyy. Missing dates are coded 
                    207:   as 99/9999 (field 7) 
                    208:   <LI><B>Status at first interview</B>: positive number. Missing values ar coded 
                    209:   -1. (field 8) 
                    210:   <LI><B>Date of second interview</B>: coded as mm/yyyy. Missing dates are coded 
                    211:   as 99/9999 (field 9) 
                    212:   <LI><STRONG>Status at second interview</STRONG> positive number. Missing 
                    213:   values ar coded -1. (field 10) 
                    214:   <LI><B>Date of third interview</B>: coded as mm/yyyy. Missing dates are coded 
                    215:   as 99/9999 (field 11) 
                    216:   <LI><STRONG>Status at third interview</STRONG> positive number. Missing values 
                    217:   ar coded -1. (field 12) 
                    218:   <LI><B>Date of fourth interview</B>: coded as mm/yyyy. Missing dates are coded 
                    219:   as 99/9999 (field 13) 
                    220:   <LI><STRONG>Status at fourth interview</STRONG> positive number. Missing 
                    221:   values are coded -1. (field 14) 
                    222:   <LI>etc </LI></UL>
                    223: <P>&nbsp;</P>
                    224: <P>If you do not wish to include information on weights or 
                    225: covariates, you must fill the column with a number (e.g. 1) since all
                    226: fields must be present.</P>
                    227: <HR>
                    228: 
                    229: <H2><FONT color=#00006a>Your first example parameter file</FONT><A 
                    230: href="http://euroreves.ined.fr/imach"></A><A name=uio></A></H2>
                    231: <H2><A name=biaspar></A>#Imach version 0.97b, June 2004, INED-EUROREVES </H2>
                    232: <P>This first line was a comment. Comments line start with a '#'.</P>
                    233: <H4><FONT color=#ff0000>First uncommented line</FONT></H4><PRE>title=1st_example datafile=data1.txt lastobs=8600 firstpass=1 lastpass=4</PRE>
                    234: <UL>
                    235:   <LI><B>title=</B> 1st_example is title of the run. 
                    236:   <LI><B>datafile=</B> data1.txt is the name of the data set. Our example is a 
                    237:   six years follow-up survey. It consists of a baseline followed by 3 
                    238:   reinterviews. 
                    239:   <LI><B>lastobs=</B> 8600 the program is able to run on a subsample where the 
                    240:   last observation number is lastobs. It can be set a bigger number than the 
                    241:   real number of observations (e.g. 100000). In this example, maximisation will 
                    242:   be done on the first 8600 records. 
                    243:   <LI><B>firstpass=1</B> , <B>lastpass=4 </B>If there are more than two interviews 
                    244:   in the survey, the program can be run on selected transitions periods. 
                    245:   firstpass=1 means the first interview included in the calculation is the 
                    246:   baseline survey. lastpass=4 means that the last interview to be
                    247:   included will be by the 4th. </LI></UL>
                    248: <P>&nbsp;</P>
                    249: <H4><A name=biaspar-2><FONT color=#ff0000>Second uncommented 
                    250: line</FONT></A></H4><PRE>ftol=1.e-08 stepm=1 ncovcol=2 nlstate=2 ndeath=1 maxwav=4 mle=1 weight=0</PRE>
                    251: <UL>
                    252:   <LI><B>ftol=1e-8</B> Convergence tolerance on the function value in the 
                    253:   maximisation of the likelihood. Choosing a correct value for ftol is 
                    254:   difficult. 1e-8 is the correct value for a 32 bit computer. 
                    255:   <LI><B>stepm=1</B> The time unit in months for interpolation. Examples:
                    256:   <UL>
                    257:     <LI>If stepm=1, the unit is a month 
                    258:     <LI>If stepm=4, the unit is a trimester 
                    259:     <LI>If stepm=12, the unit is a year 
                    260:     <LI>If stepm=24, the unit is two years 
                    261:     <LI>... </LI></UL>
                    262:   <LI><B>ncovcol=2</B> Number of covariate columns included in the datafile 
                    263:   before the column for the date of birth. You can include covariates
                    264:   that will not be used in the model as this number is not the number of covariates that will 
                    265:   be specified by the model. The 'model' syntax describes the covariates to be 
                    266:   taken into account during the run. 
                    267:   <LI><B>nlstate=2</B> Number of non-absorbing (alive) states. Here we have two 
                    268:   alive states: disability-free is coded 1 and disability is coded 2. 
                    269:   <LI><B>ndeath=1</B> Number of absorbing states. The absorbing state death is 
                    270:   coded 3. 
                    271:   <LI><B>maxwav=4</B> Number of waves in the datafile. 
                    272:   <LI><A name=mle><B>mle</B></A><B>=1</B> Option for the Maximisation Likelihood 
                    273:   Estimation. 
                    274:   <UL>
                    275:     <LI>If mle=1 the program does the maximisation and the calculation of health 
                    276:     expectancies 
                    277:     <LI>If mle=0 the program only does the calculation of the health 
                    278:     expectancies and other indices and graphs but without the maximization. 
                    279:     There are also other possible values: 
                    280:     <UL>
                    281:       <LI>If mle=-1 you get a template for the number of parameters
                    282:       and the size of the variance-covariance matrix. This is useful if the model is 
                    283:       complex with many covariates. 
                    284:       <LI>If mle=-3 IMaCh computes the mortality but without any health status 
                    285:       (May 2004) 
                    286:       <LI>If mle=2 IMach likelihood corresponds to a linear interpolation 
                    287:       <LI>If mle=3 IMach likelihood corresponds to an exponential 
                    288:       inter-extrapolation 
                    289:       <LI>If mle=4 IMach likelihood corresponds to no inter-extrapolation, thus biasing the results. 
                    290:       <LI>If mle=5 IMach likelihood corresponds to no inter-extrapolation, and 
                    291:       before the correction of the Jackson's bug (avoid this). </LI></UL></LI></UL>
                    292:   <LI><B>weight=0</B> Provides the possibility of adding weights. 
                    293:   <UL>
                    294:     <LI>If weight=0 no weights are included 
                    295:     <LI>If weight=1 the maximisation integrates the weights which are in field 
                    296:     <A href="http://euroreves.ined.fr/imach/doc/imach.htm#Weight">4</A> 
                    297:   </LI></UL></LI></UL>
                    298: <H4><FONT color=#ff0000>Covariates</FONT></H4>
                    299: <P>Intercept and age are automatically included in the model. Additional 
                    300: covariates can be included with the command: </P><PRE>model=<EM>list of covariates</EM></PRE>
                    301: <UL>
                    302:   <LI>if<STRONG> model=. </STRONG>then no covariates are included 
                    303:   <LI>if <STRONG>model=V1</STRONG> the model includes the first covariate (field 
                    304:   2) 
                    305:   <LI>if <STRONG>model=V2 </STRONG>the model includes the second covariate 
                    306:   (field 3) 
                    307:   <LI>if <STRONG>model=V1+V2 </STRONG>the model includes the first and the 
                    308:   second covariate (fields 2 and 3) 
                    309:   <LI>if <STRONG>model=V1*V2 </STRONG>the model includes the product of the 
                    310:   first and the second covariate (fields 2 and 3) 
                    311:   <LI>if <STRONG>model=V1+V1*age</STRONG> the model includes the product 
                    312:   covariate*age </LI></UL>
                    313: <P>In this example, we have two covariates in the data file (fields 2 and 3). 
                    314: The number of covariates included in the data file between the id and the date 
                    315: of birth is ncovcol=2 (it was named ncov in version prior to 0.8). If you have 3 
                    316: covariates in the datafile (fields 2, 3 and 4), you will set ncovcol=3. Then you 
                    317: can run the programme with a new parametrisation taking into account the third 
                    318: covariate. For example, <STRONG>model=V1+V3 </STRONG>estimates a model with the 
                    319: first and third covariates. More complicated models can be used, but this will 
                    320: take more time to converge. With a simple model (no covariates), the programme 
                    321: estimates 8 parameters. Adding covariates increases the number of parameters : 
                    322: 12 for <STRONG>model=V1, </STRONG>16 for <STRONG>model=V1+V1*age </STRONG>and 20 
                    323: for <STRONG>model=V1+V2+V3.</STRONG></P>
                    324: <H4><FONT color=#ff0000>Guess values for optimization</FONT><FONT color=#00006a> 
                    325: </FONT></H4>
                    326: <P>You must write the initial guess values of the parameters for optimization. 
                    327: The number of parameters, <EM>N</EM> depends on the number of absorbing states 
                    328: and non-absorbing states and on the number of covariates in the model (ncovmodel). <BR><EM>N</EM> is 
                    329: given by the formula <EM>N</EM>=(<EM>nlstate</EM> + 
                    330: <EM>ndeath</EM>-1)*<EM>nlstate</EM>*<EM>ncovmodel</EM>&nbsp;. <BR><BR>Thus in 
                    331: the simple case with 2 covariates in the model(the model is log (pij/pii) = aij + bij * age 
                    332: where intercept and age are the two covariates), and 2 health states (1 for 
                    333: disability-free and 2 for disability) and 1 absorbing state (3), you must enter 
                    334: 8 initials values, a12, b12, a13, b13, a21, b21, a23, b23. You can start with 
                    335: zeros as in this example, but if you have a more precise set (for example from 
                    336: an earlier run) you can enter it and it will speed up the convergence<BR>Each of the four 
                    337: lines starts with indices "ij": <B>ij aij bij</B> </P>
                    338: <BLOCKQUOTE><PRE># Guess values of aij and bij in log (pij/pii) = aij + bij * age
1.1       brouard   339: 12 -14.155633  0.110794 
                    340: 13  -7.925360  0.032091 
                    341: 21  -1.890135 -0.029473 
1.5       lievre    342: 23  -6.234642  0.022315 </PRE></BLOCKQUOTE>
                    343: <P>or, to simplify (in most of cases it converges but there is no warranty!): 
                    344: </P>
                    345: <BLOCKQUOTE><PRE>12 0.0 0.0
1.1       brouard   346: 13 0.0 0.0
                    347: 21 0.0 0.0
1.5       lievre    348: 23 0.0 0.0</PRE></BLOCKQUOTE>
                    349: <P>In order to speed up the convergence you can make a first run with a large 
                    350: stepm i.e stepm=12 or 24 and then decrease the stepm until stepm=1 month. If 
                    351: newstepm is the new shorter stepm and stepm can be expressed as a multiple of 
                    352: newstepm, like newstepm=n stepm, then the following approximation holds: </P><PRE>aij(stepm) = aij(n . stepm) - ln(n)
                    353: </PRE>
                    354: <P>and </P><PRE>bij(stepm) = bij(n . stepm) .</PRE>
                    355: <P>For example if you already ran with stepm=6 (a 6 months interval) and got:<BR></P><PRE># Parameters
1.1       brouard   356: 12 -13.390179  0.126133 
                    357: 13  -7.493460  0.048069 
                    358: 21   0.575975 -0.041322 
                    359: 23  -4.748678  0.030626 
1.5       lievre    360: </PRE>
                    361: <P>Then you now want to get the monthly estimates, you can guess the aij by 
                    362: subtracting ln(6)= 1.7917<BR>and running using<BR></P><PRE>12 -15.18193847  0.126133 
1.1       brouard   363: 13 -9.285219469  0.048069
                    364: 21 -1.215784469 -0.041322
                    365: 23 -6.540437469  0.030626
1.5       lievre    366: </PRE>
                    367: <P>and get<BR></P><PRE>12 -15.029768 0.124347 
1.1       brouard   368: 13 -8.472981 0.036599 
                    369: 21 -1.472527 -0.038394 
                    370: 23 -6.553602 0.029856 
                    371: 
1.5       lievre    372: <P>which is closer to the results. The approximation is probably useful
1.1       brouard   373: only for very small intervals and we don't have enough experience to
1.5       lievre    374: know if you will speed up the convergence or not.<BR></P>
                    375: </PRE><PRE>         -ln(12)= -2.484
1.1       brouard   376:  -ln(6/1)=-ln(6)= -1.791
                    377:  -ln(3/1)=-ln(3)= -1.0986
                    378: -ln(12/6)=-ln(2)= -0.693
1.5       lievre    379: </PRE>In version 0.9 and higher you can still have valuable results even if your 
                    380: stepm parameter is bigger than a month. The idea is to run with bigger stepm in 
                    381: order to have a quicker convergence at the price of a small bias. Once you know 
                    382: which model you want to fit, you can put stepm=1 and wait hours or days to get 
                    383: the convergence! To get unbiased results even with large stepm we introduce the 
                    384: idea of pseudo likelihood by interpolating two exact likelihoods. In
                    385: more detail: 
                    386: <P>If the interval of <EM>d</EM> months between two waves is not a multiple of 
                    387: 'stepm', but is between <EM>(n-1) stepm</EM> and <EM>n stepm</EM> then 
                    388: both exact likelihoods are computed (the contribution to the likelihood at <EM>n 
                    389: stepm</EM> requires one matrix product more) (let us remember that we are 
                    390: modelling the probability to be observed in a particular state after <EM>d</EM> 
                    391: months being observed at a particular state at 0). The distance, (<EM>bh</EM> in 
                    392: the program), from the month of interview to the rounded date of <EM>n 
                    393: stepm</EM> is computed. It can be negative (interview occurs before <EM>n 
                    394: stepm</EM>) or positive if the interview occurs after <EM>n stepm</EM> (and 
                    395: before <EM>(n+1)stepm</EM>). <BR>Then the final contribution to the total 
                    396: likelihood is a weighted average of these two exact likelihoods at <EM>n 
                    397: stepm</EM> (out) and at <EM>(n-1)stepm</EM>(savm). We did not want to compute 
                    398: the third likelihood at <EM>(n+1)stepm</EM> because it is too costly in time, so 
                    399: we used an extrapolation if <EM>bh</EM> is positive. <BR>The formula
                    400: 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 */
                    401:  
                    402: mle=2  lli= (savm[s1][s2]&gt;(double)1.e-8 ? \
1.2       brouard   403:           log((1.+bbh)*out[s1][s2]- bbh*(savm[s1][s2])): \
                    404:           log((1.+bbh)*out[s1][s2])); /* linear interpolation */
1.5       lievre    405: mle=3  lli= (savm[s1][s2]&gt;1.e-8 ? \
1.2       brouard   406:           (1.+bbh)*log(out[s1][s2])- bbh*log(savm[s1][s2]): \
                    407:           log((1.+bbh)*out[s1][s2])); /* exponential inter-extrapolation */
                    408: 
                    409: mle=4   lli=log(out[s[mw[mi][i]][i]][s[mw[mi+1][i]][i]]); /* No interpolation  */
                    410:         no need to save previous likelihood into memory.
1.5       lievre    411: </PRE>
                    412: <P>If the death occurs between the first and second pass, and for example more 
                    413: precisely between <EM>n stepm</EM> and <EM>(n+1)stepm</EM> the contribution of 
                    414: these people to the likelihood is simply the difference between the probability 
                    415: of dying before <EM>n stepm</EM> and the probability of dying before 
                    416: <EM>(n+1)stepm</EM>. There was a bug in version 0.8 and death was treated as any 
                    417: other state, i.e. as if it was an observed death at second pass. This was not 
                    418: precise but correct, although when information on the precise month of
                    419: death came (death occuring prior to second pass) we did not change the
                    420: likelihood accordingly. We thank Chris Jackson for correcting it. In earlier
1.2       brouard   421: versions (fortunately before first publication) the total mortality
1.5       lievre    422: was thus overestimated (people were dying too early) by about 10%. Version
                    423: 0.95 and higher are correct. 
1.1       brouard   424: 
1.5       lievre    425: <P>Our suggested choice is mle=1 . If stepm=1 there is no difference between 
                    426: various mle options (methods of interpolation). If stepm is big, like 12 or 24 
                    427: or 48 and mle=4 (no interpolation) the bias may be very important if the mean 
                    428: duration between two waves is not a multiple of stepm. See the appendix in our 
                    429: main publication concerning the sine curve of biases. 
                    430: <H4><FONT color=#ff0000>Guess values for computing variances</FONT></H4>
                    431: <P>These values are output by the maximisation of the likelihood <A 
                    432: href="http://euroreves.ined.fr/imach/doc/imach.htm#mle">mle</A>=1 and
                    433: can be used as an input for a second run in order to get the various output data 
                    434: files (Health expectancies, period prevalence etc.) and figures without 
                    435: rerunning the long maximisation phase (mle=0). </P>
                    436: <P>The 'scales' are small values needed for the computing of numerical 
                    437: derivatives. These derivatives are used to compute the hessian matrix of the 
                    438: parameters, that is the inverse of the covariance matrix. They are often used 
                    439: for estimating variances and confidence intervals. Each line consists of indices 
                    440: "ij" followed by the initial scales (zero to simplify) associated with aij and 
                    441: bij. </P>
                    442: <UL>
                    443:   <LI>If mle=1 you can enter zeros: 
                    444:   <LI>
                    445:   <BLOCKQUOTE><PRE># Scales (for hessian or gradient estimation)
1.1       brouard   446: 12 0. 0. 
                    447: 13 0. 0. 
                    448: 21 0. 0. 
1.5       lievre    449: 23 0. 0. </PRE></BLOCKQUOTE>
                    450:   <LI>If mle=0 (no maximisation of Likelihood) you must enter a covariance 
                    451:   matrix (usually obtained from an earlier run). </LI></UL>
                    452: <H4><FONT color=#ff0000>Covariance matrix of parameters</FONT></H4>
                    453: <P>The covariance matrix is output if <A 
                    454: href="http://euroreves.ined.fr/imach/doc/imach.htm#mle">mle</A>=1. But it can be 
                    455: also be used as an input to get the various output data files (Health
                    456: expectancies, period prevalence etc.) and figures without rerunning
                    457: the maximisation phase (mle=0). <BR>Each line starts with indices
                    458: "ijk" followed by the covariances  between aij and bij:<BR>
                    459: </P><PRE>   121 Var(a12) 
1.1       brouard   460:    122 Cov(b12,a12)  Var(b12) 
                    461:           ...
1.5       lievre    462:    232 Cov(b23,a12)  Cov(b23,b12) ... Var (b23) </PRE>
                    463: <UL>
                    464:   <LI>If mle=1 you can enter zeros. 
                    465:   <LI><PRE># Covariance matrix
1.1       brouard   466: 121 0.
                    467: 122 0. 0.
                    468: 131 0. 0. 0. 
                    469: 132 0. 0. 0. 0. 
                    470: 211 0. 0. 0. 0. 0. 
                    471: 212 0. 0. 0. 0. 0. 0. 
                    472: 231 0. 0. 0. 0. 0. 0. 0. 
1.5       lievre    473: 232 0. 0. 0. 0. 0. 0. 0. 0.</PRE>
                    474:   <LI>If mle=0 you must enter a covariance matrix (usually obtained from an 
                    475:   earlier run). </LI></UL>
                    476: <H4><FONT color=#ff0000>Age range for calculation of stationary prevalences and 
                    477: health expectancies</FONT></H4><PRE>agemin=70 agemax=100 bage=50 fage=100</PRE>
                    478: <P>Once we obtained the estimated parameters, the program is able to calculate 
                    479: period prevalence, transitions probabilities and life expectancies at any age. 
                    480: Choice of the age range is useful for extrapolation. In this example,
                    481: the age of people interviewed varies from 69 to 102 and the model is
                    482: estimated using their exact ages. But if you are interested in the
                    483: age-specific period prevalence you can start the simulation at an
                    484: exact age like 70 and stop at 100. Then the program  will draw at
                    485: least two curves describing the forecasted prevalences of two cohorts,
                    486: one for healthy people at age 70 and the second for disabled people at
                    487: the same initial age. And according to the mixing property
                    488: (ergodicity) and because of recovery, both prevalences will tend to be
                    489: identical at later ages. Thus if you want to compute the prevalence at
                    490: age 70, you should enter a lower agemin value. 
                    491: <P>Setting bage=50 (begin age) and fage=100 (final age), let the program compute 
                    492: life expectancy from age 'bage' to age 'fage'. As we use a model, we can 
                    493: interessingly compute life expectancy on a wider age range than the age range 
                    494: from the data. But the model can be rather wrong on much larger intervals. 
                    495: Program is limited to around 120 for upper age! <PRE></PRE>
                    496: <UL>
                    497:   <LI><B>agemin=</B> Minimum age for calculation of the period prevalence 
                    498:   <LI><B>agemax=</B> Maximum age for calculation of the period prevalence 
                    499:   <LI><B>bage=</B> Minimum age for calculation of the health expectancies 
                    500:   <LI><B>fage=</B> Maximum age for calculation of the health expectancies 
                    501: </LI></UL>
                    502: <H4><A name=Computing><FONT color=#ff0000>Computing</FONT></A><FONT 
                    503: color=#ff0000> the cross-sectional prevalence</FONT></H4><PRE>begin-prev-date=1/1/1984 end-prev-date=1/6/1988 estepm=1</PRE>
                    504: <P>Statements 'begin-prev-date' and 'end-prev-date' allow the user to
                    505: select the period in which the observed prevalences in each state. In
                    506: this example, the prevalences are calculated on data survey collected
                    507: between 1 January 1984 and 1 June 1988. </P>
                    508: <UL>
                    509:   <LI><STRONG>begin-prev-date= </STRONG>Starting date (day/month/year) 
                    510:   <LI><STRONG>end-prev-date= </STRONG>Final date (day/month/year) 
                    511:   <LI><STRONG>estepm= </STRONG>Unit (in months).We compute the life expectancy 
                    512:   from trapezoids spaced every estepm months. This is mainly to measure the 
                    513:   difference between two models: for example if stepm=24 months pijx are given 
                    514:   only every 2 years and by summing them we are calculating an estimate of the 
                    515:   Life Expectancy assuming a linear progression inbetween and thus 
                    516:   overestimating or underestimating according to the curvature of the survival 
                    517:   function. If, for the same date, we estimate the model with stepm=1 month, we 
                    518:   can keep estepm to 24 months to compare the new estimate of Life expectancy 
                    519:   with the same linear hypothesis. A more precise result, taking into account a 
                    520:   more precise curvature will be obtained if estepm is as small as stepm. 
                    521: </LI></UL>
                    522: <H4><FONT color=#ff0000>Population- or status-based health 
                    523: expectancies</FONT></H4><PRE>pop_based=0</PRE>
                    524: <P>The program computes status-based health expectancies, i.e health 
                    525: expectancies which depend on the initial health state. If you are healthy, your 
                    526: healthy life expectancy (e11) is higher than if you were disabled (e21, with e11 
                    527: &gt; e21).<BR>To compute a healthy life expectancy 'independent' of the initial 
                    528: status we have to weight e11 and e21 according to the probability of
                    529: being in each state at initial age which correspond to the proportions
                    530: of people in each health state (cross-sectional prevalences).
                    531: <P>We could also compute e12 and e12 and get e.2 by weighting them according to 
                    532: the observed cross-sectional prevalences at initial age. 
                    533: <P>In a similar way we could compute the total life expectancy by summing e.1 
                    534: and e.2 . <BR>The main difference between 'population based' and 'implied' or 
                    535: 'period' is in the weights used. 'Usually', cross-sectional prevalences of 
                    536: disability are higher than period prevalences particularly at old ages. This is 
                    537: true if the country is improving its health system by teaching people how to 
                    538: prevent disability by promoting better screening, for example of people 
                    539: needing cataract surgery. Then the proportion of disabled people at
                    540: age 90 will be lower than the current observed proportion. 
                    541: <P>Thus a better Health Expectancy and even a better Life Expectancy value is 
                    542: given by forecasting not only the current lower mortality at all ages but also a 
                    543: lower incidence of disability and higher recovery. <BR>Using the period 
                    544: prevalences as weight instead of the cross-sectional prevalences we are 
                    545: computing indices which are more specific to the current situations and 
                    546: therefore more useful to predict improvements or regressions in the future as to 
                    547: compare different policies in various countries. 
                    548: <UL>
                    549:   <LI><STRONG>popbased= 0 </STRONG>Health expectancies are computed at each age 
                    550:   from period prevalences 'expected' at this initial age. 
                    551:   <LI><STRONG>popbased= 1 </STRONG>Health expectancies are computed at each age 
                    552:   from cross-sectional 'observed' prevalence at the initial age. As all the 
                    553:   population is not observed at the same exact date we define a short period 
                    554:   where the observed prevalence can be computed as follows:<BR>we simply sum all people 
                    555:   surveyed within these two exact dates who belong to a particular age group 
                    556:   (single year) at the date of interview and are in a particular health state. 
                    557:   Then it is easy to get the proportion of people in a particular
                    558:   health state as a percentage of all people of the same age group.<BR>If both dates are spaced and are 
                    559:   covering two waves or more, people being interviewed twice or more are counted 
                    560:   twice or more. The program takes into account the selection of individuals 
                    561:   interviewed between firstpass and lastpass too (we don't know if
                    562:   this is useful). </LI></UL>
                    563: <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>
                    564: <P>Prevalence and population projections are only available if the interpolation 
                    565: unit is a month, i.e. stepm=1 and if there are no covariate. The programme 
                    566: estimates the prevalence in each state at a precise date expressed in 
                    567: day/month/year. The programme computes one forecasted prevalence a year from a 
                    568: starting date (1 January 1989 in this example) to a final date (1 January 
                    569: 1992). The statement mov_average allows computation of smoothed forecasted 
                    570: prevalences with a five-age moving average centered at the mid-age of the 
                    571: fiveyear-age period. <BR></P>
                    572: <H4><FONT color=#ff0000>Population forecasting (Experimental)</FONT></H4>
                    573: <UL>
                    574:   <LI><STRONG>starting-proj-date</STRONG>= starting date (day/month/year) of 
                    575:   forecasting 
                    576:   <LI><STRONG>final-proj-date= </STRONG>final date (day/month/year) of 
                    577:   forecasting 
                    578:   <LI><STRONG>mov_average</STRONG>= smoothing with a five-age moving average 
                    579:   centered at the mid-age of the fiveyear-age period. The command<STRONG> 
                    580:   mov_average</STRONG> takes value 1 if the prevalences are smoothed and 0 
                    581:   otherwise. </LI></UL>
                    582: <UL type=disc>
                    583:   <LI><B>popforecast= 0 </B>Option for population forecasting. If popforecast=1, 
                    584:   the programme does the forecasting<B>.</B> 
                    585:   <LI><B>popfile= </B>name of the population file 
                    586:   <LI><B>popfiledate=</B> date of the population population 
                    587:   <LI><B>last-popfiledate</B>= date of the last population projection&nbsp; 
                    588: </LI></UL>
                    589: <HR>
                    590: 
                    591: <H2><A name=running></A><FONT color=#00006a>Running Imach with this 
                    592: example</FONT></H2>
                    593: <P>We assume that you have already typed your <A 
                    594: href="http://euroreves.ined.fr/imach/doc/biaspar.imach">1st_example parameter 
                    595: file</A> as explained <A 
                    596: href="http://euroreves.ined.fr/imach/doc/imach.htm#biaspar">above</A>. To run 
                    597: the program under Windows you should either: </P>
                    598: <UL>
                    599:   <LI>click on the imach.exe icon and either: 
                    600:   <UL>
                    601:     <LI>enter the name of the parameter file which is for example 
                    602:     <TT>C:\home\myname\lsoa\biaspar.imach</TT> 
                    603:     <LI>or locate the biaspar.imach icon in your folder such as 
                    604:     <TT>C:\home\myname\lsoa</TT> and drag it, with your mouse, on the already 
                    605:     open imach window. </LI></UL>
                    606:   <LI>With version (0.97b) if you ran setup at installation, Windows is supposed 
                    607:   to understand the ".imach" extension and you can right click the biaspar.imach 
                    608:   icon and either edit with wordpad (better than notepad) the parameter file or 
                    609:   execute it with IMaCh. </LI></UL>
                    610: <P>The time to converge depends on the step unit used (1 month is more 
                    611: precise but more cpu time consuming), on the number of cases, and on the number of 
                    612: variables (covariates). 
                    613: <P>The program outputs many files. Most of them are files which will be plotted 
                    614: for better understanding. </P>To run under Linux is mostly the same. 
                    615: <P>It is no more difficult to run IMaCh on a MacIntosh. 
                    616: <HR>
                    617: 
                    618: <H2><A name=output><FONT color=#00006a>Output of the program and graphs</FONT> 
                    619: </A></H2>
                    620: <P>Once the optimization is finished (once the convergence is reached), many 
                    621: tables and graphics are produced.
                    622: <P>The IMaCh program will create a subdirectory with the same name as your 
                    623: parameter file (here mypar) where all the tables and figures will be 
                    624: stored.<BR>Important files like the log file and the output parameter file 
                    625: (the latter contains the maximum likelihood estimates) are stored at
                    626: the main level not in this subdirectory. Files with extension .log and
                    627: .txt can be edited with a standard editor like wordpad or notepad or
                    628: even can be viewed with a browser like Internet Explorer or Mozilla. 
                    629: <P>The main html file is also named with the same name <A 
                    630: href="http://euroreves.ined.fr/imach/doc/biaspar.htm">biaspar.htm</A>. You can 
                    631: click on it by holding your shift key in order to open it in another window 
                    632: (Windows). 
                    633: <P>Our grapher is Gnuplot, an interactive plotting program (GPL) which can 
                    634: also work in batch mode. A gnuplot reference manual is available <A 
                    635: href="http://www.gnuplot.info/">here</A>. <BR>When the run is finished, and in 
                    636: order that the window doesn't disappear, the user should enter a character like 
                    637: <TT>q</TT> for quitting. <BR>These characters are:<BR></P>
                    638: <UL>
                    639:   <LI>'e' for opening the main result html file <A 
                    640:   href="http://euroreves.ined.fr/imach/doc/biaspar.htm"><STRONG>biaspar.htm</STRONG></A> 
                    641:   file to edit the output files and graphs. 
                    642:   <LI>'g' to graph again 
                    643:   <LI>'c' to start again the program from the beginning. 
                    644:   <LI>'q' for exiting. </LI></UL>The main gnuplot file is named 
                    645: <TT>biaspar.gp</TT> and can be edited (right click) and run again. 
                    646: <P>Gnuplot is easy and you can use it to make more complex graphs. Just click on 
                    647: gnuplot and type plot sin(x) to see how easy it is. 
                    648: <H5><FONT size=4><STRONG>Results files </STRONG></FONT><BR><BR><FONT 
                    649: color=#ec5e5e size=3><STRONG>- </STRONG></FONT><A 
                    650: name="cross-sectional prevalence in each state"><FONT color=#ec5e5e 
                    651: size=3><STRONG>cross-sectional prevalence in each state</STRONG></FONT></A><FONT 
                    652: color=#ec5e5e size=3><STRONG> (and at first pass)</STRONG></FONT><B>: </B><A 
                    653: href="http://euroreves.ined.fr/imach/doc/biaspar/prbiaspar.txt"><B>biaspar/prbiaspar.txt</B></A><BR></H5>
                    654: <P>The first line is the title and displays each field of the file. First column 
                    655: corresponds to age. Fields 2 and 6 are the proportion of individuals in states 1 
                    656: and 2 respectively as observed at first exam. Others fields are the numbers of 
                    657: people in states 1, 2 or more. The number of columns increases if the number of 
                    658: 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
1.1       brouard   659: 70 1.00000 631 631 70 0.00000 0 631
                    660: 71 0.99681 625 627 71 0.00319 2 627 
1.5       lievre    661: 72 0.97125 1115 1148 72 0.02875 33 1148 </PRE>
                    662: <P>It means that at age 70 (between 70 and 71), the prevalence in state 1 is 
                    663: 1.000 and in state 2 is 0.00 . At age 71 the number of individuals in state 1 is 
                    664: 625 and in state 2 is 2, hence the total number of people aged 71 is 625+2=627. 
                    665: <BR></P>
                    666: <H5><FONT color=#ec5e5e size=3><B>- Estimated parameters and covariance 
                    667: matrix</B></FONT><B>: </B><A 
                    668: href="http://euroreves.ined.fr/imach/doc/rbiaspar.txt"><B>rbiaspar.imach</B></A></H5>
                    669: <P>This file contains all the maximisation results: </P><PRE> -2 log likelihood= 21660.918613445392
1.1       brouard   670:  Estimated parameters: a12 = -12.290174 b12 = 0.092161 
                    671:                        a13 = -9.155590  b13 = 0.046627 
                    672:                        a21 = -2.629849  b21 = -0.022030 
                    673:                        a23 = -7.958519  b23 = 0.042614  
                    674:  Covariance matrix: Var(a12) = 1.47453e-001
                    675:                     Var(b12) = 2.18676e-005
                    676:                     Var(a13) = 2.09715e-001
                    677:                     Var(b13) = 3.28937e-005  
                    678:                     Var(a21) = 9.19832e-001
                    679:                     Var(b21) = 1.29229e-004
                    680:                     Var(a23) = 4.48405e-001
                    681:                     Var(b23) = 5.85631e-005 
1.5       lievre    682:  </PRE>
                    683: <P>By substitution of these parameters in the regression model, we obtain the 
                    684: elementary transition probabilities:</P>
                    685: <P><IMG height=300 
1.6     ! lievre    686: src="biaspar/pebiaspar11.png" 
1.5       lievre    687: width=400></P>
                    688: <H5><FONT color=#ec5e5e size=3><B>- Transition probabilities</B></FONT><B>: 
                    689: </B><A 
                    690: href="http://euroreves.ined.fr/imach/doc/biaspar/pijrbiaspar.txt"><B>biaspar/pijrbiaspar.txt</B></A></H5>
                    691: <P>Here are the transitions probabilities Pij(x, x+nh). The second column is the 
                    692: starting age x (from age 95 to 65), the third is age (x+nh) and the others are 
                    693: the transition probabilities p11, p12, p13, p21, p22, p23. The first column 
                    694: indicates the value of the covariate (without any other variable than age it is 
                    695: 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>
                    696: <P>and this means: </P><PRE>p11(100,106)=0.02655
1.1       brouard   697: p12(100,106)=0.17622
                    698: p13(100,106)=0.79722
                    699: p21(100,106)=0.01809
                    700: p22(100,106)=0.13678
1.5       lievre    701: p22(100,106)=0.84513 </PRE>
                    702: <H5><FONT color=#ec5e5e size=3><B>- </B></FONT><A 
                    703: name="Period prevalence in each state"><FONT color=#ec5e5e size=3><B>Period 
                    704: prevalence in each state</B></FONT></A><B>: </B><A 
                    705: href="http://euroreves.ined.fr/imach/doc/biaspar/plrbiaspar.txt"><B>biaspar/plrbiaspar.txt</B></A></H5><PRE>#Prevalence
1.1       brouard   706: #Age 1-1 2-2
                    707: 
                    708: #************ 
                    709: 70 0.90134 0.09866
                    710: 71 0.89177 0.10823 
                    711: 72 0.88139 0.11861 
1.5       lievre    712: 73 0.87015 0.12985 </PRE>
                    713: <P>At age 70 the period prevalence is 0.90134 in state 1 and 0.09866 in state 2. 
                    714: This period prevalence differs from the cross-sectional prevalence and
                    715: we explaining. The cross-sectional prevalence at age 70 results from
                    716: the incidence of disability, incidence of recovery and mortality which
                    717: occurred in the past for the cohort. Period prevalence results from a
                    718: simulation with current incidences of disability, recovery and
                    719: mortality estimated from this cross-longitudinal survey. It is a good
                    720: prediction of the prevalence in the future if "nothing changes in the
                    721: future". This is exactly what demographers do with a period life
                    722: table. Life expectancy is the expected mean survival time if current
                    723: mortality rates (age-specific incidences of mortality) "remain
                    724: constant" in the future. 
                    725: </P>
                    726: <H5><FONT color=#ec5e5e size=3><B>- Standard deviation of period 
                    727: prevalence</B></FONT><B>: </B><A 
                    728: href="http://euroreves.ined.fr/imach/doc/biaspar/vplrbiaspar.txt"><B>biaspar/vplrbiaspar.txt</B></A></H5>
                    729: <P>The period prevalence has to be compared with the cross-sectional prevalence. 
                    730: But both are statistical estimates and therefore have confidence intervals. 
                    731: <BR>For the cross-sectional prevalence we generally need information on the 
                    732: design of the surveys. It is usually not enough to consider the number of people 
                    733: surveyed at a particular age and to estimate a Bernouilli confidence interval 
                    734: based on the prevalence at that age. But you can do it to have an idea of the 
                    735: randomness. At least you can get a visual appreciation of the randomness by 
                    736: looking at the fluctuation over ages. 
                    737: <P>For the period prevalence it is possible to estimate the confidence interval 
                    738: from the Hessian matrix (see the publication for details). We are supposing that 
                    739: the design of the survey will only alter the weight of each individual. IMaCh 
                    740: scales the weights of individuals-waves contributing to the likelihood by 
                    741: making the sum of the weights equal to the sum of individuals-waves 
                    742: contributing: a weighted survey doesn't increase or decrease the size of the 
                    743: survey, it only give more weight to some individuals and thus less to the 
                    744: others. 
                    745: <H5><FONT color=#ec5e5e size=3>-cross-sectional and period prevalence in state 
                    746: (2=disable) with confidence interval</FONT>:<B> </B><A 
                    747: href="http://euroreves.ined.fr/imach/doc/biaspar/vbiaspar21.htm"><B>biaspar/vbiaspar21.png</B></A></H5>
                    748: <P>This graph exhibits the period prevalence in state (2) with the confidence 
                    749: interval in red. The green curve is the observed prevalence (or proportion of 
                    750: individuals in state (2)). Without discussing the results (it is not the purpose 
                    751: here), we observe that the green curve is somewhat below the period
                    752: prevalence. If the data were not biased by the non inclusion of people
                    753: living in institutions we would have concluded that the prevalence of
                    754: disability will increase in the future (see the main publication if
                    755: you are interested in real data and results which are opposite).</P>
                    756: <P><IMG height=300 
1.6     ! lievre    757: src="biaspar/vbiaspar21.png" 
1.5       lievre    758: width=400></P>
                    759: <H5><FONT color=#ec5e5e size=3><B>-Convergence to the period prevalence of 
                    760: disability</B></FONT><B>: </B><A 
1.6     ! lievre    761: href="biaspar/pbiaspar11.png"><B>biaspar/pbiaspar11.png</B></A><BR><IMG 
1.5       lievre    762: height=300 
1.6     ! lievre    763: src="biaspar/pbiaspar11.png" 
1.5       lievre    764: width=400> </H5>
                    765: <P>This graph plots the conditional transition probabilities from an initial 
                    766: state (1=healthy in red at the bottom, or 2=disabled in green on the top) at age 
                    767: <EM>x </EM>to the final state 2=disabled<EM> </EM>at age <EM>x+h
                    768: </EM> where conditional means conditional on being alive at age <EM>x+h </EM>which is 
                    769: <I>hP12x</I> + <EM>hP22x</EM>. The curves <I>hP12x/(hP12x</I> + <EM>hP22x) 
                    770: </EM>and <I>hP22x/(hP12x</I> + <EM>hP22x) </EM>converge with <EM>h, </EM>to the 
                    771: <EM>period prevalence of disability</EM>. In order to get the period prevalence 
                    772: at age 70 we should start the process at an earlier age, i.e.50. If the 
                    773: disability state is defined by severe disability criteria with only a
                    774: small chance of recovering, then the incidence of recovery is low and the time to convergence is 
                    775: probably longer. But we don't have experience of this yet.</P>
                    776: <H5><FONT color=#ec5e5e size=3><B>- Life expectancies by age and initial health 
                    777: status with standard deviation</B></FONT><B>: </B><A 
                    778: href="http://euroreves.ined.fr/imach/doc/biaspar/erbiaspar.txt"><B>biaspar/erbiaspar.txt</B></A></H5><PRE># Health expectancies 
1.1       brouard   779: # Age 1-1 (SE) 1-2 (SE) 2-1 (SE) 2-2 (SE)
1.2       brouard   780:  70   11.0180 (0.1277)    3.1950 (0.3635)    4.6500 (0.0871)    4.4807 (0.2187)
                    781:  71   10.4786 (0.1184)    3.2093 (0.3212)    4.3384 (0.0875)    4.4820 (0.2076)
                    782:  72    9.9551 (0.1103)    3.2236 (0.2827)    4.0426 (0.0885)    4.4827 (0.1966)
                    783:  73    9.4476 (0.1035)    3.2379 (0.2478)    3.7621 (0.0899)    4.4825 (0.1858)
                    784:  74    8.9564 (0.0980)    3.2522 (0.2165)    3.4966 (0.0920)    4.4815 (0.1754)
                    785:  75    8.4815 (0.0937)    3.2665 (0.1887)    3.2457 (0.0946)    4.4798 (0.1656)
                    786:  76    8.0230 (0.0905)    3.2806 (0.1645)    3.0090 (0.0979)    4.4772 (0.1565)
                    787:  77    7.5810 (0.0884)    3.2946 (0.1438)    2.7860 (0.1017)    4.4738 (0.1484)
                    788:  78    7.1554 (0.0871)    3.3084 (0.1264)    2.5763 (0.1062)    4.4696 (0.1416)
                    789:  79    6.7464 (0.0867)    3.3220 (0.1124)    2.3794 (0.1112)    4.4646 (0.1364)
                    790:  80    6.3538 (0.0868)    3.3354 (0.1014)    2.1949 (0.1168)    4.4587 (0.1331)
                    791:  81    5.9775 (0.0873)    3.3484 (0.0933)    2.0222 (0.1230)    4.4520 (0.1320)
1.5       lievre    792: </PRE><PRE>For example  70  11.0180 (0.1277) 3.1950 (0.3635) 4.6500 (0.0871)  4.4807 (0.2187)
1.2       brouard   793: means
1.6     ! lievre    794: e11=11.0180 e12=3.1950 e21=4.6500 e22=4.4807 </PRE><PRE><IMG height=300 src="biaspar/expbiaspar21.png" width=400><IMG height=300 src="biaspar/expbiaspar11.png" width=400></PRE>
1.5       lievre    795: <P>For example, life expectancy of a healthy individual at age 70 is 11.0 in the 
                    796: healthy state and 3.2 in the disability state (total of 14.2 years). If he was 
                    797: disabled at age 70, his life expectancy will be shorter, 4.65 years in the 
                    798: healthy state and 4.5 in the disability state (=9.15 years). The total life 
                    799: expectancy is a weighted mean of both, 14.2 and 9.15. The weight is the 
                    800: proportion of people disabled at age 70. In order to get a period index (i.e. 
                    801: based only on incidences) we use the <A 
                    802: href="http://euroreves.ined.fr/imach/doc/imach.htm#Period prevalence in each state">stable 
                    803: or period prevalence</A> at age 70 (i.e. computed from incidences at earlier 
                    804: ages) instead of the <A 
                    805: href="http://euroreves.ined.fr/imach/doc/imach.htm#cross-sectional prevalence in each state">cross-sectional 
                    806: prevalence</A> (observed for example at first interview) (<A 
                    807: href="http://euroreves.ined.fr/imach/doc/imach.htm#Health expectancies">see 
                    808: below</A>).</P>
                    809: <H5><FONT color=#ec5e5e size=3><B>- Variances of life expectancies by age and 
                    810: initial health status</B></FONT><B>: </B><A 
                    811: href="http://euroreves.ined.fr/imach/doc/biaspar/vrbiaspar.txt"><B>biaspar/vrbiaspar.txt</B></A></H5>
                    812: <P>For example, the covariances of life expectancies Cov(ei,ej) at age 50 are 
                    813: (line 3) </P><PRE>   Cov(e1,e1)=0.4776  Cov(e1,e2)=0.0488=Cov(e2,e1)  Cov(e2,e2)=0.0424</PRE>
                    814: <H5><FONT color=#ec5e5e size=3><B>-Variances of one-step probabilities 
                    815: </B></FONT><B>: </B><A 
                    816: href="http://euroreves.ined.fr/imach/doc/biaspar/probrbiaspar.txt"><B>biaspar/probrbiaspar.txt</B></A></H5>
                    817: <P>For example, at age 65</P><PRE>   p11=9.960e-001 standard deviation of p11=2.359e-004</PRE>
                    818: <H5><FONT color=#ec5e5e size=3><B>- </B></FONT><A 
                    819: name="Health expectancies"><FONT color=#ec5e5e size=3><B>Health 
                    820: expectancies</B></FONT></A><FONT color=#ec5e5e size=3><B> with standard errors 
                    821: in parentheses</B></FONT><B>: </B><A 
                    822: href="http://euroreves.ined.fr/imach/doc/biaspar/trbiaspar.txt"><FONT 
                    823: 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>
                    824: <P>Thus, at age 70 the total life expectancy, e..=13.26 years is the weighted 
                    825: mean of e1.=13.46 and e2.=11.35 by the period prevalences at age 70 which are 
                    826: 0.90134 in state 1 and 0.09866 in state 2 respectively (the sum is equal to 
                    827: one). e.1=9.95 is the Disability-free life expectancy at age 70 (it is again a 
                    828: weighted mean of e11 and e21). e.2=3.30 is also the life expectancy at age 70 to 
                    829: be spent in the disability state.</P>
                    830: <H5><FONT color=#ec5e5e size=3><B>-Total life expectancy by age and health 
                    831: expectancies in states (1=healthy) and (2=disable)</B></FONT><B>: </B><A 
1.6     ! lievre    832: href="biaspar/ebiaspar1.png"><B>biaspar/ebiaspar1.png</B></A></H5>
1.5       lievre    833: <P>This figure represents the health expectancies and the total life expectancy 
1.6     ! lievre    834: with a confidence interval (dashed line). </P><PRE>        <IMG height=300 src="biaspar/ebiaspar1.png" width=400></PRE>
1.5       lievre    835: <P>Standard deviations (obtained from the information matrix of the model) of 
                    836: these quantities are very useful. Cross-longitudinal surveys are costly and do 
                    837: not involve huge samples, generally a few thousands; therefore it is very 
                    838: important to have an idea of the standard deviation of our estimates. It has 
                    839: been a big challenge to compute the Health Expectancy standard deviations. Don't 
                    840: be confused: life expectancy is, as any expected value, the mean of a 
                    841: distribution; but here we are not computing the standard deviation of the 
                    842: distribution, but the standard deviation of the estimate of the mean.</P>
                    843: <P>Our health expectancy estimates vary according to the sample size (and the 
                    844: standard deviations give confidence intervals of the estimates) but also 
                    845: according to the model fitted. We explain this in more detail.</P>
                    846: <P>Choosing a model means at least two kind of choices. First we have to 
                    847: decide the number of disability states. And second we have to design, within 
                    848: the logit model family, the model itself: variables, covariates, confounding 
                    849: factors etc. to be included.</P>
                    850: <P>The more disability states we have, the better is our demographical
                    851: approximation of the disability process, but the smaller the number of
                    852: transitions between each state and the higher the noise in the
                    853: measurement. We have not experimented enough with the various models
                    854: to summarize the advantages and disadvantages, but it is important to
                    855: note that even if we had huge unbiased samples, the total life
                    856: expectancy computed from a cross-longitudinal survey would vary with
                    857: the number of states. If we define only two states, alive or dead, we
                    858: find the usual life expectancy where it is assumed that at each age,
                    859: people are at the same risk of dying. If we are differentiating the
                    860: alive state into healthy and disabled, and as mortality from the
                    861: disabled state is higher than mortality from the healthy state, we are
                    862: introducing heterogeneity in the risk of dying. The total mortality at
                    863: each age is the weighted mean of the mortality from each state by the
                    864: prevalence of each state. Therefore if the proportion of people at each age and 
                    865: in each state is different from the period equilibrium, there is no reason to 
                    866: find the same total mortality at a particular age. Life expectancy, even if it 
                    867: is a very useful tool, has a very strong hypothesis of homogeneity of the 
                    868: population. Our main purpose is not to measure differential mortality but to 
                    869: measure the expected time in a healthy or disabled state in order to maximise 
                    870: the former and minimize the latter. But the differential in mortality 
                    871: complicates the measurement.</P>
                    872: <P>Incidences of disability or recovery are not affected by the number of states 
                    873: if these states are independent. But incidence estimates are dependent on the 
                    874: specification of the model. The more covariates we add in the logit
                    875: model the better 
                    876: is the model, but some covariates are not well measured, some are confounding 
                    877: factors like in any statistical model. The procedure to "fit the best model' is 
                    878: similar to logistic regression which itself is similar to regression analysis. 
                    879: We haven't yet been sofar because we also have a severe limitation which is the 
                    880: speed of the convergence. On a Pentium III, 500 MHz, even the simplest model, 
                    881: estimated by month on 8,000 people may take 4 hours to converge. Also, the IMaCh 
                    882: program is not a statistical package, and does not allow sophisticated design 
                    883: variables. If you need sophisticated design variable you have to them your self 
                    884: and and add them as ordinary variables. IMaCh allows up to 8 variables. The 
                    885: current version of this program allows only to add simple variables like age+sex 
                    886: or age+sex+ age*sex but will never be general enough. But what is to remember, 
                    887: is that incidences or probability of change from one state to another is 
                    888: affected by the variables specified into the model.</P>
                    889: <P>Also, the age range of the people interviewed is linked the age range of the 
                    890: life expectancy which can be estimated by extrapolation. If your sample ranges 
                    891: from age 70 to 95, you can clearly estimate a life expectancy at age 70 and 
                    892: trust your confidence interval because it is mostly based on your sample size, 
                    893: but if you want to estimate the life expectancy at age 50, you should rely in 
                    894: the design of your model. Fitting a logistic model on a age range of 70 to 95 
                    895: and estimating probabilties of transition out of this age range, say at age 50, 
                    896: is very dangerous. At least you should remember that the confidence interval 
                    897: given by the standard deviation of the health expectancies, are under the strong 
                    898: assumption that your model is the 'true model', which is probably not the case 
                    899: outside the age range of your sample.</P>
                    900: <H5><FONT color=#ec5e5e size=3><B>- Copy of the parameter file</B></FONT><B>: 
                    901: </B><A 
                    902: href="http://euroreves.ined.fr/imach/doc/orbiaspar.txt"><B>orbiaspar.txt</B></A></H5>
                    903: <P>This copy of the parameter file can be useful to re-run the program while 
                    904: saving the old output files. </P>
                    905: <H5><FONT color=#ec5e5e size=3><B>- Prevalence forecasting</B></FONT><B>: </B><A 
                    906: href="http://euroreves.ined.fr/imach/doc/biaspar/frbiaspar.txt"><B>biaspar/frbiaspar.txt</B></A></H5>
                    907: <P>First, we have estimated the observed prevalence between 1/1/1984 and 
                    908: 1/6/1988 (June, European syntax of dates). The mean date of all interviews 
                    909: (weighted average of the interviews performed between 1/1/1984 and 1/6/1988) is 
                    910: estimated to be 13/9/1985, as written on the top on the file. Then we forecast 
                    911: the probability to be in each state. </P>
                    912: <P>For example on 1/1/1989 : </P><PRE class=MsoNormal># StartingAge FinalAge P.1 P.2 P.3
1.1       brouard   913: # Forecasting at date 1/1/1989
1.5       lievre    914:   73 0.807 0.078 0.115</PRE>
                    915: <P>Since the minimum age is 70 on the 13/9/1985, the youngest forecasted age is 
                    916: 73. This means that at age a person aged 70 at 13/9/1989 has a probability to 
                    917: enter state1 of 0.807 at age 73 on 1/1/1989. Similarly, the probability to be in 
                    918: state 2 is 0.078 and the probability to die is 0.115. Then, on the 1/1/1989, the 
                    919: prevalence of disability at age 73 is estimated to be 0.088.</P>
                    920: <H5><FONT color=#ec5e5e size=3><B>- Population forecasting</B></FONT><B>: </B><A 
                    921: 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]
1.1       brouard   922: # Forecasting at date 1/1/1989 
                    923: 75 572685.22 83798.08 
                    924: 74 621296.51 79767.99 
1.5       lievre    925: 73 645857.70 69320.60 </PRE><PRE># Forecasting at date 1/1/19909 
1.1       brouard   926: 76 442986.68 92721.14 120775.48
                    927: 75 487781.02 91367.97 121915.51
1.5       lievre    928: 74 512892.07 85003.47 117282.76 </PRE>
                    929: <P>From the population file, we estimate the number of people in each state. At 
                    930: age 73, 645857 persons are in state 1 and 69320 are in state 2. One year latter, 
                    931: 512892 are still in state 1, 85003 are in state 2 and 117282 died before 
                    932: 1/1/1990.</P>
                    933: <HR>
                    934: 
                    935: <H2><A name=example></A><FONT color=#00006a>Trying an example</FONT></H2>
                    936: <P>Since you know how to run the program, it is time to test it on your own 
                    937: computer. Try for example on a parameter file named <A 
                    938: href="http://euroreves.ined.fr/imach/doc/imachpar.imach">imachpar.imach</A> 
                    939: which is a copy of <FONT face="Courier New" size=2>mypar.imach</FONT> included 
                    940: in the subdirectory of imach, <FONT face="Courier New" size=2>mytry</FONT>. Edit 
                    941: it and change the name of the data file to <FONT face="Courier New" 
                    942: size=2>mydata.txt</FONT> if you don't want to copy it on the same directory. The 
                    943: file <FONT face="Courier New">mydata.txt</FONT> is a smaller file of 3,000 
                    944: people but still with 4 waves. </P>
                    945: <P>Right click on the .imach file and a window will popup with the string 
                    946: '<STRONG>Enter the parameter file name:'</STRONG></P>
                    947: <TABLE border=1>
                    948:   <TBODY>
                    949:   <TR>
                    950:     <TD width="100%"><STRONG>IMACH, Version 0.97b</STRONG>
                    951:       <P><STRONG>Enter the parameter file name: 
                    952:   imachpar.imach</STRONG></P></TD></TR></TBODY></TABLE>
                    953: <P>Most of the data files or image files generated, will use the 'imachpar' 
                    954: string into their name. The running time is about 2-3 minutes on a Pentium III. 
                    955: If the execution worked correctly, the outputs files are created in the current 
                    956: directory, and should be the same as the mypar files initially included in the 
                    957: directory <FONT face="Courier New" size=2>mytry</FONT>.</P>
                    958: <UL>
                    959:   <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>
1.1       brouard   960: #
1.2       brouard   961: title=MLE datafile=mydaiata.txt lastobs=3000 firstpass=1 lastpass=3
1.5       lievre    962: ftol=1.000000e-008 stepm=24 ncovcol=2 nlstate=2 ndeath=1 maxwav=4 mle=1 weight=0</PRE>
                    963:   <LI><PRE>Total number of individuals= 2965, Agemin = 70.00, Agemax= 100.92
1.1       brouard   964: 
                    965: Warning, no any valid information for:126 line=126
                    966: Warning, no any valid information for:2307 line=2307
                    967: Delay (in months) between two waves Min=21 Max=51 Mean=24.495826
1.5       lievre    968: <FONT face="Times New Roman">These lines give some warnings on the data file and also some raw statistics on frequencies of transitions.</FONT>
1.1       brouard   969: Age 70 1.=230 loss[1]=3.5% 2.=16 loss[2]=12.5% 1.=222 prev[1]=94.1% 2.=14
                    970:  prev[2]=5.9% 1-1=8 11=200 12=7 13=15 2-1=2 21=6 22=7 23=1
1.5       lievre    971: Age 102 1.=0 loss[1]=NaNQ% 2.=0 loss[2]=NaNQ% 1.=0 prev[1]=NaNQ% 2.=0 </PRE></LI></UL>It 
                    972: includes some warnings or errors which are very important for you. Be careful 
                    973: with such warnings because your results may be biased if, for example, you have 
                    974: people who accepted to be interviewed at first pass but never after. Or if you 
                    975: don't have the exact month of death. In such cases IMaCh doesn't take any 
                    976: initiative, it does only warn you. It is up to you to decide what to do with 
                    977: these people. Excluding them is usually a wrong decision. It is better to decide 
                    978: that the month of death is at the mid-interval between the last two waves for 
                    979: example.
                    980: <P>If you survey suffers from severe attrition, you have to analyse the 
                    981: characteristics of the lost people and overweight people with same 
                    982: characteristics for example. 
                    983: <P>By default, IMaCH warns and excludes these problematic people, but you have 
                    984: to be careful with such results. 
                    985: <P>&nbsp;</P>
                    986: <UL>
                    987:   <LI>Maximisation with the Powell algorithm. 8 directions are given 
                    988:   corresponding to the 8 parameters. this can be rather long to get 
                    989:   convergence.<BR><FONT face="Courier New" size=1><BR>Powell iter=1 
                    990:   -2*LL=11531.405658264877 1 0.000000000000 2 0.000000000000 3<BR>0.000000000000 
                    991:   4 0.000000000000 5 0.000000000000 6 0.000000000000 7 <BR>0.000000000000 8 
                    992:   0.000000000000<BR>1..........2.................3..........4.................5.........<BR>6................7........8...............<BR>Powell 
                    993:   iter=23 -2*LL=6744.954108371555 1 -12.967632334283 <BR>2 0.135136681033 3 
                    994:   -7.402109728262 4 0.067844593326 <BR>5 -0.673601538129 6 -0.006615504377 7 
                    995:   -5.051341616718 <BR>8 
                    996:   0.051272038506<BR>1..............2...........3..............4...........<BR>5..........6................7...........8.........<BR>#Number 
                    997:   of iterations = 23, -2 Log likelihood = 6744.954042573691<BR># 
                    998:   Parameters<BR>12 -12.966061 0.135117 <BR>13 -7.401109 0.067831 <BR>21 
                    999:   -0.672648 -0.006627 <BR>23 -5.051297 0.051271 </FONT><BR>
                   1000:   <LI><PRE><FONT size=2>Calculation of the hessian matrix. Wait...
1.1       brouard  1001: 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
                   1002: 
                   1003: Inverting the hessian to get the covariance matrix. Wait...
                   1004: 
                   1005: #Hessian matrix#
                   1006: 3.344e+002 2.708e+004 -4.586e+001 -3.806e+003 -1.577e+000 -1.313e+002 3.914e-001 3.166e+001 
                   1007: 2.708e+004 2.204e+006 -3.805e+003 -3.174e+005 -1.303e+002 -1.091e+004 2.967e+001 2.399e+003 
                   1008: -4.586e+001 -3.805e+003 4.044e+002 3.197e+004 2.431e-002 1.995e+000 1.783e-001 1.486e+001 
                   1009: -3.806e+003 -3.174e+005 3.197e+004 2.541e+006 2.436e+000 2.051e+002 1.483e+001 1.244e+003 
                   1010: -1.577e+000 -1.303e+002 2.431e-002 2.436e+000 1.093e+002 8.979e+003 -3.402e+001 -2.843e+003 
                   1011: -1.313e+002 -1.091e+004 1.995e+000 2.051e+002 8.979e+003 7.420e+005 -2.842e+003 -2.388e+005 
                   1012: 3.914e-001 2.967e+001 1.783e-001 1.483e+001 -3.402e+001 -2.842e+003 1.494e+002 1.251e+004 
                   1013: 3.166e+001 2.399e+003 1.486e+001 1.244e+003 -2.843e+003 -2.388e+005 1.251e+004 1.053e+006 
                   1014: # Scales
                   1015: 12 1.00000e-004 1.00000e-006
                   1016: 13 1.00000e-004 1.00000e-006
                   1017: 21 1.00000e-003 1.00000e-005
                   1018: 23 1.00000e-004 1.00000e-005
                   1019: # Covariance
                   1020:   1 5.90661e-001
                   1021:   2 -7.26732e-003 8.98810e-005
                   1022:   3 8.80177e-002 -1.12706e-003 5.15824e-001
                   1023:   4 -1.13082e-003 1.45267e-005 -6.50070e-003 8.23270e-005
                   1024:   5 9.31265e-003 -1.16106e-004 6.00210e-004 -8.04151e-006 1.75753e+000
                   1025:   6 -1.15664e-004 1.44850e-006 -7.79995e-006 1.04770e-007 -2.12929e-002 2.59422e-004
                   1026:   7 1.35103e-003 -1.75392e-005 -6.38237e-004 7.85424e-006 4.02601e-001 -4.86776e-003 1.32682e+000
                   1027:   8 -1.82421e-005 2.35811e-007 7.75503e-006 -9.58687e-008 -4.86589e-003 5.91641e-005 -1.57767e-002 1.88622e-004
                   1028: # agemin agemax for lifexpectancy, bage fage (if mle==0 ie no data nor Max likelihood).
                   1029: 
                   1030: 
                   1031: agemin=70 agemax=100 bage=50 fage=100
                   1032: Computing prevalence limit: result on file 'plrmypar.txt' 
                   1033: Computing pij: result on file 'pijrmypar.txt' 
                   1034: Computing Health Expectancies: result on file 'ermypar.txt' 
                   1035: Computing Variance-covariance of DFLEs: file 'vrmypar.txt' 
                   1036: Computing Total LEs with variances: file 'trmypar.txt' 
                   1037: Computing Variance-covariance of Prevalence limit: file 'vplrmypar.txt' 
                   1038: End of Imach
1.5       lievre   1039: </FONT></PRE></LI></UL>
                   1040: <P><FONT size=3>Once the running is finished, the program requires a 
                   1041: character:</FONT></P>
                   1042: <TABLE border=1>
                   1043:   <TBODY>
                   1044:   <TR>
                   1045:     <TD width="100%"><STRONG>Type e to edit output files, g to graph again, c 
                   1046:       to start again, and q for exiting:</STRONG></TD></TR></TBODY></TABLE>In order to 
                   1047: have an idea of the time needed to reach convergence, IMaCh gives an estimation 
                   1048: if the convergence needs 10, 20 or 30 iterations. It might be useful. 
                   1049: <P><FONT size=3>First you should enter <STRONG>e </STRONG>to edit the master 
                   1050: file mypar.htm. </FONT></P>
                   1051: <UL>
                   1052:   <LI><U>Outputs files</U> <BR><BR>- Copy of the parameter file: <A 
                   1053:   href="http://euroreves.ined.fr/imach/doc/ormypar.txt">ormypar.txt</A><BR>- 
                   1054:   Gnuplot file name: <A 
                   1055:   href="http://euroreves.ined.fr/imach/doc/mypar.gp.txt">mypar.gp.txt</A><BR>- 
                   1056:   Cross-sectional prevalence in each state: <A 
                   1057:   href="http://euroreves.ined.fr/imach/doc/prmypar.txt">prmypar.txt</A> <BR>- 
                   1058:   Period prevalence in each state: <A 
                   1059:   href="http://euroreves.ined.fr/imach/doc/plrmypar.txt">plrmypar.txt</A> <BR>- 
                   1060:   Transition probabilities: <A 
                   1061:   href="http://euroreves.ined.fr/imach/doc/pijrmypar.txt">pijrmypar.txt</A><BR>- 
                   1062:   Life expectancies by age and initial health status (estepm=24 months): <A 
                   1063:   href="http://euroreves.ined.fr/imach/doc/ermypar.txt">ermypar.txt</A> <BR>- 
                   1064:   Parameter file with estimated parameters and the covariance matrix: <A 
                   1065:   href="http://euroreves.ined.fr/imach/doc/rmypar.txt">rmypar.txt</A> <BR>- 
                   1066:   Variance of one-step probabilities: <A 
                   1067:   href="http://euroreves.ined.fr/imach/doc/probrmypar.txt">probrmypar.txt</A> 
                   1068:   <BR>- Variances of life expectancies by age and initial health status 
                   1069:   (estepm=24 months): <A 
                   1070:   href="http://euroreves.ined.fr/imach/doc/vrmypar.txt">vrmypar.txt</A><BR>- 
                   1071:   Health expectancies with their variances: <A 
                   1072:   href="http://euroreves.ined.fr/imach/doc/trmypar.txt">trmypar.txt</A> <BR>- 
                   1073:   Standard deviation of period prevalences: <A 
                   1074:   href="http://euroreves.ined.fr/imach/doc/vplrmypar.txt">vplrmypar.txt</A> 
                   1075:   <BR>No population forecast: popforecast = 0 (instead of 1) or stepm = 24 
                   1076:   (instead of 1) or model=. (instead of .)<BR><BR>
                   1077:   <LI><U>Graphs</U> <BR><BR>-<A 
                   1078:   href="http://euroreves.ined.fr/imach/mytry/pemypar1.gif">One-step transition 
                   1079:   probabilities</A><BR>-<A 
                   1080:   href="http://euroreves.ined.fr/imach/mytry/pmypar11.gif">Convergence to the 
                   1081:   period prevalence</A><BR>-<A 
                   1082:   href="http://euroreves.ined.fr/imach/mytry/vmypar11.gif">Cross-sectional and 
                   1083:   period prevalence in state (1) with the confident interval</A> <BR>-<A 
                   1084:   href="http://euroreves.ined.fr/imach/mytry/vmypar21.gif">Cross-sectional and 
                   1085:   period prevalence in state (2) with the confident interval</A> <BR>-<A 
                   1086:   href="http://euroreves.ined.fr/imach/mytry/expmypar11.gif">Health life 
                   1087:   expectancies by age and initial health state (1)</A> <BR>-<A 
                   1088:   href="http://euroreves.ined.fr/imach/mytry/expmypar21.gif">Health life 
                   1089:   expectancies by age and initial health state (2)</A> <BR>-<A 
                   1090:   href="http://euroreves.ined.fr/imach/mytry/emypar1.gif">Total life expectancy 
                   1091:   by age and health expectancies in states (1) and (2).</A> </LI></UL>
                   1092: <P>This software have been partly granted by <A 
                   1093: href="http://euroreves.ined.fr/">Euro-REVES</A>, a concerted action from the 
                   1094: European Union. It will be copyrighted identically to a GNU software product, 
                   1095: i.e. program and software can be distributed freely for non commercial use. 
                   1096: Sources are not widely distributed today. You can get them by asking us with a 
                   1097: simple justification (name, email, institute) <A 
                   1098: href="mailto:brouard@ined.fr">mailto:brouard@ined.fr</A> and <A 
                   1099: href="mailto:lievre@ined.fr">mailto:lievre@ined.fr</A> .</P>
                   1100: <P>Latest version (0.97b of June 2004) can be accessed at <A 
                   1101: href="http://euroreves.ined.fr/imach">http://euroreves.ined.fr/imach</A><BR></P></BODY></HTML>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>