Hello Stata community
I have a database in long format (as follows in the dataex example) from a randomized clinical study carried out with children (parti) where the outcome is a continuous variable of nutritional status (cc_BMI_zscore_). The intervention group was exposed to lifestyle changes such as consuming a Mediterranean diet and promoting physical activity. In both groups, measures to calculate BMI and questionnaires to assess adherence to the Mediterranean diet (Dmed_score - continuous variable) and degree of physical activity (AF_score - continuous variable) at time 0 (baseline) and time 1 (12 months later).
I would like to use mixed effects linear regression to evaluate changes in BMI over times 0 and 1 in both groups and see if the Mediterranean diet and physical activity influenced this outcome. Furthermore, I would like to know if it is possible and how to calculate the population attributable fraction (PAF) in this type of study to see how much of this change in BMI can be attributable to the Mediterranean diet and/or physical activity. Would it also be interesting to create categories for the AF_score Dmed_score variables?
I would really like your help
Stata version 17
----------------------- copy starting from the next line -----------------------
------------------ copy up to and including the previous line ------------------
I have a database in long format (as follows in the dataex example) from a randomized clinical study carried out with children (parti) where the outcome is a continuous variable of nutritional status (cc_BMI_zscore_). The intervention group was exposed to lifestyle changes such as consuming a Mediterranean diet and promoting physical activity. In both groups, measures to calculate BMI and questionnaires to assess adherence to the Mediterranean diet (Dmed_score - continuous variable) and degree of physical activity (AF_score - continuous variable) at time 0 (baseline) and time 1 (12 months later).
I would like to use mixed effects linear regression to evaluate changes in BMI over times 0 and 1 in both groups and see if the Mediterranean diet and physical activity influenced this outcome. Furthermore, I would like to know if it is possible and how to calculate the population attributable fraction (PAF) in this type of study to see how much of this change in BMI can be attributable to the Mediterranean diet and/or physical activity. Would it also be interesting to create categories for the AF_score Dmed_score variables?
I would really like your help
Stata version 17
----------------------- copy starting from the next line -----------------------
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input double parti byte tempo double(Grupo AF_score cc_BMI_ cc_BMI_zscore_ cc_BMI_cat_ Mean_WC_ Dmed_score) float edad_calc_ 1003 0 2 5 15.86 .21 0 49.6 12 4.4462695 1003 1 2 11 15.45 0 0 52.56666666666666 11 5.483915 1005 0 1 9 14.8 -.46 0 49.7 10 5.667351 1005 1 1 12 16.41 0 0 56.56666666666666 14 6.814511 1006 0 1 6 16.34 .48 0 56 11 4.073922 1006 1 1 7 17.19 1 1 57.53333333333334 11 5.204654 1010 0 2 11 14.28 -1.1 0 45.1 11 5.456537 1010 1 2 11 14.91 0 0 53.866666666666674 13 6.494182 1021 0 1 8 17.21 1.07 1 55.45 7 4.895277 1021 1 1 12 16.91 0 0 58.46666666666667 12 6.02601 1023 0 2 10 18.04 1.18 1 58.25 9 6.995209 1023 1 2 8 18.43 1 1 63.5 8 8.03833 1024 0 2 9 15.08 -.29 0 47.45 14 6.294319 1024 1 2 12 16.15 0 0 54.6 17 7.315537 1025 0 1 10 14.54 -1.03 0 45.1 18 4.273785 1025 1 1 9 13.67 -1 -1 48.666666666666664 16 5.412731 1028 0 1 10 15.57 -.09 0 51.6 11 3.852156 1028 1 1 11 15.22 0 0 52.23333333333333 12 5.037645 1037 0 1 11 17.22 1.04 0 53.3 12 4.0985627 1037 1 1 10 17.16 1 1 54.9 14 5.190965 1038 0 2 7 21.7 2.78 2 63.4 7 7.033539 1038 1 2 7 24.35 2 2 71 13 8.123203 1039 0 1 7 16.81 .81 0 57.75 13 5.642711 1039 1 1 7 17.54 0 0 59.9 14 6.691308 1040 0 1 8 16.27 .39 0 51.25 8 3.6769335 1040 1 1 7 16.42 0 0 55.4 12 4.6844625 1041 0 2 11 14.8 -.58 0 56.7 13 5.845312 1041 1 2 11 19 1 1 62.5 11 6.913073 1042 0 2 9 14.88 -.62 0 54.8 12 4.6735115 1042 1 2 11 28.05 2 2 54.333333333333336 10 5.670089 1046 0 1 13 14.85 -.43 0 50.25 15 5.262149 1046 1 1 10 15.25 0 0 53.5 13 6.351814 1047 0 2 9 25.45 4.61 2 58.2 7 4.3340178 1047 1 2 8 19.85 2 2 66.65 6 5.418207 1048 0 2 9 15.13 -.66 0 49.5 12 3.59206 1048 1 2 9 16.37 0 0 52.03333333333333 12 4.643395 1049 0 2 11 16.43 .59 0 54.8 11 5.771389 1049 1 2 9 17.39 0 0 56.76666666666667 12 6.822724 1053 0 2 8 14.03 -1.29 -1 52.4 11 4.219028 1053 1 2 11 16.1 0 0 52.6 7 5.289528 1054 0 1 11 13.34 -1.96 -1 55.5 5 7.301848 1054 1 1 10 13.67 -1 -1 54.6 10 8.314853 1055 0 1 10 14.47 -.91 0 53.4 5 5.494866 1055 1 1 9 14.17 0 0 58 11 6.507871 1056 0 1 6 15.35 -.29 0 . 8 3.649555 1056 1 1 7 17.21 1 1 54.2 10 4.605065 1058 0 2 9 14.17 -.96 0 51.05 11 5.316906 1058 1 2 7 15.04 0 0 50.5 10 6.502396 1059 0 1 9 14.44 -.88 0 51.2 10 6.650239 1059 1 1 10 14.28 0 0 53.35 12 7.66872 end label values Grupo Grupo label def Grupo 1 "Intervención", modify label def Grupo 2 "Control", modify
Comment