* * * * * * * * * * * Memory Effects * * * * * * * * * * * version 16 * * * Open data, merge paradata * * * global data "[path_to_data]" global output "[output_path]" use "$data\GIP_W38_V1.dta", clear merge 1:1 id_g using "$data\GIP_paradata_W38_V1.dta" keep id_g ZF* expZF* sample *_18 interrupt compl *_start *_end device numlabel _all, add force * * * * * * * * * * * * Data preparation * * * * * * * * * * * * gen smartphone = . replace smartphone = 1 if device <= 3 replace smartphone = 0 if device > 3 & device != . drop device * Soziodemographics by group * keep if expZF38092 == 1 | expZF38092 == 2 | expZF38092 == 5 | expZF38092 == 6 | expZF38092 == 9 | expZF38092 == 10 // keep only groups with follow-up questions tab1 gender_18 year_of_birth_cat_18 educ_school_18 smartphone sample, mis foreach var of varlist(gender_18 year_of_birth_cat_18 educ_school_18) { replace `var' = . if `var' == -80 | `var' == -90 } gen grupp = . replace grupp = 1 if expZF38092 == 1 | expZF38092 == 2 replace grupp = 2 if expZF38092 == 5 | expZF38092 == 6 replace grupp = 3 if expZF38092 == 9 | expZF38092 == 10 tab grupp year_of_birth_cat_18, chi row tab grupp gender_18, chi row tab grupp educ_school_18, chi row tab grupp smartphone, chi row tab grupp sample, chi row tab interrupt tab compl gen answer_1 = . replace answer_1 = ZF38092 if expZF38092 == 1 replace answer_1 = ZF38093 if expZF38092 == 2 replace answer_1 = ZF38094 if expZF38092 == 5 replace answer_1 = ZF38095 if expZF38092 == 6 replace answer_1 = ZF38096 if expZF38092 == 9 replace answer_1 = ZF38097 if expZF38092 == 10 gen answer_2 = . replace answer_2 = ZF38093 if expZF38092 == 1 replace answer_2 = ZF38092 if expZF38092 == 2 replace answer_2 = ZF38095 if expZF38092 == 5 replace answer_2 = ZF38094 if expZF38092 == 6 replace answer_2 = ZF38097 if expZF38092 == 9 replace answer_2 = ZF38096 if expZF38092 == 10 gen memory_1 = . replace memory_1 = ZF38098 if expZF38092 == 1 replace memory_1 = ZF38101 if expZF38092 == 2 replace memory_1 = ZF38104 if expZF38092 == 5 replace memory_1 = ZF38107 if expZF38092 == 6 replace memory_1 = ZF38110 if expZF38092 == 9 replace memory_1 = ZF38113 if expZF38092 == 10 gen memory_2 = . replace memory_2 = ZF38101 if expZF38092 == 1 replace memory_2 = ZF38098 if expZF38092 == 2 replace memory_2 = ZF38107 if expZF38092 == 5 replace memory_2 = ZF38104 if expZF38092 == 6 replace memory_2 = ZF38113 if expZF38092 == 9 replace memory_2 = ZF38110 if expZF38092 == 10 gen recall_1 = . replace recall_1 = ZF38099 if expZF38092 == 1 replace recall_1 = ZF38102 if expZF38092 == 2 replace recall_1 = ZF38105 if expZF38092 == 5 replace recall_1 = ZF38108 if expZF38092 == 6 replace recall_1 = ZF38111 if expZF38092 == 9 replace recall_1 = ZF38114 if expZF38092 == 10 gen recall_2 = . replace recall_2 = ZF38102 if expZF38092 == 1 replace recall_2 = ZF38099 if expZF38092 == 2 replace recall_2 = ZF38108 if expZF38092 == 5 replace recall_2 = ZF38105 if expZF38092 == 6 replace recall_2 = ZF38114 if expZF38092 == 9 replace recall_2 = ZF38111 if expZF38092 == 10 gen certain_1 = . replace certain_1 = ZF38100 if expZF38092 == 1 replace certain_1 = ZF38103 if expZF38092 == 2 replace certain_1 = ZF38106 if expZF38092 == 5 replace certain_1 = ZF38109 if expZF38092 == 6 replace certain_1 = ZF38112 if expZF38092 == 9 replace certain_1 = ZF38115 if expZF38092 == 10 gen certain_2 = . replace certain_2 = ZF38103 if expZF38092 == 1 replace certain_2 = ZF38100 if expZF38092 == 2 replace certain_2 = ZF38109 if expZF38092 == 5 replace certain_2 = ZF38106 if expZF38092 == 6 replace certain_2 = ZF38115 if expZF38092 == 9 replace certain_2 = ZF38112 if expZF38092 == 10 * "answer" = original answer * "memory" = "can you recall?" yes/no * "recall" = repeated answer (may at this point be right or wrong) * "certain" = "how certain are you?" * * * * * * * * * * response time * * * * * * * * * * * for answering test questions * forvalues page = 2(1)7 { gen double page`page's = f00`page'_start / 1000 gen double page`page'e = f00`page'_end / 1000 local question = `page' - 1 gen question_`question' = page`page'e - page`page's drop page`page's page`page'e } gen time_1 = . replace time_1 = question_1 if expZF38092 == 1 replace time_1 = question_2 if expZF38092 == 2 replace time_1 = question_3 if expZF38092 == 5 replace time_1 = question_4 if expZF38092 == 6 replace time_1 = question_5 if expZF38092 == 9 replace time_1 = question_6 if expZF38092 == 10 gen time_2 = . replace time_2 = question_2 if expZF38092 == 1 replace time_2 = question_1 if expZF38092 == 2 replace time_2 = question_4 if expZF38092 == 5 replace time_2 = question_3 if expZF38092 == 6 replace time_2 = question_6 if expZF38092 == 9 replace time_2 = question_5 if expZF38092 == 10 * for time between test questions and follow-ups * gen double distance_1 = . gen double distance_2 = . * question pages per group: * gen double pagex1 = . gen double pagex2 = . replace pagex1 = f002_end / 1000 if expZF38092 == 1 replace pagex1 = f003_end / 1000 if expZF38092 == 2 replace pagex1 = f004_end / 1000 if expZF38092 == 5 replace pagex1 = f005_end / 1000 if expZF38092 == 6 replace pagex1 = f006_end / 1000 if expZF38092 == 9 replace pagex1 = f007_end / 1000 if expZF38092 == 10 replace pagex2 = f003_end / 1000 if expZF38092 == 1 replace pagex2 = f002_end / 1000 if expZF38092 == 2 replace pagex2 = f005_end / 1000 if expZF38092 == 5 replace pagex2 = f004_end / 1000 if expZF38092 == 6 replace pagex2 = f007_end / 1000 if expZF38092 == 9 replace pagex2 = f006_end / 1000 if expZF38092 == 10 * follow-up pages per group * gen pagey1 = . gen pagey2 = . replace pagey1 = f081_end / 1000 if expZF38092 == 1 replace pagey1 = f084_end / 1000 if expZF38092 == 2 replace pagey1 = f087_end / 1000 if expZF38092 == 5 replace pagey1 = f090_end / 1000 if expZF38092 == 6 replace pagey1 = f093_end / 1000 if expZF38092 == 9 replace pagey1 = f096_end / 1000 if expZF38092 == 10 replace pagey2 = f084_end / 1000 if expZF38092 == 1 replace pagey2 = f081_end / 1000 if expZF38092 == 2 replace pagey2 = f090_end / 1000 if expZF38092 == 5 replace pagey2 = f087_end / 1000 if expZF38092 == 6 replace pagey2 = f096_end / 1000 if expZF38092 == 9 replace pagey2 = f093_end / 1000 if expZF38092 == 10 * generating differences * replace distance_1 = pagey1 - pagex1 replace distance_2 = pagey2 - pagex2 * "time" = time to answer the test question * "distance" = time between test question and respective follow-ups drop *_start *_end * * * * * * * * * * * * * * * * * reshape data to long format * * * * * * * * * * * * * * * * * * to create two observations per respondent; one per test question * reshape long answer_ memory_ recall_ certain_ time_ distance_, i(id_g) j(qnumber) rename answer_ answer rename memory_ memory rename recall_ recall rename certain_ certain rename time_ time rename distance_ distance * * * * * * * * * * Missing cases * * * * * * * * * * * total N before missings: duplicates report id_g * 4238 obs of 2119 respondents * * * Breakoff * * * tab compl, mis tab compl certain, mis // 1 breakoff after completing follow-ups duplicates report id_g if compl == 4 & certain == . * 41 obs of 21 respondents drop if compl == 4 & certain == . * * * Interruptions * * * tab expZF38092 interrupt, mis duplicates report id_g if interrupt == 1 * 347 obs of 174 respondents drop if interrupt == 1 * * * response time (in seconds) - hidden interruptions * * * sum time, detail tab time // big jump: 947 -> 2147; 3 obs over 30min drop if time > 1000 sum distance, detail tab distance // big jump: 8350 -> 13614; 17 obs (far) over 3h drop if distance > 12000 * * * Nonresponse * * * * to original question: tab answer, mis * 0 obs * to first follow-up: tab memory, mis duplicates report id_g if memory == -90 * 4 obs of 3 respondents drop if memory == -90 * to second follow-up tab recall, mis duplicates report id_g if recall == -90 * 3 obs of 3 respondents drop if recall == -90 * to third follow-up tab certain, mis * 0 obs * * Sociodemographics * * * gender gen female = . replace female = 1 if gender_18 == 2 replace female = 0 if gender_18 == 1 tab female, mis * 0 missings * education tab educ_school_18, mis // "other" cannot be assigned to low/medium/high gen educ3 = . replace educ3 = 1 if educ_school_18 <= 3 replace educ3 = 2 if educ_school_18 == 4 replace educ3 = 3 if educ_school_18 == 6 | educ_school_18 == 5 label define educ3 1 "basic/none" 2 "vocational" 3 "high school" label values educ3 educ3 tab educ3, mis duplicates report id_g if educ3 == . * 110 obs of 55 respondents drop if educ3 == . * age tab year_of_birth_cat_18, mis // split in 3 groups of roughly equal size sum year_of_birth_cat_18, detail gen age = . replace age = 3 if year_of_birth_cat_18 <= 5 replace age = 2 if year_of_birth_cat_18 > 5 & year_of_birth_cat_18 < 9 replace age = 1 if year_of_birth_cat_18 >= 9 & year_of_birth_cat_18 != . label define age 1 "<44 years" 2 "44-58 years" 3 ">58 years" label values age age tab age, mis duplicates report id_g if age == . * 2 obs of 1 respondent drop if age == . duplicates report id_g *final N: 3711 obs of 1858 respondents * missing: * * total: 527 / 4238 = 12.4% of obs * * due to breakoff: 41 /4238 = 1.0% * * due to interruption: 347 / 4238 = 8.2% * * due to hidden interruption: (3 + 17) / 4238 = .5% * * due to nonresponse: (4 + 3) / 4238 = .2% * * due to missing sociodemographics: (110 + 2) / 4238 = 2.6% * * check: sum = 527; sum of % = 12.5% - due to rounding gen difference = answer - recall replace difference = sqrt(difference * difference) gen correct = . replace correct = 1 if difference == 0 replace correct = 0 if difference > 0 & difference != . drop ZF* question_* * question type * gen attitude = . replace attitude = 1 if expZF38092 <= 4 replace attitude = 0 if expZF38092 >= 5 replace attitude = . if expZF38092 == . gen behavior = . replace behavior = 1 if expZF38092 >= 5 & expZF38092 <= 8 replace behavior = 0 if expZF38092 <= 4 | expZF38092 >= 9 replace behavior = . if expZF38092 == . gen belief = . replace belief = 1 if expZF38092 >= 9 replace belief = 0 if expZF38092 <= 8 replace belief = . if expZF38092 == . gen type = . replace type = 1 if attitude == 1 replace type = 2 if behavior == 1 replace type = 3 if belief == 1 label define types 1 "attitude" 2 "behavior" 3 "belief" label values type types numlabel _all, add force tab type, mis gen firstquestion = . replace firstquestion = 1 if qnumber == 1 replace firstquestion = 0 if qnumber == 2 * extreme responses: endpoint * gen extreme = . replace extreme = 1 if answer == 0 | answer == 10 replace extreme = 0 if answer >= 1 & answer <= 9 * panel experience * gen experienced = . replace experienced = 1 if sample == 3 replace experienced = 0 if sample == 1 | sample == 2 * * * * * * * * * Descriptive * * * * * * * * * * Overall * tab type memory, row chi bysort type: ci means memory tab type correct, row chi bysort type: ci means correct tab type correct if memory == 1, row chi bysort type: ci means correct if memory == 1 tab type correct if memory == 0, row chi bysort type: ci means correct if memory == 0 tab memory correct, cell ttest correct, by(memory) sum certain bysort type: sum certain bysort type: ci means certain oneway certain type sum certain if memory == 1 bysort type: sum certain if memory == 1 bysort type: ci means certain if memory == 1 oneway certain type if memory == 1 sum certain if memory == 0 bysort type: sum certain if memory == 0 bysort type: ci means certain if memory == 0 oneway certain type if memory == 0 * Extreme answers * tab extreme tab type extreme, row chi tab type memory if extreme == 1, row chi tab type correct if extreme == 1, row chi tab type correct if memory == 1 & extreme == 1, row chi tab type correct if memory == 0 & extreme == 1, row chi sum certain if extreme == 1 bysort type: sum certain if extreme == 1 sum certain if memory == 1 & extreme == 1 bysort type: sum certain if memory == 1 & extreme == 1 sum certain if memory == 0 & extreme == 1 bysort type: sum certain if memory == 0 & extreme == 1 oneway certain type if extreme == 1 * Non-extreme answers * tab type extreme, row chi tab type memory if extreme == 0, row chi tab type correct if extreme == 0, row chi tab type correct if memory == 1 & extreme == 0, row chi tab type correct if memory == 0 & extreme == 0, row chi sum certain if extreme == 0 bysort type: sum certain if extreme == 0 sum certain if memory == 1 & extreme == 0 bysort type: sum certain if memory == 1 & extreme == 0 sum certain if memory == 0 & extreme == 0 bysort type: sum certain if memory == 0 & extreme == 0 tab extreme memory, row chi bysort extreme: ci means memory tab extreme correct, row chi bysort extreme: ci means correct bysort extreme: sum certain bysort extreme: ci means certain oneway certain extreme * * * * * * Model * * * * * * logistic memory ib2.type##experienced extreme ib1.age ib1.educ3 female smartphone firstquestion time distance, cluster(id_g) eststo M1 fitstat reg certain ib2.type##experienced extreme memory##ib2.type ib1.age ib1.educ3 female smartphone firstquestion time distance, cluster(id_g) eststo M2 fitstat logistic correct ib2.type##experienced extreme memory##ib2.type certain ib1.age ib1.educ3 female smartphone firstquestion time distance, cluster(id_g) eststo M3 fitstat * generate output tables * esttab M1 M2 M3 using "$output\models.rtf", replace obslast label b(%4.3f) se(%4.3f) eform(1 0 1) cons star(* 0.05 ** 0.01 *** 0.001) nobase esttab M1 M2 M3 using "$output\models.rtf", append obslast label b(%4.3f) se(%4.3f) eform(1 0 1) cons nostar nopar nobase wide esttab M1 M2 M3 using "$output\models.rtf", append obslast label b(%4.3f) p(%4.3f) eform(1 0 1) cons nostar nopar nobase wide