Question
SAS Program (Please write all these in 1 code) 1.Call the bodyfat data set using the set statement. 2.Create a new variable, called newvar that
SAS Program (Please write all these in 1 code)
1.Call the bodyfat data set using the set statement.
2.Create a new variable, called newvar that is the age variable and the pctfat variable multiplied.
3.Create a new variable, called age2 that uses the if statement to classify the age variable into two groups:
a.Classify those under 50 to be under50
b.Classify those 50 and over to be over50
4.Print out the dataset including all four variables.
5.Use the sort and means procedures to sort and calculate the statistics for the variables by the age2 variable.
6.Produce a scatterplot of the age variable and the pctfat variable, where age is on the x-axis.
7.Produce a line plot of the age variable and the newvar variable, where age is on the y-axis.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started