Question

In: Statistics and Probability

(A review on SAS data management) The following is a data set of 12 individuals. And...

(A review on SAS data management)
The following is a data set of 12 individuals. And we want to relate the heart rate at rest (Y) to kilograms body weight (X).

90 62

87 41

87 63

73 46

73 53

86 55

100 70

75 47

76 49

87 69

79 41

78 48

Write a program in SAS which read the given data set into SAS library.

In your program, create a new data set which is a copy of the first, with the addition of a new variable which represents the weight in pounds (1 kilogram 2.2 pounds). Use “proc print” to view the data for all three variables.

(c) Create a new variable called weight_group which divides the data set into four groups based on the estimated quartiles for the variable weight. The estimated quartiles may be requested using the keywords q1, median, and q3, in the “proc means” statement.

(d) Use “proc freq” to summarize the frequency of subjects in each of the four groups.

(e) Obtain the mean and standard deviation for the heart rate at rest for each of the four groups. Comment on the results.

(f) Produce a scatterplot of the heart rate at rest versus body weight in kilograms. Describe what you see.

(g)Fit a straight line model for heart rate at rest versus body weight in kilograms. Comment on the fit of the line.

Solutions

Expert Solution

code :

data mydata;
input x y;
datalines;
90 62
87 41
87 63
73 46
73 53
86 55
100 70
75 47
76 49
87 69
79 41
78 48
;
run;
proc print data=mydata;
run;
data newdata;
set mydata;
weight_pound=x*2.2;
run;
proc print data=newdata;
run;

/*(c)*/
proc means data=newdata q1 q3 median;
run;

/*(d)*/
proc freq data=newdata;
run;

output:

The SAS System
Obs x y weight_pound
1 90 62 198.0
2 87 41 191.4
3 87 63 191.4
4 73 46 160.6
5 73 53 160.6
6 86 55 189.2
7 100 70 220.0
8 75 47 165.0
9 76 49 167.2
10 87 69 191.4
11 79 41 173.8
12 78 48 171.6
The SAS System

The MEANS Procedure

Variable Lower Quartile Upper Quartile Median
x
y
weight_pound
75.5000000
46.5000000
166.1000000
87.0000000
62.5000000
191.4000000
82.5000000
51.0000000
181.5000000
The SAS System

The FREQ Procedure

x Frequency Percent Cumulative
Frequency
Cumulative
Percent
73 2 16.67 2 16.67
75 1 8.33 3 25.00
76 1 8.33 4 33.33
78 1 8.33 5 41.67
79 1 8.33 6 50.00
86 1 8.33 7 58.33
87 3 25.00 10 83.33
90 1 8.33 11 91.67
100 1 8.33 12 100.00
y Frequency Percent Cumulative
Frequency
Cumulative
Percent
41 2 16.67 2 16.67
46 1 8.33 3 25.00
47 1 8.33 4 33.33
48 1 8.33 5 41.67
49 1 8.33 6 50.00
53 1 8.33 7 58.33
55 1 8.33 8 66.67
62 1 8.33 9 75.00
63 1 8.33 10 83.33
69 1 8.33 11 91.67
70 1 8.33 12 100.00
weight_pound Frequency Percent Cumulative
Frequency
Cumulative
Percent
160.6 2 16.67 2 16.67
165 1 8.33 3 25.00
167.2 1 8.33 4 33.33
171.6 1 8.33 5 41.67
173.8 1 8.33 6 50.00
189.2 1 8.33 7 58.33
191.4 3 25.00 10 83.33
198 1 8.33 11 91.67
220 1 8.33 12 100.00

Related Solutions

(A review on SAS data management) The following is a data set of 12 individuals. And...
(A review on SAS data management) The following is a data set of 12 individuals. And we want to relate the heart rate at rest (Y) to kilograms body weight (X). X Y 90 62 87 41 87 63 73 46 73 53 86 55 100 70 75 47 76 49 87 69 79 41 78 48 Write a program in SAS which read the given data set into SAS library. In your program, create a new data set which...
Using the following lines of data, create a temporary SAS data set called ThreeDates. Each line...
Using the following lines of data, create a temporary SAS data set called ThreeDates. Each line of data contains three dates, the first two in the form mm/dd/yyyy descenders and the last in the form ddmmmyyyy. Name the three date variables Date1, Date2, and Date3. Format all three using the MMDDYY10. format. Include in your data set the number of years from Date1 to Date2 (Year12) and the number of years from Date2 to Date3 (Year23). Round these values to...
review the management accounting techniques used to achieve the set goal
review the management accounting techniques used to achieve the set goal
Question #2 - Review 'Cars Database'. From this data set develop the following: a. One bivariate...
Question #2 - Review 'Cars Database'. From this data set develop the following: a. One bivariate regression b. One multiple regression c. Provide an effective chart displaying each of the two regressions. Charts should be presentation ready with effective title and labels. d. Provide a brief description of each of the two regressions (please use a text box in your Excel spreadsheet for your descriptions). Also, be sure to correctly identify and describe your independent and dependent variables, linear equation...
The following set of data is from a sample of n= 7: 12 7 4 9...
The following set of data is from a sample of n= 7: 12 7 4 9 0 7 20 A) compute the mean, median, and mode. B) compute the range, variance, standard deviation, and coefficient of variation C) compute the Z score of 0 and 20. Are there any outliers? D) compute the first quartile, the third quartile, and the interquartile range
Subject Name: Data Management for Analytics Software used: SAS Choose the best single option. 6. Consider...
Subject Name: Data Management for Analytics Software used: SAS Choose the best single option. 6. Consider the event frequency table shown below. Which of the following statements are true? Var x Freq Events Non-Events Level 1 150 50 100 Level 2 890 600 290 Level 3 450 250 200 Total 1490 900 590 a. The odds of an event occurring at Level 1 is greater than the odds of an event not occurring at Level 1. b. The odds of...
What are the SAS Coding and SAS Results for a multiple regression analysis of the following...
What are the SAS Coding and SAS Results for a multiple regression analysis of the following data, where the price of the house is the dependent variable? House Price Living Area Bathrooms Bedrooms 97739 1276 2 2 97783 1061 1 3 98423 1355 1 3 99045 937 1 2 99082 924 1 2
From the SAS data set myclass.fueldata, create - a horizontal bar chart showing the average highway MPG for each class;
From the SAS data set myclass.fueldata, create - a horizontal bar chart showing the average highway MPG for each class; - a vertical bar chart showing the average highway MPG for different fuel types; - a histogram showing the distribution of highway MPG for each class; Add a title to each chart and label axes properly. 
1 (a). The following data set lists a series of ACT scores {8, 12, 15, 16,...
1 (a). The following data set lists a series of ACT scores {8, 12, 15, 16, 16, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 20, 21, 21, 21, 23, 23, 24, 25, 36}. Write down the five number summary and construct a boxplot which includes the position of the upper and lower fences (b). At a tennis tournament a statistician keeps track of every serve. The statistician reported that the mean serve speed...
Use the following set of Data Management final examination scores to answer the questions below: 92,...
Use the following set of Data Management final examination scores to answer the questions below: 92, 48, 83, 62, 76, 64, 81, 98, 70, 70, 55, 83, 46, 79, 70, 97, 91, 53, 86, 89 a. Determine the mean, median, mode, range, and standard deviation. b. Find Q1 and Q3 and state the IQR. Determine if there are any outliers. c. Construct a box and whisker plot (by hand or using technology). d. Construct a histogram. Describe the shape of...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT