R : Copyright 2003, The R Development Core Team Version 1.7.1 (2003-06-16) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type `license()' or `licence()' for distribution details. R is a collaborative project with many contributors. Type `contributors()' for more information. Type `demo()' for some demos, `help()' for on-line help, or `help.start()' for a HTML browser interface to help. Type `q()' to quit R. [Previously saved workspace restored] > site <- read.table(file="SITE.TXT", + col.names = c("Observacion", "Area", "Ventas")) > site Observacion Area Ventas 1 1 1726 3681 2 2 1642 3895 3 3 2816 6653 4 4 5555 9543 5 5 1292 3418 6 6 2208 5563 7 7 1313 3660 8 8 1102 2694 9 9 3151 5468 10 10 1516 2898 11 11 5161 10674 12 12 4567 7585 13 13 5841 11760 14 14 3008 4085 > plot(site$Area, site$Ventas, xlab="Área", ylab="Ventas", + main="Relación entre el tamaño de una tienda y sus ventas") > site.lm <- lm(Ventas ~ Area, data = site) > summary(site.lm) Call: lm(formula = Ventas ~ Area, data = site) Residuals: Min 1Q Median 3Q Max -1888.14 -683.40 79.88 840.29 1070.61 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 901.2466 513.0228 1.757 0.104 Area 1.6861 0.1533 11.000 1.27e-07 *** --- Signif. codes: 0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1 Residual standard error: 936.9 on 12 degrees of freedom Multiple R-Squared: 0.9098, Adjusted R-squared: 0.9023 F-statistic: 121 on 1 and 12 DF, p-value: 1.267e-07 > site.lm2 <- lm(Ventas ~ Area -1, data = site) > summary(site.lm2) Call: lm(formula = Ventas ~ Area - 1, data = site) Residuals: Min 1Q Median 3Q Max -1693.8 -442.8 557.7 891.6 1321.1 Coefficients: Estimate Std. Error t value Pr(>|t|) Area 1.92116 0.08059 23.84 4.1e-12 *** --- Signif. codes: 0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1 Residual standard error: 1009 on 13 degrees of freedom Multiple R-Squared: 0.9776, Adjusted R-squared: 0.9759 F-statistic: 568.3 on 1 and 13 DF, p-value: 4.101e-12 >