Specifically, I'd like to know:
1) percent change in health as a function of intervention (all ventilation types)
2) percent change in health as a function of each of the three intervention types
3) percent change in health per NO2 decrease
Lastly, as I also want to make models adjusted for sex, age, and edu (education level), how can I determine if those factors were potential confounding variables?
Any comments or suggestions are much appreciated!
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input int personID str4 Home byte Homeid str8 Ventilation byte vent double(year1_health year2_health) str6 sex str25 race str38 edu double(year1_no2 year2_no2) 112 "H111" 1 "Exhaust" 1 16.294117647058822 15.117647058823529 "Female" "Hispanic or Latino" "Completed graduate degree " 58.292660375545566 59.15929968049114 143 "H138" 2 "Balanced" 3 21.384615384615383 20.428571428571427 "Female" "White" "" 62.76490172807987 63.038986394450205 145 "H138" 2 "Balanced" 3 13.923076923076923 17.4 "Male" "White" "Completed college undergraduate degree" 62.76490172807987 63.038986394450205 170 "H167" 3 "CFIS" 2 22.466666666666665 23.25 "Female" "White" "Completed graduate degree " 56.33193661785609 63.27032227341164 171 "H168" 4 "CFIS" 2 20.857142857142858 21.555555555555557 "Female" "White" "Completed college undergraduate degree" 66.1585704109377 57.13051973184713 174 "H172" 5 "CFIS" 2 23.307692307692307 24.11764705882353 "Female" "White" "Completed some college no degree" 57.68708598542611 57.236005188120224 180 "H177" 6 "Exhaust" 1 21 22.23076923076923 "Female" "White" "Completed graduate degree " 61.899636465072604 60.68360524908931 183 "H179" 7 "Balanced" 3 19 19.529411764705884 "Female" "White" "Completed college undergraduate degree" 60.53874811766886 63.55254164483663 185 "H181" 8 "Exhaust" 1 14.666666666666666 19 "Female" "Black or African American" "" 63.30054657137316 59.039874414657966 186 "H182" 9 "CFIS" 2 11.153846153846153 17.333333333333332 "Female" "Black or African American" "Completed college undergraduate degree" 61.58640446216849 51.43792454544989 187 "H182" 9 "CFIS" 2 14.666666666666666 22.952380952380953 "Female" "Black or African American" "" 61.58640446216849 51.43792454544989 194 "H187" 10 "Balanced" 3 21.5 21.210526315789473 "Female" "Black or African American" "Completed graduate degree " 51.518544973948785 54.768295587682665 201 "H193" 11 "CFIS" 2 20.692307692307693 22.058823529411765 "Male" "Hispanic or Latino" "Completed graduate degree " 50.357783289201876 70.68138079860094 204 "H196" 12 "CFIS" 2 23.642857142857142 24.705882352941178 "Male" "Hispanic or Latino" "Completed some college no degree" 58.260161671038105 62.27559967087857 205 "H197" 13 "Balanced" 3 15.75 20.5 "Female" "Black or African American" "Completed some college no degree" 62.838209840768165 53.1536962580685 216 "H207" 14 "Exhaust" 1 23.5 24.444444444444443 "Female" "White" "Completed college undergraduate degree" 54.84059779036874 57.47775108340378 252 "H207" 14 "Exhaust" 1 23 24.666666666666668 "Male" "White" "" 54.84059779036874 57.47775108340378 217 "H208" 15 "Balanced" 3 23.666666666666668 24.46153846153846 "Female" "Black or African American" "Completed college undergraduate degree" 62.02773449694277 53.51241752751034 222 "H213" 16 "CFIS" 2 19.470588235294116 19.307692307692307 "Female" "Hispanic or Latino" "Completed some college no degree" 58.59340280008861 55.9058420869943 223 "H214" 17 "Balanced" 3 14.266666666666668 16.666666666666668 "Female" "White" "Completed graduate degree " 56.51526616909314 59.47893759021493 228 "H217" 18 "Exhaust" 1 18.8 20.555555555555557 "Female" "White" "Completed graduate degree " 71.91513763347969 63.7320198003429 229 "H218" 19 "Exhaust" 1 22.466666666666665 19.833333333333332 "Female" "White" "Completed graduate degree " 59.04828438480723 57.676655048614386 230 "H218" 19 "Exhaust" 1 19.933333333333334 21.61111111111111 "Male" "White" "" 59.04828438480723 57.676655048614386 232 "H220" 20 "CFIS" 2 23.31578947368421 24 "Female" "Hispanic or Latino" "Completed graduate degree " 72.34145468609995 68.82807516238483 233 "H220" 20 "CFIS" 2 16.36842105263158 14.846153846153847 "Female" "Hispanic or Latino" "" 72.34145468609995 68.82807516238483 234 "H220" 20 "CFIS" 2 18.88888888888889 20.76923076923077 "Male" "Hispanic or Latino" "Completed graduate degree " 72.34145468609995 68.82807516238483 235 "H220" 20 "CFIS" 2 17.05263157894737 15.75 "Female" "Hispanic or Latino" "" 72.34145468609995 68.82807516238483 end
0 Response to Could you please help with coding "mixed-effects model"?
Post a Comment