Download LIAM 2 User Guide

Transcript
LIAM 2 User Guide, Release 0.7.0
- score_variable: if(condition_1,
logit_score(logit_expr_1),
score_variable)
# second condition
- score_variable: if(condition_2,
logit_score(logit_expr_2),
score_variable)
# ... other conditions ...
In a first sub-process, a variable score_variable is set equal to -1, because this makes it highly unlikely that the
event will happen to those not included in the conditions for which the logit is applied.
Next, subject to conditions condition_1 and condition_2, this score (risk) is simulated on the basis of estimated
logits. Note that by specifying the endogenous variable score_variable without any transformation in the “else”
conditions of the if functions makes sure that the score variable is not manipulated by a sub-process it does not
pertain to.
When the score is known, it can be either used as-is:
- event_happened: uniform() < score_variable
or in combination with an alignment (see below).
align
Now that we have computed a score (risk) for an event happening, we might want to use alignment so the number
of events occuring per category matches a proportion defined externaly.
There are different ways to choose which individuals are taken. The methodology used for now by LIAM 2 is
called “alignment by sorting”, that is, for each category, the N individuals with the highest scores are selected.
The score computation is not done internally by the align() function, but is rather computed by an expression
given by the modeller. One will usually use logit_score() to compute it, but it can be computed in any other way a
modeller choose.
To know more about the alignment process reading “Evaluating Alignment Methods in Dynamic Microsimulation
Models”, by Li and O’Donoghue is advised.
An alignment expression takes the following general form:
align(score,
proportions
[, filter=conditions]
[, take=conditions]
[, leave=conditions]
[, expressions=expressions]
[, possible_values=pvalues]
[, frac_need="uniform"|"round"|"cutoff"])
For example, it could look like:
- unemp: align(unemp_score,
’al_p_unemployed_m.csv’,
filter=not ISINWORK and (age > 15) and (age < 65),
take=ISUNEMPLOYED,
leave=ISSTUDENT or ISRETIRED)
Now let us examine each argument in turn:
• score: it must be an expression (or a simple variable) returning a numerical value. It will be used to rank
individuals. One will usually use logit_score() to compute the score, but it can be computed in any other
way a modeller choose. Note that the score is not modified in any way within the align() function, so if one
5.5. Expressions
21