> > pdf("E:\\sta4210\\CH03TA07.pdf") > > plot(X,Y) > > saletrn.reg1 <- lm(Y~X) > summary(saletrn.reg1) Call: lm(formula = Y ~ X) Residuals: Min 1Q Median 3Q Max -12.0700 -2.2262 -0.3925 4.3187 11.0000 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 34.945 5.948 5.875 0.000372 *** X 35.770 3.587 9.973 8.66e-06 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 8.02 on 8 degrees of freedom Multiple R-squared: 0.9256, Adjusted R-squared: 0.9163 F-statistic: 99.46 on 1 and 8 DF, p-value: 8.66e-06 > plot(saletrn.reg1) > > > dev.off() null device 1 > saletrn <- read.table("E:\\sta4210\\CH03TA07.txt",header=F,col.names=c("X","Y")) > > attach(saletrn) The following object(s) are masked from 'saletrn (position 3)': X, Y The following object(s) are masked from 'toluca (position 4)': X, Y The following object(s) are masked from 'toluca (position 5)': X, Y > > pdf("E:\\sta4210\\CH03TA07.pdf") > > plot(X,Y) > > saletrn.reg1 <- lm(Y~X) > summary(saletrn.reg1) Call: lm(formula = Y ~ X) Residuals: Min 1Q Median 3Q Max -12.0700 -2.2262 -0.3925 4.3187 11.0000 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 34.945 5.948 5.875 0.000372 *** X 35.770 3.587 9.973 8.66e-06 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 8.02 on 8 degrees of freedom Multiple R-squared: 0.9256, Adjusted R-squared: 0.9163 F-statistic: 99.46 on 1 and 8 DF, p-value: 8.66e-06 > plot(saletrn.reg1) > > sqrtX <- sqrt(X) > > plot(sqrtX,Y) > > saletrn.reg2 <- lm(Y~sqrtX) > summary(saletrn.reg2) Call: lm(formula = Y ~ sqrtX) Residuals: Min 1Q Median 3Q Max -9.3221 -4.1884 -0.2367 4.1007 7.7200 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -10.328 7.892 -1.309 0.227 sqrtX 83.453 6.444 12.951 1.2e-06 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 6.272 on 8 degrees of freedom Multiple R-squared: 0.9545, Adjusted R-squared: 0.9488 F-statistic: 167.7 on 1 and 8 DF, p-value: 1.197e-06 > plot(saletrn.reg2) > > > > dev.off()