Presentación de PowerPoint

Anuncio
Regresión Lineal Simple
RS1. Plantas de Tratamiento de agua, DF , 1998
Planta
Cap
Vol
Rosario
25
567.65
Coyoacán
400 5676.48
Acueducto de
87
1923.7
Guadalupe
San Juan de Aragón
500 4446.58
Ciudad Deportiva
230 4099.68
Iztacalco
13
315.36
Cerro de la Estrella
4000 46957.1
San Pedro Atocpan
60 1103.76
San Juan Ixtayopan
15
252.29
San Andrés Mixquic
30
946.08
Abasolo
15
157.68
Heroico Colegio
Militar
30
630.72
Parres
7
31.54
PEMEX
26
315.36
Xicalco
7
94.6
Reclusorio Sur
30
378.43
San Luis
Tlaxialtemalco
150 1892.16
Tlatelolco
22
378.43
Bosque de las Lomas
55
473.04
Campo Militar No. 1
30
378.43
Chapultepec
160
2018.3
summary(modelo)
Call:
lm(formula = Vol ~ Cap)
Residuals:
Min
1Q
-1593.94 -188.53
Median
-60.96
3Q
78.99
Max
1212.30
Coefficients:
Estimate Std. Error t value
Pr(>|t|)
(Intercept) 201.3821 126.8122 1.588
0.129
Cap
11.6783 0.1429
81.707
<2e-16 ***
--Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 551.3 on 19 degrees of freedom
Multiple R-squared: 0.9972,
Adjusted R-squared: 0.997
F-statistic: 6676 on 1 and 19 DF, p-value: < 2.2e-16
anova(modelo)
Analysis of Variance Table
Response: Vol
Df
Sum Sq
Cap
1
2029113094
Residuals 19
5774809
Mean Sq
2029113094
303937
--- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
F value
6676.1
Pr(>F)
< 2.2e-16 ***
shapiro.test(modelo$residual)
Shapiro-Wilk normality
test data: modelo$residual
W = 0.8475, p-value =0.003846
Transformación de variable
y<-sqrt(Vol)
m2<-lm(y~Cap)
Analysis of Variance Table
Response: y
Df
Sum Sq
Cap
1
36673
Residuals 19
3768
Mean Sq
36673
198
F value
184.94
Pr(>F)
3.047e-11 ***
--- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Shapiro-Wilk
normality test data: m2$residuals
W = 0.9196, p-value = 0.08506
RS2. Modelo de Pinzones
summary(m)
Call: lm(formula = beak.length ~ mass, data = KenyaFinches)
Residuals:
Min
1Q
Median
-1.05373
-0.27044
-0.05373
Coefficients:
Estimate Std.
(Intercept)
6.487159
mass
0.110411
--- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01
Error
0.112906
0.004608
‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
3Q
0.33806
t
57.46
23.96
Max
0.82956
value Pr(>|t|)
<2e-16 ***
<2e-16 ***
Residual standard error: 0.4174 on 43 degrees of freedom
Multiple R-squared: 0.9303, Adjusted R-squared: 0.9287
F-statistic: 574 on 1 and 43 DF, p-value: < 2.2e-16 >
Schluter, D. 1988. The evolution of finch communities on islands and
continents: Kenya vs. Galapagos. Ecological Monographs 58: 229-249.
anova(m)
Analysis of Variance Table
Response: beak.length
Df
Sum Sq
Mass
1
100.000
Residuals 43
7.491
--- Signif. codes: 0 ‘***’ 0.001
Mean Sq F
value Pr(>F)
100.000 574.03
< 2.2e-16 ***
0.174
‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
shapiro.test(m$residuals)
Shapiro-Wilk normality test
data: m$residuals
W = 0.9784, p-value = 0.5572
RS3. Reforestación en el DF
m<-lm(Reforestacion~Superfice)
summary(m)
Call: lm(formula = Reforestacion ~ Superfice)
Residuals:
Min
1Q
Median
3Q
Max
-148.43 -97.75
-10.08
92.44
180.59
Coefficients:
Estimate Std. Error t
(Intercept) 186.3801 42.2576 4.411
Superfice -0.3078 0.3439
-0.895
value Pr(>|t|)
0.000593 ***
0.385911
--- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 111.4 on 14 degrees of freedom
Multiple R-squared: 0.05412, Adjusted R-squared: -0.01344
F-statistic: 0.801 on 1 and 14 DF, p-value: 0.3859
anova(m)
Analysis of Variance Table
Response: Reforestacion
Df
Sum Sq
Superfice 1
9943
Residuals 14
173778
Mean Sq
9943.1
12412.7
F value
0.801
Pr(>F)
0.3859
RS4. Dióxido de Carbono por uso vehicular
Año base 1970=100
Redfern, A., Bunyan, M., and Lawrence, T. (eds) (2003).
The Environment in Your Pocket, 7th edn.
London:
UK Department for Environment, Food and Rural Affairs.
anio
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
co2
104.619
109.785
117.197
114.404
111.994
116.898
119.915
126.07
128.759
130.196
126.409
103.136
134.212
140.721
143.462
153.074
159.999
170.312
177.51
182.686
181.348
183.757
185.869
186.872
185.1
192.249
194.667
193.438
uso
105.742
110.995
116.742
114.592
115.605
121.467
123.123
127.953
127.648
135.66
138.139
141.911
143.707
151.205
154.487
162.285
174.837
187.403
202.985
204.959
205.325
205.598
205.641
210.826
214.947
220.753
225.742
229.027
Call: lm(formula = co2 ~ uso)
Residuals:
Min
1Q
-29.5946
-0.7761
Coefficients:
Estimate
(Intercept)
25.39475
uso
0.75636
--- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01
Median
1.0901
3Q
2.4873
Std. Error
5.05584
0.02999
‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
t
5.023
25.223
Max
6.8163
value Pr(>|t|)
3.16e-05 ***
< 2e-16 ***
Residual standard error: 6.503 on 26 degrees of freedom
Multiple R-squared: 0.9607, Adjusted R-squared: 0.9592
F-statistic: 636.2 on 1 and 26 DF, p-value: < 2.2e-16
Analysis of Variance Table
Response: co2
Df
Sum Sq
Uso
1
26904.1
Residuals 26
1099.5
--- Signif. codes: 0 ‘***’ 0.001
Mean Sq F
value Pr(>F)
26904.1 636.21
< 2.2e-16 ***
42.3
‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Descargar