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.0align(0.0, ’al_p_dead.csv’, expressions=[gender, age + 1])• possible_values: specify the different values for each of the expressions in the expressions argument thatshould be evaluated. The combination of the different lists of possible values will form all the alignmentcategories. For example:align(0.0,proportions=[0.1, 0.2, 0.3, 0.4],expressions=[gender, age < 50],possible_values=[[False, True], [False, True]])• frac_need: control how “fractional needs” are handled. This argument can take any of three values: “uniform”(default), “cutoff” or “round”.– “uniform” draws a random number (u) from an uniform distribution and adds one individual if u = 0.5.– “cutoff” tries to match the total need as closely as possible (at the expense of a slight loss of precisionfor individual categories) by searching for the “cutoff point” that yields:count(frac_need >= cutoff) == sum(frac_need)In practice alignment data is often separate for men and women. In that case, one will usually use the followingform:- variable: if(condition,if(gender,align(score_expr, ’filename_m.csv’),align(score_expr, ’filename_f.csv’)),False)Since <strong>LIAM</strong>2 supports alignment with any number of dimensions, one could also merge both data files in a singlefile with one more dimension and use a single align() expression:- variable: if(condition,align(score_expr, ’filename_m_and_f.csv’),False)# or even- variable: align(score_expr, ’filename_m_and_f.csv’, filter=condition)In the example below describes the process of getting (or keeping) a job:inwork:- work_score: -1# men- work_score: if(ISMALE and ACTIVEAGE and ISINWORK,logit_score(-0.196599 * age + 0.0086552 * age **2 - 0.000988 * age **3+ 0.1892796 * ISMARRIED + 3.554612),work_score)- work_score: if(ISMALE and ACTIVEAGE and (ISUNEMPLOYED or ISOTHERINACTIVE),logit_score(0.9780908 * age - 0.0261765 * age **2 + 0.000199 * age **3- 12.39108),work_score)# women- work_score: if(ISFEMALE and ACTIVEAGE and ISINWORK,logit_score(-0.2740483 * age + 0.0109883 * age **2 - 0.0001159 * age **3- 0.0906834 * ISMARRIED + 3.648706),work_score)- work_score: if(ISFEMALE and ACTIVEAGE and (ISUNEMPLOYED or ISOTHERINACTIVE),logit_score(0.8217638 * age - 0.0219761 * age **2 + 0.000166 * age **3- 0.5590975 * ISMARRIED - 10.48043),work_score)5.5. Expressions 23

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

Saved successfully!

Ooh no, something went wrong!