Question: Exercise 3 . The following data sets contain BMI measurements for the baseline, 3 months, and 9 months, for the intervention and control group patients.

Exercise 3. The following data sets contain BMI measurements for the baseline, 3 months, and 9 months, for the intervention and control group patients.
data int;
input ID$ GROUP$ BMI_base BMI_3mos BMI_9mos;
cards;
101 int 34.533.831.1
102 int 30.729.627.3
103 int 32.030.727.5
105 int 34.633.533.3
106 int 37.634.930.1
107 int 30.229.228.7
108 int 37.236.035.1
109 int 35.233.333.7
111 int 32.331.429.4
;
data cnt;
input ID$ GROUP$ BMI_base BMI_3mos BMI_9mos;
cards;
401 cnt 33.733.433.2
402 cnt 31.230.129.8
404 cnt 30.831.131.8
406 cnt 29.229.028.9
408 cnt 27.727.327.9
409 cnt 33.832.931.4
;
(a) Concatenate the data sets and compute the change in BMI between the baseline and 9 months. Your output should look like this:
Obs ID GROUP BMI_base BMI_3mos BMI_9mos BMI_change
1101 int 34.533.831.1-3.4
2102 int 30.729.627.3-3.4
3103 int 32.030.727.5-4.5
4105 int 34.633.533.3-1.3
5106 int 37.634.930.1-7.5
6107 int 30.229.228.7-1.5
7108 int 37.236.035.1-2.1
8109 int 35.233.333.7-1.5
9111 int 32.331.429.4-2.9
10401 cnt 33.733.433.2-0.5
11402 cnt 31.230.129.8-1.4
12404 cnt 30.831.131.81.0
13406 cnt 29.229.028.9-0.3
14408 cnt 27.727.327.90.2
15409 cnt 33.832.931.4-2.4
(b) Remove the intervention group patients whose BMI decreased by less than 3 points and also the control group patients whose BMI increased over time. Your output should look like this:
Obs ID GROUP BMI_base BMI_3mos BMI_9mos
1101 int 34.533.831.1
2102 int 30.729.627.3
3103 int 32.030.727.5
4106 int 37.634.930.1
5401 cnt 33.733.433.2
6402 cnt 31.230.129.8
7406 cnt 29.229.028.9
8409 cnt 33.832.931.4

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!