This preview shows page 1. Sign up to view the full content.
Unformatted text preview: it. If you need to get R installed (or updated) look at my instructions
Use the following code to read in the chocolate, beer and electricity dataset from C&M Section 1.4.3.
b - edtbeul"tp/wwmse.cn/pcwe/scedt)
cedt < sqDt(sDt(15-10",a.ae"901-1)
b$ae - e.aea.ae"980-1) sDt(19-20",
ceya < a.OIl(b$ae$er
b$er - sPSXtcedt)ya
cemnh< fco(otscedt) lvl =mnhnm)
b$ot - atrmnh(b$ae, ees
1. Plot side by side boxplots of electricity for each month. stat565.cwick.co.nz/prereqs.html 1/2 12/2/13 Prerequisite Self Test.stat565 2. Fit a linear regression for electricity with a fixed effect for each month and a linear term for the year.
ϵ × Or, , in ST512 shorthand.
, in linear model notation. 3. Plot the fitted values against the date.
4. Plot the residuals against the date. stat565.cwick.co.nz/prereqs.html 2/2...
View Full Document
This test prep was uploaded on 04/04/2014 for the course ST 565 taught by Professor Staff during the Spring '08 term at Oregon State.
- Spring '08