Sei sulla pagina 1di 7

ESCUELA POLITECNICA NACIONAL

GEO-ESTADISTICA
Francisco Robalino
06-11-19

PRACTICA 5

CODIGOS:
> # ANALISIS DE TENDENCIA ESPACIAL
> # CALCULAR AL SUPERFICIE DE TENDENCIA DE PRIMER ORDEN
> str(tcp)
'data.frame': 147 obs. of 4 variables:
$ UTM_E : num 702638 701659 703488 703421 703358 ...
$ UTM_N : num 326959 326772 322133 322508 322846 ...
$ clay35: num 78 80 66 61 53 57 70 72 70 62 ...
$ pH35 : num 4.8 4.4 4.2 4.54 4.4 ...
> ?lm
> ts1<-lm(clay35~UTM_E + UTM_N, data=tcp)
> ts1
Call:
lm(formula = clay35 ~ UTM_E + UTM_N, data = tcp)
Coefficients:
(Intercept) UTM_E UTM_N
-2.503e+02 6.513e-04 -4.504e-04
> summary(ts1)
Call:
lm(formula = clay35 ~ UTM_E + UTM_N, data = tcp)
Residuals:
Min 1Q Median 3Q Max
-31.6006 -5.1064 -0.3632 3.6067 20.4666
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -2.503e+02 5.186e+01 -4.826 3.52e-06 ***
UTM_E 6.513e-04 5.970e-05 10.908 < 2e-16 ***
UTM_N -4.504e-04 9.238e-05 -4.875 2.84e-06 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 9.107 on 144 degrees of freedom
Multiple R-squared: 0.5059, Adjusted R-squared: 0.499
F-statistic: 73.72 on 2 and 144 DF, p-value: < 2.2e-16

> # RESIDUOS
> tcp$clay35
[1] 78 80 66 61 53 57 70 72 70 62 51 55 54 35 35 58 43 56 34 37 41 54 48
[24] 56 45 43 51 55 38 46 48 48 40 31 35 32 33 40 19 27 33 48 33 46 53 32
[47] 38 54 27 33 40 53 43 65 41 41 42 44 45 45 57 57 30 25 32 32 36 38 44
[70] 40 43 48 45 40 43 44 54 57 57 57 44 31 60 27 52 52 50 47 55 25 20 46
[93] 45 49 47 44 55 47 45 42 40 44 45 20 70 73 43 44 57 45 28 33 58 24 41
[116] 38 42 37 48 58 62 65 40 25 16 34 33 47 58 36 37 27 25 16 20 50 66 47
[139] 66 38 40 57 47 39 23 45 46
> tcp$clay35 [1]
[1] 78
> fitted(ts1)[1]
1
60.08672
> # fitted para extraer valores de los datos ajustados
> tcp$clay35[1]-fitted(ts1)[1]
1
17.91328
> residuals(ts1)[1]
1
17.91328
> hist(residuals(ts1)[1], main="residuos de superficie de tendencia de 1er
orden")
Error in plot.new() : figure margins too large
> par(mfrow=c(2,2))
> require(sp)
> tmp<-data.frame(e=tcp$UTM_E,n=tcp$UTM_N,residuos=residuals(ts1))
> tmp
e n residuos
1 702638 326959 17.91327614
2 701659 326772 20.46664033
3 703488 322133 3.18620692
4 703421 322508 -1.60126893
5 703358 322846 -9.40801361
6 702334 324551 -3.97323783
7 681328 311602 16.87526217
8 681508 311295 18.61977094
9 681230 311053 16.69183115
10 683989 311685 7.17963939
11 697665 337414 -1.13936123
12 696905 337974 3.60780524
13 692420 324675 -0.46079685
14 692539 322735 -20.41201959
15 692687 325952 -19.05955760
16 692993 327812 4.57884969
17 680981 310897 -10.21626315
18 685992 313274 0.59080696
19 679277 325801 -11.39416300
20 679890 326164 -8.62990034
21 682720 326752 -6.20814798
22 670379 335769 18.89006493
23 670594 336095 12.89686542
24 690278 336749 8.37200098
25 690441 337232 -2.51662450
26 679593 337271 2.56581195
27 679242 338073 11.15560311
28 684468 337629 11.55215128
29 684374 338166 -5.14478019
30 684199 339579 3.60556678
31 697749 337608 -4.10669482
32 696813 337461 -3.56331993
33 659576 336644 12.31970613
34 659822 337154 3.38918609
35 666108 327786 -0.92372636
36 665629 326619 -4.13735744
37 664564 326227 -2.62031125
38 671039 336819 4.93312431
39 670754 336391 -16.07402596
40 668197 336015 -6.57809341
41 667870 335555 -0.57230266
42 667325 334883 14.47998386
43 666506 337233 1.07174156
44 687124 339817 1.80781902
45 695689 328317 -1.94950998
46 674846 323759 -11.42808930
47 674723 323431 -5.49570648
48 694940 327718 -0.73148917
49 666562 337348 -4.91293617
50 686360 339248 -10.95088008
51 686046 339368 -3.69233963
52 686499 339117 8.89959593
53 686009 339249 -0.72183733
54 695904 328844 10.14781539
55 675278 324063 -2.57252050
56 675653 324016 -2.83791063
57 675329 319898 -3.48153647
58 675761 319789 -1.81197153
59 687818 339602 0.25901426
60 686982 339433 0.72735493
61 695235 326737 1.63457356
62 695205 326737 1.65411137
63 665872 336698 -1.75630871
64 666137 336534 -7.00275380
65 662629 336481 2.25799765
66 662532 336506 2.33242922
67 673859 319080 -8.89258855
68 673670 319091 -6.76454625
69 674436 319681 -0.99769185
70 673754 319123 -4.80484020
71 674683 319769 -2.11892036
72 694832 327910 -6.57468152
73 689860 341727 -0.11381762
74 690096 342170 -5.06800002
75 689456 342064 -1.69893290
76 690102 342379 -0.97777971
77 673056 323431 11.58994447
78 673041 323306 14.54341681
79 673606 322713 13.90838380
80 671496 322819 15.33028256
81 671483 322862 2.35811497
82 659401 336922 3.55888025
83 695219 326264 4.43196751
84 697673 329144 -28.86915235
85 697580 329339 -3.72076249
86 688397 340081 7.09766300
87 688132 340335 5.38464161
88 674393 319117 1.77630223
89 694670 327737 0.45290820
90 665317 336226 -6.60743508
91 665258 336333 -11.52082086
92 673550 318214 0.91862825
93 673475 318157 -0.05819846
94 670672 320434 6.79278252
95 670188 320542 5.15663275
96 672706 319431 0.01639536
97 694955 327879 0.33125191
98 687782 339579 2.27210107
99 687768 339501 0.24608965
100 671668 321724 -0.27489216
101 671627 322081 -2.08740748
102 664734 335116 12.27233615
103 688290 339208 -0.22582739
104 665534 334804 -12.38918835
105 696470 327686 14.25767063
106 696707 327780 17.14565695
107 687072 339485 -1.30783913
108 687081 339375 -0.36324145
109 694702 327706 2.41810632
110 672639 319381 1.03751118
111 663925 336421 -2.61305807
112 663836 336451 2.45841527
113 695429 326084 2.21413578
114 663914 335632 -6.96123815
115 673011 318201 -3.73619728
116 672834 318268 -6.59074924
117 687110 339519 -2.31727435
118 672980 322650 -5.71230071
119 666452 337405 16.18437370
120 695354 326221 2.32468135
121 692880 341637 14.87884269
122 693257 341620 17.62566122
123 661615 337770 11.49890584
124 661824 338087 -3.49443947
125 666630 338621 -15.38389761
126 666687 338874 2.69292481
127 659456 336935 5.52891578
128 699567 328185 -10.53454667
129 699451 328329 0.60585317
130 673080 323032 -6.60538442
131 673121 323056 -5.62127716
132 663236 334606 -3.98176590
133 663100 334323 -6.02064993
134 664648 336318 -15.13030765
135 665180 335843 -11.69070511
136 698884 328165 -7.09874332
137 698928 328368 8.96402685
138 695149 328867 -7.35012451
139 695014 328757 11.68825466
140 686356 339523 -5.82442258
141 686125 339547 -3.66317251
142 695457 328200 2.14888882
143 695513 328271 -7.85560530
144 695001 328462 -15.43613886
145 695098 328237 -31.60064494
146 686534 339916 1.23664949
147 688608 339579 0.73416005
> coordinates(tmp)<-c("e","n")
> print(bubble(tmp,zcol="residuos",main="residuos de superficie de tendencia
de 1er orden",xlab="UTM_E",ylab="UTM_N",pch=1))
> print(bubble(tmp,zcol="residuos",pch=1))
> #SUPERFICIE DE TENDENCIA TS2
> ts2<-lm(clay35~I(UTM_E^2)+I(UTM_N^2)+I(UTM_E*UTM_N)+UTM_E+UTM_N,data=tcp)
> summary(ts2)

Call:
lm(formula = clay35 ~ I(UTM_E^2) + I(UTM_N^2) + I(UTM_E * UTM_N) +
UTM_E + UTM_N, data = tcp)
Residuals:
Min 1Q Median 3Q Max
-29.4762 -4.9979 -0.5598 4.2090 20.8297
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1.180e+04 6.743e+03 1.751 0.08218 .
I(UTM_E^2) 1.269e-08 8.438e-09 1.504 0.13492
I(UTM_N^2) 3.580e-08 1.264e-08 2.833 0.00528 **
I(UTM_E * UTM_N) 1.024e-08 1.329e-08 0.770 0.44253
UTM_E -2.001e-02 1.477e-02 -1.355 0.17771
UTM_N -3.098e-02 1.238e-02 -2.502 0.01349 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 8.936 on 141 degrees of freedom
Multiple R-squared: 0.5342, Adjusted R-squared: 0.5177
F-statistic: 32.34 on 5 and 141 DF, p-value: < 2.2e-16
> residuals(ts2)[2]
2
19.97546
> hist(residuals(ts2)[1], main="residuos de superficie de tendencia de 2do
orden"
+ tmp2<-data.frame(e=tcp$UTM_E,n=tcp$UTM_N,residuos=residuals(ts2))
> tmp2
coordinates residuos
1 (702638, 326959) 16.916176049
2 (701659, 326772) 19.975464716
3 (703488, 322133) 1.323673802
4 (703421, 322508) -3.338676605
5 (703358, 322846) -11.039638098
6 (702334, 324551) -4.841906615
7 (681328, 311602) 10.546451595
8 (681508, 311295) 11.939527630
9 (681230, 311053) 9.653113146
10 (683989, 311685) 1.341422800
11 (697665, 337414) -4.071595763
12 (696905, 337974) 0.605797403
13 (692420, 324675) 2.257632327
14 (692539, 322735) -18.223351403
15 (692687, 325952) -16.223569995
16 (692993, 327812) 7.384854211
17 (680981, 310897) -17.503702991
18 (685992, 313274) -3.279267513
19 (679277, 325801) -7.459916012
20 (679890, 326164) -4.565373776
21 (682720, 326752) -1.958075077
22 (670379, 335769) 20.829688321
23 (670594, 336095) 14.753323338
24 (690278, 336749) 8.878480515
25 (690441, 337232) -2.384295555
26 (679593, 337271) 4.580073650
27 (679242, 338073) 12.696162134
28 (684468, 337629) 12.847800715
29 (684374, 338166) -4.195690405
30 (684199, 339579) 3.535101162
31 (697749, 337608) -7.232858180
32 (696813, 337461) -6.116284265
33 (659576, 336644) 10.239170336
34 (659822, 337154) 1.245792992
35 (666108, 327786) 0.274683045
36 (665629, 326619) -3.464829286
37 (664564, 326227) -2.552138362
38 (671039, 336819) 6.562395604
39 (670754, 336391) -14.308780724
40 (668197, 336015) -5.248703908
41 (667870, 335555) 0.832321878
42 (667325, 334883) 15.936911895
43 (666506, 337233) 1.431675471
44 (687124, 339817) 0.907891446
45 (695689, 328317) -0.038064620
46 (674846, 323759) -8.869469121
47 (674723, 323431) -3.111601560
48 (694940, 327718) 1.483625713
49 (666562, 337348) -4.588133354
50 (686360, 339248) -11.201239359
51 (686046, 339368) -3.966716204
52 (686499, 339117) 8.720201526
53 (686009, 339249) -0.893720222
54 (695904, 328844) 11.916452289
55 (675278, 324063) 0.206789357
56 (675653, 324016) -0.002153458
57 (675329, 319898) -3.016735129
58 (675761, 319789) -1.319579607
59 (687818, 339602) -0.643910911
60 (686982, 339433) 0.180080898
61 (695235, 326737) 3.772105731
62 (695205, 326737) 3.801454416
63 (665872, 336698) -1.364303157
64 (666137, 336534) -6.463083463
65 (662629, 336481) 1.570456304
66 (662532, 336506) 1.597197978
67 (673859, 319080) -9.434186032
68 (673670, 319091) -7.353435165
69 (674436, 319681) -0.921360366
70 (673754, 319123) -5.343819033
71 (674683, 319769) -1.912118961
72 (694832, 327910) -4.335432961
73 (689860, 341727) -3.595779378
74 (690096, 342170) -9.085068594
75 (689456, 342064) -5.385005363
76 (690102, 342379) -5.215638985
77 (673056, 323431) 13.560543738
78 (673041, 323306) 16.449693915
79 (673606, 322713) 15.665859248
80 (671496, 322819) 16.534562889
81 (671483, 322862) 3.581345791
82 (659401, 336922) 1.300489928
83 (695219, 326264) 6.560091852
84 (697673, 329144) -27.839402716
85 (697580, 329339) -2.689579290
86 (688397, 340081) 5.624308896
87 (688132, 340335) 3.764344860
88 (674393, 319117) 1.416388216
89 (694670, 327737) 2.755214546
90 (665317, 336226) -6.216933333
91 (665258, 336333) -11.188905755
92 (673550, 318214) -0.420742197
93 (673475, 318157) -1.469285968
94 (670672, 320434) 6.223335280
95 (670188, 320542) 4.487307346
96 (672706, 319431) -0.606465223
97 (694955, 327879) 2.531869091
98 (687782, 339579) 1.398008045
99 (687768, 339501) -0.559761101
100 (671668, 321724) 0.353731148
101 (671627, 322081) -1.257195518
102 (664734, 335116) 12.811643928
103 (688290, 339208) -0.935497863
104 (665534, 334804) -11.484852717
105 (696470, 327686) 15.940410822
106 (696707, 327780) 18.733541411
107 (687072, 339485) -1.919838481
108 (687081, 339375) -0.888221916
109 (694702, 327706) 4.711640489
110 (672639, 319381) 0.354713029
111 (663925, 336421) -2.781574260
112 (663836, 336451) 2.246274631
113 (695429, 326084) 4.264652594
114 (663914, 335632) -6.872841039
115 (673011, 318201) -5.257458656
116 (672834, 318268) -8.112650120
117 (687110, 339519) -2.966601295
118 (672980, 322650) -4.157702989
119 (666452, 337405) 16.451110976
120 (695354, 326221) 4.407016368
121 (692880, 341637) 10.333798134
122 (693257, 341620) 12.937957866
123 (661615, 337770) 9.895071454
124 (661824, 338087) -5.153808042
125 (666630, 338621) -15.674252642
126 (666687, 338874) 2.278147099
127 (659456, 336935) 3.292208488
128 (699567, 328185) -10.172653358
129 (699451, 328329) 1.000133055
130 (673080, 323032) -4.824504435
131 (673121, 323056) -3.817126646
132 (663236, 334606) -3.888766733
133 (663100, 334323) -5.923238078
134 (664648, 336318) -15.002072013
135 (665180, 335843) -11.214422264
136 (698884, 328165) -6.431419112
137 (698928, 328368) 9.585109281
138 (695149, 328867) -5.315575750
139 (695014, 328757) 13.783992682
140 (686356, 339523) -6.294135946
141 (686125, 339547) -4.099166357
142 (695457, 328200) 4.153426965
143 (695513, 328271) -5.877432738
144 (695001, 328462) -13.301189873
145 (695098, 328237) -29.476164039
146 (686534, 339916) 0.400153397
147 (688608, 339579) -0.371399854
> coordinates(tmp2)<-c("e","n")
> print(bubble(tmp2,zcol="residuos",main="residuos de superficie de
tendencia de 2do orden",xlab="UTM_E",ylab="UTM_N",pch=1))
> print(bubble(tmp2,zcol="residuos",pch=1))
> #En el grafico de distribución (ts2) podemos considerar, que la oscilación
de crecimiento es una skewness(-), con una kurtosis media, en cuanto a la
segunda grafica de burbujas y puntos podemos decir que esta distribución no
es ajustable por la saturación de puntos, unos sobre otro, por tanto
podemosdecir que ni para primer y segundo orden esta distribución de
residuos de arcillas no puede ser ajustada.