******************************************************************************* **Main Results: The Effects of Header Images on Different Devices in Web Surveys ******************************************************************************* clear all set more off *use "~/Time Use and Stress.dta", clear **************************************************************** *****************Preperation**************************************** **************************************************************** **Dropouts destring lastpage, gen(dropout) recode dropout (0=.a) recode dropout (4378599=1) (4378600=2) (4378601=5) (4378603=4) (4378605=7) (4378608=9) (4378615=20) (4383053=6) (4388768=3) recode dropout (4390426=1) (4390427=2) (4390428=3) (4390429=4) (4390430=5) (4390431=6) (4390445=9) (4390446=20) recode dropout (4390532=1) (4390533=2) (4390534=3) (4390535=4) (4390536=5) (4390537=6) (4390538=7) (4390538=7) (4390550=18) (4390551=19) (4390552=20) recode dropout (4390583=5) (4390584=1) (4390585=2) (4390586=3) (4390587=4) (4390588=5) (4390590=7) (4390593=9) (4390597=9) (4390600=10) (4390602=18) (4390604=20) recode dropout (4390607=0) (4390608=1) (4390609=2) (4390610=3) (4390611=4) (4390612=5) (4390613=6) (4390625=17) (4390628=20) recode dropout (7/19=7) recode dropout (20=.a) gen dropout1 = 1 if dropout <2 replace dropout1 = 0 if dropout >1 gen dropout2 = 1 if dropout <3 replace dropout2 = 0 if dropout >2 gen dropout3 = 1 if dropout <4 replace dropout3 = 0 if dropout >3 gen dropout4 = 1 if dropout <5 replace dropout4 = 0 if dropout >4 gen dropout5 = 1 if dropout <6 replace dropout5 = 0 if dropout >5 gen dropout6 = 1 if dropout <7 replace dropout6 = 0 if dropout >6 gen dropout7 = 1 if dropout <8 replace dropout7 = 0 if dropout >7 & dropout <20 gen dropoutall = 1 replace dropoutall=0 if dropout ==.a destring lastpage, gen(complete) recode complete (4378615 4390446 4390552 4390604 4390628 = 1) (0=0) (else=0) label var complete "questionnaire completed" label value complete yesno egen nmissing1=rowmiss(v1-v3_8 v6-v7_6) gen drop = 99 replace drop = 0 if v1 ==.b //dropped out on page 1 without answering the questions replace drop = 1 if v1 !=.b & v2_1 ==.b // answered first page and then dropped out replace drop = 2 if v1 !=.b & v2_1 !=.b& v3_1==.b replace drop = 3 if v1 !=.b & v2_1 !=.b & v3_1!=.b & v4_1==.b replace drop = 4 if v1 !=.b& v2_1 !=.b & v3_1!=.b & v4_1!=.b & v5_1==.b replace drop = 5 if v1 !=.b& v2_1 !=.b & v3_1!=.b & v4_1!=.b & v5_1!=.b & v7_1 ==.b replace drop = 6 if v1 !=.b& v2_1 !=.b & v3_1!=.b & v4_1!=.b & v5_1!=.b & v7_1 !=.b & v8 ==.b replace drop = 7 if v1 !=.b& v2_1 !=.b & v3_1!=.b & v4_1!=.b & v5_1!=.b & v7_1 !=.b & v8 !=.b & v10 ==.b replace drop = 8 if v1 !=.b& v2_1 !=.b & v3_1!=.b & v4_1!=.b & v5_1!=.b & v7_1 !=.b & v8 !=.b& v10 !=.b& v15 ==.b replace drop = 9 if v1 !=.b& v2_1 !=.b & v3_1!=.b & v4_1!=.b & v5_1!=.b & v7_1 !=.b & v8 !=.b& v10 !=.b & v15 !=.b & v17==.b replace drop = 10 if v1 !=.b& v2_1 !=.b & v3_1!=.b & v4_1!=.b & v5_1!=.b & v7_1 !=.b & v8 !=.b& v10 !=.b & v15 !=.b & v17!=.b & v22==.b replace drop = 11 if v1 !=.b& v2_1 !=.b & v3_1!=.b & v4_1!=.b & v5_1!=.b & v7_1 !=.b & v8 !=.b& v10 !=.b & v15 !=.b & v17!=.b & v22!=.b & v23==.b replace drop = 12 if v1 !=.b& v2_1 !=.b & v3_1!=.b & v4_1!=.b & v5_1!=.b & v7_1 !=.b & v8 !=.b& v10 !=.b & v15 !=.b & v17!=.b & v22!=.b& v23==.b recode drop (99=13) gen answered = 1 if drop>0 & v1!=.a recode answered (.=0) //1 respondents answered at least one question gen breakoff = 1 if answered ==1 & drop >0 & drop <12 recode breakoff (.=0) gen droprr= 1 if drop ==0 | drop==1 replace droprr=0 if drop >1 label val droprr yesno **Dummy for Missing Data recode nmissing (0=.), gen(mis) recode nmissing (1/max=1), gen(misdum) **************************************************************** *****************Table 2**************************************** **************************************************************** tab droprr pic, col chi V //line 1 tab complete pic, col chi V //line 2 drop if restype >2 //restriciton to valid cases tab misdum pic,col chi V //line 3 tab v23 pic,col chi V //line 4 **************************************************************** *****************Table 1**************************************** **************************************************************** tab device logo, row chi V **************************************************************** *****************Table 3**************************************** **************************************************************** recode v4_1 (0=.a) //no class participation is set as missing recode v4_2 (0=.a) //no studying is set as missing recode v5_1 (0=.a) recode v5_2 (0=.a) recode v16 (0=.) (9=.) recode v5_1 (20=.a) //invalid value is set as missing recode v5_2 (30=.a) //invalid value is set as missing drop if v10 ==5 //drop PhD stundents for mulitvariate analyses reg v4_1 i.logo i.device //class(1a) reg v4_1 i.logo##i.device //class(1b) reg v4_2 i.logo i.device //studying(2a) reg v4_2 i.logo##i.device //stuyding (2b) **************************************************************** *****************Table 4**************************************** **************************************************************** recode v7_1 (1 2 =0) (3=1) // DV as dummy logit v7_1 i.logo i.device //class (1a) logit v7_1 i.logo##i.device //class (1b)