******************************************************************************** // program : calcss-01.do // task : calculate sample size for 3x3 or 4x4 crossover design // outcome : Sample size // author : Julie Wych // date : June 18 // version : 1.0 ******************************************************************************** // #1: set local macros local withsd = //set within-person SD here local est_effect = //set estimated trt effect here local power_req = 0.8 //set desired power to estimate trt effect eg. 0.8 or 0.9 local min_subs = //set minimum number of subjects required mata : mata clear // #2: 3x3 cross-over design ssizeabc, sigma_e(`withsd') effect(`est_effect') req_power(`power_req') req_subs(`min_subs') // #3: 4x4 cross-over design ssizeabcd, sigma_e(`withsd') effect(`est_effect') req_power(`power_req') req_subs(`min_subs')