Computational Math Camp: Day 4
SURVEY
The questions (and variable types) for the Day 4 were:
Name (character)
Email (character)
How many hours of work do you do per week? (integer)
How many hours of sleep do you get per night? (integer)
What percent of your income do you spend on food? (integer)
How many cups of coffee do you consume each week? (integer)
How big is your typical cup? (factor: 8, 10, 12, 16, or 20 ounces)
How much do you typically spend per cup? (numeric)
How many cups of tea do you consume each week? (integer)
How many cups of soda do you consume each week? (integer)
Do you own a coffeemaker? (logical)
Do you have a parent who drinks coffee? (logical)
Students completed the survey before they left on Day 3 and I compiled their responses into a CSV.
Discussion Questions
What do we expect to be the relationship between the explanatory variables and coffee consumption?
How should we include price in our model? What do we expect the relationship to be?
How do you interpret the estimates provided by R?
Why do we explore the data first? What are we looking for?
Sample Files
The sample CSV for this lesson can be found here. The lesson without solutions can be found here and the lesson with solutions can be found here.
(Don’t forget to update the working directory for your machine!)