Group Members: Thomas Jefferson, Benjamin Franklin, John Adams, Robert Livingston, Roger Sherman
Describe the car model you selected, the variables (including price, age, location, and mileage) you chose to look at, etc.
You'll be reading in your spreadsheet from Google Docs. This example is based on the data provided as part of the mosaic package, but copied over to Google Docs just to show how to read in from a spreadsheet. Of course, you'll be setting up your own Google Doc and getting the public link to it to read in with fetchGoogle per these instructions.
Remember … you need to change the name of the data source to that for your own Google spreadsheet.
dataSource = "https://docs.google.com/spreadsheet/pub?key=0Am13enSalO74dEEya201eF9qamZ0VDlPbWY4eW1jemc&single=true&gid=0&output=csv"
cars = fetchGoogle(dataSource)
Density plots, scatter plots, etc. Whatever you think is informative.
xyplot(Price~Age, data=cars,
ylab="Price ($)", xlab="Age (yrs)")
Comment briefly to say what each of your plots shows, e.g. “Price goes down with age.”
densityplot(~Mileage, data=cars)
Here you'll give a few models, giving the model coefficients and interpreting them using language that might make sense to a well-educated car buyer.
mod1 = lm( Price ~ Age, data=cars)
coef(mod1)
## (Intercept) Age
## 20492 -1559
mod2=lm(Price~Mileage, data=cars)
coef(mod2)
## (Intercept) Mileage
## 20766.5803 -0.1013
Interpret your coefficients in everyday terms.
Do several other models that you think might be of interest.
Comment on anything that's surprising to you.