-
Login or Register
- Log in with
****************************************************** ************** UNCOMMENT AFTER FIRST ITERATION (START) ****************************************************** /* use N_dominated, clear /* This file is created after the first iteration of the design */ while N_dominated > 0 { qui{ clear all set more off ** RANDOMLY GENERATE RANDOM SEED local rand = runiformint(0,200000) set seed `rand' */ ****************************************************** **************** UNCOMMENT AFTER FIRST ITERATION (END) ****************************************************** ** GENERATE EXPERIMENT DESIGN HERE ***************************************** ************************* TEST DOMINATED ***************************************** save CEdesign_temp, replace reshape wide attribute1 attribute2 cost, i(card_id) j(alt) gen dominated = (attribute11 > attribute12 & /// cost1 < cost2) | /// (attribute11 < attribute12 & /// cost1 > cost2) /// egen N_dominated = sum(dominated) keep N_dominated duplicates drop tempfile dom save `dom' save N_dominated, replace /*Comment this line after first iteration*/ *append using N_dominated /*Uncomment this line after first iteration*/ save N_dominated, replace } sum N_dominated /*This allows you to see how many dominated strategies occured in the current iteration*/ qui{ use `dom', clear } } ***************************************** ********************************* EXPORT ***************************************** use CEdesign_temp, clear save CEdesign, replace
Leave a comment: