13.07.2015 Views

LIAM 2 User Guide

LIAM 2 User Guide

LIAM 2 User Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>LIAM</strong> 2 <strong>User</strong> <strong>Guide</strong>, 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 theevent 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 estimatedlogits. 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 notpertain to.When the score is known, it can be either used as-is:- event_happened: uniform() < score_variableor in combination with an alignment (see below).alignNow that we have computed a score (risk) for an event happening, we might want to use alignment so the numberof 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 <strong>LIAM</strong> 2 iscalled “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 expressiongiven by the modeller. One will usually use logit_score() to compute it, but it can be computed in any other way amodeller choose.To know more about the alignment process reading “Evaluating Alignment Methods in Dynamic MicrosimulationModels”, 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 rankindividuals. One will usually use logit_score() to compute the score, but it can be computed in any otherway a modeller choose. Note that the score is not modified in any way within the align() function, so if one5.5. Expressions 21

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!