******************************************************************************** * -unidiff- Program for the estimation of uniform layer effect models * * Examples illustrating the use of the program ******************************************************************************** * Setup set matsize 800 capture log using unidiff.log, replace set more off ************* * EXAMPLE 1 * ************* * Insert 1 use example1.dta, clear describe label list * Insert 2 local COUNTRY "US GB JA" local i=1 while `i'<=3 { local ITEM : word `i' of `COUNTRY' local j=1 while `j'<=5 { generate diag`i'`j'=country==`i' & father==`j' & son==`j' lab var diag`i'`j' "`ITEM': Immobility in class `j'" local j=`j'+1 } local i=`i'+1 } describe * Insert 3 unidiff obs, row(father) col(son) lay(country) effect(add) pattern(fi) /* */ extra(diag11-diag35) * Insert 4 unidiff obs, row(father) col(son) lay(country) effect(add) pattern(fi) /* */ extra(diag11-diag35) constraints(1 1 2) nodetail nodisprc /* */ nodispext * Insert 5 unidiff obs, row(father) col(son) lay(country) effect(add) pattern(hrce) /* */ extra(diag11-diag35) nodispext * Insert 6 unidiff obs, row(father) col(son) lay(country) effect(mult) pattern(fi) /* */ extra(diag11-diag35) nodispext ************* * EXAMPLE 2 * ************* * Insert 1 use example2.dta, clear describe label list * Insert 2 unidiff obs, row(father) col(son) lay(country) effect(mult) pattern(fi) * Insert 3 unidiff obs, row(father) col(son) lay(country) effect(addlin) pattern(fi) /* */ scores(develop socdem east asia) ************* * END * ************* log close exit