Demo for Rcmdr(Homework 4)

http://www.tudou.com/programs/view/HHvCMa466OE/

script:

> data(USJudgeRatings, package="datasets")

> library(relimp, pos=14)

> showData(USJudgeRatings, placement='-20+200', font=getRcmdr('logFont'),
+ maxwidth=80, maxheight=30)

> scatterplotMatrix(~CFMG+DECI+DILG+DMNR+FAMI+INTG+ORAL+PHYS+PREP+RTEN+WRIT,
+ reg.line=lm, smooth=TRUE, spread=FALSE, span=0.5, id.n=0, diagonal = 'density',
+ data=USJudgeRatings)

> RegModel.1 summary(RegModel.1)

Call:
lm(formula = CFMG ~ FAMI, data = USJudgeRatings)

Residuals:
Min 1Q Median 3Q Max
-0.73236 -0.20850 0.01107 0.16321 0.82629

Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1.12999 0.37753 2.993 0.00466 **
FAMI 0.84786 0.05002 16.949 < 2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.3077 on 41 degrees of freedom
Multiple R-squared: 0.8751, Adjusted R-squared: 0.8721
F-statistic: 287.3 on 1 and 41 DF, p-value: oldpar plot(RegModel.1)

> par(oldpar)

> LinearModel.2 summary(LinearModel.2)

Call:
lm(formula = CFMG ~ FAMI + DILG, data = USJudgeRatings)

Residuals:
Min 1Q Median 3Q Max
-0.69661 -0.14231 0.01004 0.13689 0.49506

Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.4884 0.3265 1.496 0.143
FAMI 0.1906 0.1377 1.384 0.174
DILG 0.7232 0.1450 4.987 1.23e-05 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.2446 on 40 degrees of freedom
Multiple R-squared: 0.923, Adjusted R-squared: 0.9191
F-statistic: 239.7 on 2 and 40 DF, p-value: < 2.2e-16

plotEx.data.frame(Homework 3)



Plot of Maze Experiment(Homework 2)