LAB 3 Creating New Variables Name___Danyah Aldailami____
Objective:
The purpose of this lab is to explore different ways of creating or adding new variables to a dataset.
In this 6-week life-style changing program, many people experienced a change in body mass index (BMI). There are several statistics describing the change in BMI that would be interesting such as mean BMI change, maximum BMI gain, and maximum BMI loss. To investigate these statistics and several others you will need to first create this new variable.
1. Create a new variable called BMI at baseline (BMI1) and BMI after 6 weeks (BMI2) and then calculate the change in BMI (BMIchange). To do this, calculate BMI using the following information: Note: the following formula is for weight (lb), and height (in). If you use units of weight in kilograms and height in meters, the constant 703 will drop from it.
BMI1 = (weight at baseline x 703)/Height2
BMI2= (weight after 6weeks x 703)/Height2
BMI Change = BMI2 – BMI1
To compute new data values based on numeric transformations of existing variables:
· From the menu choose:
Transform
Compute variable
· Enter the name of the target variable BMI1
· Enter the numeric expression… (weight at baseline x 703)/Height2
· Click ok
After you have created BMI1, create BMI2 and change in BMI, create a frequency table for change in BMI. Use the frequency table to answer the following questions:
a) For change in BMI, find:
Mean (s.d.): __0.2969__ Minimum: __ -2.92___ Maximum: __2.15__
Extreme Outliers (if any): There are three outliers with one extreme outlier
b) What percent of the population reduced BMI:___ 94.8%___
c) What is the mean change in BMI for the females: ____ 3.3205____
2. A) Often it is useful to examine a variable such as baseline BMI (a quantitative variable) by recoding it into several meaningful categories (a qualitative variable).
To Recode the Values of a Variable into a New Variable
· From the menus choose:
· Transform Recode Into Different Variables...
· Select baseline BMI into the box as the “Input Variable”
· For the “Output Variable”, name it BaselineBMI_CAT and click “Change”.
· Next Click “Old and New Values”.
· In this new box, under Old Value, choose "Range Lowest through value" and put 20 in there, because you want all the values lowest through 20. Under New Value, put in a 1 for category 1, and click "Add."
· Next, under Old Value, choose "Range ____ through ____" and put 20.01 in the first box and 24 in the second, because you want a range between 20.01 and 24. Under New Value, put in a 2 for category 2, and click "Add."
· Next, under Old Value, choose "Range ____ through ____" and put 24.01 in the first box and 27 in the second, because you want a range between 24.01 and 27. Under New Value, put in a 3 for category 3, and click "Add."
· Lastly, under Old Value, choose "Range value through Highest" and put 27.01 in there, because you want all the values from 27.01 to the highest. Under New Value, put in a 4 for category 4, and click "Add."
· Click “continue” then “ok”.
B) Summarize the BMI categories variable
There 9(2.1%) people with BMI falling under this category of BMI less or equal to 20 of which 0(0%) and 9(3.5%)were females. Those with BMI of between 20.01-24 were 71 in number(16.7%),of these 24 (14.4%) were males while 47(18.1%) were females. The ones with the BMI of between 24.01-27 were 92 in number(21.6%) with 37(22.2%) being males and 55(21.2%) being females. Those with BMI of greater or equal to 27 were 254 in number with 106(63.5%)being males and 148(57.1% ) being females.
3. What percent of those who reduced their BMI are males? ____39.6%______
4. What percent of the males increased their BMI? ____5.79%_______
Please submit your responses to the above questions