Answered step by step
Verified Expert Solution
Question
1 Approved Answer
An indicator variable, called 'TrvlExp,' that we'll use to determine whether $30 covers your travel expenses to school each week, assuming you travel by car
- An indicator variable, called 'TrvlExp,' that we'll use to determine whether $30 covers your travel expenses to school each week, assuming you travel by car (transportation=1). If you do not travel by car (transportation=2, 3, or 4), we'll just assume that $30 covers your expenses. Use SAS to code the following algorithm for determining TrvlExp:
- If transportation = 2, 3 or 4, then TrvlExp = 1;
- If transportation = 1, then do the following:
- Calculate # of gallons of gas that you can purchase for $30
(gal30 = 30 / GasPrice)
- Calculate # of miles your car can travel for each gallon of gas
(MilePerGal = TankLast / TankVol)
- Calculate # miles $30 will last (mile30 = gal30*MilePerGal)
- Calculate total # round-trip miles that you drive to and from school each week
totmile = OneWay*SchTimes*2
- If mile30 >= totmile, thenTrvlExp = 1
- Create a variable 'birthdat' (your birthday in 2005) that combines BirthM, BirthD and use 2005 as year. For example: if BirthM = 3, birthD = 9, the birthdat = 03/09/05
- Create a variable called stature. Stature = 1 if your height is higher than the median height of the class; otherwise stature = 0.
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