I am relatively new to R and object oriented programming. I have relied on
SAS for most of my data analysis. I teach an introductory undergraduate
forecasting course using the Diebold text and I am considering using R in
addition to SAS and Eviews in the course. I work primarily with univariate
anscombe is built into R already so you don't need to read it in.
An intercept is the default in lm so you don't have to specify it.
opar - par(mfrow = c(2,2))
plot(y1 ~ x1, anscombe)
reg - lm(y1 ~ x1, anscombe)
reg
abline(reg)
...etc...
par(opar)
Note that plot(anscombe[1:2]) and
2 matches
Mail list logo