It uses in input the file Chronicle.dta, containing the data extraction, and the file VarSetup.dta, containing information relative to such extraction. These files must be saved in the working directory.
Each date of change in any of the variables considered in the analysis must be included in the Chronicle file. The Chronicle file should contain the columns ID_I, Type, Value, Day, Month, Year and DayFrac (used to adjust date collisions). The Chronicle file must also contain a variable which defines the period in which the individual is at risk (specified in the syntax below), with value 1 when the individual first becomes at risk and Value 0 when the individual last stops being at risk. Gaps in the period at risk can also be defined (0 on the date of exit and 1 on the date of return). All spells when the individual is not at risk are deleted from the episodes table by the program.
Information relating to the variables included in the extraction must be included in the Variable setup file, which should contain the fields Type, Transition and Duration. Transition distinguishes between events (which change value at the end of a spell: Transition = End), time-varying variables (which change value at the start of a spell: Transition = Start) and time-invariant variables (Transition = Invariant). Duration distinguishes whether the Values of a Type are valid only on their date of declaration (Duration = Instant) or between a date of declaration and the next date of declaration/End_date (Duration = Continuous).
When creating an episodes table, labels can be added by the program to Values of categorical numerical variables. Labels should be stored in an external file containing the fields Type, Value and ValueLabel.
The file can be specified in the syntax when running the program, as shown below. Using labels is optional.
The program rectangularises time-varying and time-invariant variables and events and creates spells, based on the dates of change in any of these variables. In the last steps the program formats the episodes file based on the information specified in the Variable setup file.
The output of the program is saved with the name Elisodes_file_time_string.dta (the time string contains the date and time when the final file is saved).