## [1] "1. Leitura dos dados"

## [1] "2. Exploração inicial"

## Rows: 15,395
## Columns: 34
## $ ano <chr> "2016", "2016", "2016", "2016", "2016", "2016", "2016", "20…
## $ ponto <chr> "CF1658277", "CF1658272", "CF1658273", "CF1658274", "CF1658…
## $ x <dbl> -49.18157, -49.18953, -49.18786, -49.18619, -49.18453, -49.…
## $ y <dbl> -21.27265, -21.27243, -21.27241, -21.27239, -21.27237, -21.…
## $ variedade <chr> "CV6654", "CV6654", "CV6654", "CV6654", "CV6654", "CV6654",…
## $ solos <chr> "LVal md", "LVPd md/arg", "LVPd md/arg", "LVPd md/arg", "LV…
## $ tch_real <dbl> 63.54, 63.54, 63.54, 63.54, 63.54, 63.54, 63.54, 63.54, 63.…
## $ atr <dbl> 148.07, 148.07, 148.07, 148.07, 148.07, 148.07, 148.07, 148…
## $ ph_cacl2_1 <dbl> 5.19, 5.18, 4.88, 4.96, 5.05, 5.15, 6.24, 4.50, 5.38, 5.50,…
## $ mo_1 <dbl> 16.2022, 17.0236, 15.6546, 13.7380, 15.6546, 14.0118, 11.82…
## $ p_resina_1 <dbl> 11.538500, 12.526100, 10.880100, 10.715500, 11.044700, 11.2…
## $ s_1 <dbl> 8.84769, 9.92472, 12.07878, 8.96736, 9.56571, 8.01000, 9.80…
## $ ca_1 <dbl> 21.601449, 19.862319, 14.789855, 16.601449, 18.195652, 19.4…
## $ mg_1 <dbl> 11.045207, 15.713952, 5.495713, 9.696804, 10.047545, 10.359…
## $ k_1 <dbl> 1.2805516, 0.9239182, 1.4992867, 1.5563481, 1.6229196, 0.84…
## $ al_1 <dbl> 1.19600, 0.92000, 1.38000, 0.55200, 0.82800, 1.19600, 0.644…
## $ h_al_1 <dbl> 22.96210, 22.01502, 30.19345, 22.72158, 22.01502, 19.40179,…
## $ sb_1 <dbl> 33.92721, 36.50019, 21.78485, 27.85460, 29.86612, 30.63469,…
## $ ctc_1 <dbl> 56.88931, 58.51521, 51.97831, 50.57618, 51.88114, 50.03647,…
## $ v_1 <dbl> 59.63723, 62.37726, 41.91144, 55.07455, 57.56642, 61.22471,…
## $ m_1 <dbl> 3.4051560, 2.4585659, 5.9573004, 1.9432103, 2.6975854, 3.75…
## $ ph_cacl2_2 <dbl> 4.90, 5.38, 5.29, 5.30, 5.16, 5.06, 5.50, 4.50, 4.79, 4.46,…
## $ mo_2 <dbl> 13.7380, 13.4642, 12.3690, 11.5476, 13.7380, 11.5476, 11.82…
## $ p_resina_2 <dbl> 12.032300, 11.703100, 11.703100, 13.513700, 11.867700, 11.8…
## $ s_2 <dbl> 12.43779, 16.86558, 11.00175, 8.12967, 12.19845, 13.27548, …
## $ ca_2 <dbl> 14.210145, 16.021739, 15.514493, 14.427536, 15.224638, 14.5…
## $ mg_2 <dbl> 7.085737, 9.735776, 6.563523, 8.262666, 7.327358, 7.475448,…
## $ k_2 <dbl> 0.8050404, 0.7194484, 0.9429387, 0.5863053, 0.7669995, 0.67…
## $ al_2 <dbl> 3.956000, 1.012000, 1.104000, 0.736000, 2.024000, 2.852000,…
## $ h_al_2 <dbl> 43.19156, 26.60941, 24.98024, 21.33044, 24.71858, 26.33069,…
## $ sb_2 <dbl> 22.100922, 26.476963, 23.020954, 23.276507, 23.318995, 22.7…
## $ ctc_2 <dbl> 65.29248, 53.08638, 48.00119, 44.60695, 48.03757, 49.05050,…
## $ v_2 <dbl> 33.84911, 49.87525, 47.95913, 52.18135, 48.54324, 46.31922,…
## $ m_2 <dbl> 15.182146, 3.681478, 4.576174, 3.065069, 7.986428, 11.15290…
## [1] "3. Testes de normalidade"
## [1] "4. Estatística descritiva"
Estatística descritiva das variáveis (2018)
| Min |
32.530000 |
107.400000 |
3.9200000 |
4.240000 |
2.240000 |
0.570000 |
3.530000 |
0.7700000 |
0.060000 |
0.000000 |
6.650000 |
5.160000 |
16.920000 |
15.3100000 |
0.000000 |
| Q1 |
64.230000 |
125.860000 |
5.0900000 |
8.640000 |
7.120000 |
3.880000 |
14.365000 |
5.6600000 |
1.030000 |
0.000000 |
13.140000 |
21.900000 |
38.917500 |
54.9275000 |
0.000000 |
| Med |
92.200000 |
136.960000 |
5.4400000 |
10.280000 |
9.260000 |
5.300000 |
18.280000 |
7.5900000 |
1.550000 |
0.200000 |
15.550000 |
28.075000 |
44.365000 |
64.3600000 |
0.610000 |
| Média |
90.443250 |
134.753691 |
5.4156196 |
10.821915 |
11.253798 |
6.635679 |
19.324278 |
7.8872416 |
1.916803 |
0.592307 |
16.588478 |
29.128219 |
45.716644 |
62.4027491 |
2.683758 |
| Q3 |
114.580000 |
143.920000 |
5.7300000 |
12.480000 |
13.010000 |
7.562500 |
23.195000 |
9.6900000 |
2.460000 |
0.500000 |
19.002500 |
35.120000 |
51.272500 |
71.3625000 |
1.770000 |
| Max |
167.030000 |
153.730000 |
6.9400000 |
52.260000 |
81.250000 |
109.240000 |
93.510000 |
29.3500000 |
9.520000 |
21.000000 |
73.900000 |
115.020000 |
122.230000 |
94.1000000 |
65.740000 |
| DP |
29.700621 |
11.371274 |
0.4973979 |
3.243604 |
7.023221 |
5.172513 |
7.794419 |
3.0856194 |
1.232975 |
1.383771 |
5.080752 |
10.618822 |
10.301776 |
12.0849141 |
6.450736 |
| CV |
32.838958 |
8.438562 |
9.1845052 |
29.972548 |
62.407563 |
77.950028 |
40.334851 |
39.1216548 |
64.324542 |
233.624034 |
30.628197 |
36.455446 |
22.533972 |
19.3659963 |
240.362085 |
| Skn |
0.078104 |
-0.348753 |
-0.0418294 |
1.843277 |
3.178353 |
5.209192 |
1.530952 |
0.8732924 |
1.604038 |
6.189742 |
2.083737 |
1.077532 |
1.258516 |
-0.6806249 |
4.316907 |
| Krt |
-0.917421 |
-0.766672 |
0.1680767 |
12.363751 |
16.743762 |
62.357645 |
6.898821 |
2.4166266 |
3.313847 |
58.605551 |
11.151201 |
3.742825 |
4.374259 |
0.3238930 |
21.948001 |
## [1] "5. Transformações"
Estatística descritiva após transformações (2018)
| Min |
32.530000 |
107.400000 |
3.9200000 |
4.240000 |
1.1755733 |
-0.5621189 |
1.2612979 |
0.7700000 |
0.060000 |
0.000000 |
6.650000 |
1.6409366 |
2.8284964 |
15.3100000 |
0.0000000 |
| Q1 |
64.230000 |
125.860000 |
5.0900000 |
8.640000 |
2.0943302 |
1.3558352 |
2.6647945 |
5.6600000 |
1.030000 |
0.000000 |
13.140000 |
3.0864866 |
3.6614440 |
54.9275000 |
0.0000000 |
| Med |
92.200000 |
136.960000 |
5.4400000 |
10.280000 |
2.3282528 |
1.6677050 |
2.9058076 |
7.5900000 |
1.550000 |
0.200000 |
15.550000 |
3.3348795 |
3.7924508 |
64.3600000 |
0.4762342 |
| Média |
90.443250 |
134.753691 |
5.4156196 |
10.821915 |
2.3956675 |
1.7119512 |
2.8835111 |
7.8872416 |
1.916803 |
0.592307 |
16.588478 |
3.3050750 |
3.7988601 |
62.4027491 |
0.7367674 |
| Q3 |
114.580000 |
143.920000 |
5.7300000 |
12.480000 |
2.6397714 |
2.0232017 |
3.1439367 |
9.6900000 |
2.460000 |
0.500000 |
19.002500 |
3.5587708 |
3.9371545 |
71.3625000 |
1.0188473 |
| Max |
167.030000 |
153.730000 |
6.9400000 |
52.260000 |
4.4097634 |
4.6935473 |
4.5380684 |
29.3500000 |
9.520000 |
21.000000 |
73.900000 |
4.7451060 |
4.8059045 |
94.1000000 |
4.2008045 |
| DP |
29.700621 |
11.371274 |
0.4973979 |
3.243604 |
0.4414219 |
0.5703033 |
0.4027037 |
3.0856194 |
1.232975 |
1.383771 |
5.080752 |
0.3743410 |
0.2155888 |
12.0849141 |
0.8669186 |
| CV |
32.838958 |
8.438562 |
9.1845052 |
29.972548 |
18.4258398 |
33.3130547 |
13.9657406 |
39.1216548 |
64.324542 |
233.624034 |
30.628197 |
11.3262492 |
5.6750915 |
19.3659963 |
117.6651697 |
| Skn |
0.078104 |
-0.348753 |
-0.0418294 |
1.843277 |
0.7675986 |
0.4275091 |
-0.3859814 |
0.8732924 |
1.604038 |
6.189742 |
2.083737 |
-0.4722597 |
0.1644619 |
-0.6806249 |
1.5746253 |
| Krt |
-0.917421 |
-0.766672 |
0.1680767 |
12.363751 |
1.0942523 |
1.0177710 |
0.9169996 |
2.4166266 |
3.313847 |
58.605551 |
11.151201 |
0.9395356 |
1.0372209 |
0.3238930 |
2.0533585 |
## [1] "6. Seleção de ano/variável"
## Rows: 3,212
## Columns: 3
## $ x <dbl> -49.29039, -49.28943, -49.28908, -49.28771, -49.28756, -49.28607, -4…
## $ y <dbl> -20.90816, -20.90947, -20.90697, -20.90772, -20.90952, -20.90862, -2…
## $ z <dbl> 46.12, 46.12, 46.12, 46.07, 46.22, 46.15, 46.15, 46.55, 61.11, 61.25…
## [1] "7. Boxplot / histograma / normalidade"
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 32.53 64.23 92.20 90.44 114.58 167.03


##
## Shapiro-Wilk normality test
##
## data: y_vals
## W = 0.97461, p-value < 2.2e-16
##
## Cramer-von Mises normality test
##
## data: y_vals
## W = 3.8693, p-value = 7.37e-10
##
## Lilliefors (Kolmogorov-Smirnov) normality test
##
## data: y_vals
## D = 0.077121, p-value < 2.2e-16
##
## Anderson-Darling normality test
##
## data: y_vals
## A = 25.269, p-value < 2.2e-16
## [1] "8. Colinearidade"
## tch_real atr ph_cacl2_1 mo_1 p_resina_1 s_1 ca_1 mg_1 k_1
## tch_real 1.00 -0.06 0.13 0.15 0.13 0.09 0.12 0.18 0.03
## atr -0.06 1.00 -0.07 -0.16 -0.01 -0.09 -0.01 -0.01 0.06
## ph_cacl2_1 0.13 -0.07 1.00 0.12 0.26 0.00 0.59 0.57 0.32
## mo_1 0.15 -0.16 0.12 1.00 0.15 0.07 0.28 0.23 0.03
## p_resina_1 0.13 -0.01 0.26 0.15 1.00 0.06 0.29 0.17 0.21
## s_1 0.09 -0.09 0.00 0.07 0.06 1.00 -0.01 0.06 0.24
## ca_1 0.12 -0.01 0.59 0.28 0.29 -0.01 1.00 0.73 0.25
## mg_1 0.18 -0.01 0.57 0.23 0.17 0.06 0.73 1.00 0.30
## k_1 0.03 0.06 0.32 0.03 0.21 0.24 0.25 0.30 1.00
## al_1 -0.14 0.00 -0.52 -0.07 -0.09 0.09 -0.40 -0.30 -0.08
## h_al_1 -0.09 -0.01 -0.66 0.09 -0.15 0.03 -0.30 -0.29 -0.19
## sb_1 0.14 0.00 0.64 0.27 0.28 0.04 0.97 0.84 0.38
## ctc_1 0.09 0.01 0.30 0.33 0.23 0.06 0.84 0.73 0.31
## v_1 0.14 0.00 0.80 0.14 0.28 0.02 0.84 0.73 0.37
## m_1 -0.17 0.02 -0.66 -0.10 -0.18 0.06 -0.57 -0.45 -0.19
## al_1 h_al_1 sb_1 ctc_1 v_1 m_1
## tch_real -0.14 -0.09 0.14 0.09 0.14 -0.17
## atr 0.00 -0.01 0.00 0.01 0.00 0.02
## ph_cacl2_1 -0.52 -0.66 0.64 0.30 0.80 -0.66
## mo_1 -0.07 0.09 0.27 0.33 0.14 -0.10
## p_resina_1 -0.09 -0.15 0.28 0.23 0.28 -0.18
## s_1 0.09 0.03 0.04 0.06 0.02 0.06
## ca_1 -0.40 -0.30 0.97 0.84 0.84 -0.57
## mg_1 -0.30 -0.29 0.84 0.73 0.73 -0.45
## k_1 -0.08 -0.19 0.38 0.31 0.37 -0.19
## al_1 1.00 0.53 -0.40 -0.09 -0.53 0.80
## h_al_1 0.53 1.00 -0.33 0.18 -0.73 0.51
## sb_1 -0.40 -0.33 1.00 0.85 0.88 -0.59
## ctc_1 -0.09 0.18 0.85 1.00 0.51 -0.28
## v_1 -0.53 -0.73 0.88 0.51 1.00 -0.68
## m_1 0.80 0.51 -0.59 -0.28 -0.68 1.00

## ca_1 mg_1 h_al_1 sb_1 ctc_1 v_1
## 86.96072 11.57993 22.54230 231.35573 59.49064 124.33088
## [1] "9. Regressão múltipla e Stepwise"
##
## Call:
## lm(formula = form_reg, data = df_aux)
##
## Residuals:
## Min 1Q Median 3Q Max
## -78.597 -23.233 1.079 21.701 78.430
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 158.52485 17.80900 8.901 < 2e-16 ***
## atr -0.08018 0.04536 -1.768 0.07722 .
## ph_cacl2_1 -4.77040 1.57636 -3.026 0.00250 **
## mo_1 1.07418 0.16831 6.382 2.00e-10 ***
## p_resina_1 7.22213 1.21476 5.945 3.06e-09 ***
## s_1 4.78875 0.92371 5.184 2.30e-07 ***
## mg_1 2.30283 0.28766 8.005 1.65e-15 ***
## k_1 -1.05848 0.46523 -2.275 0.02296 *
## al_1 -0.60544 0.63114 -0.959 0.33749
## ctc_1 -21.42965 3.82566 -5.602 2.30e-08 ***
## m_1 -3.98197 1.14458 -3.479 0.00051 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 28.48 on 3201 degrees of freedom
## Multiple R-squared: 0.08331, Adjusted R-squared: 0.08044
## F-statistic: 29.09 on 10 and 3201 DF, p-value: < 2.2e-16


##
## studentized Breusch-Pagan test
##
## data: modelo_final
## BP = 160.48, df = 10, p-value < 2.2e-16
##
## Durbin-Watson test
##
## data: modelo_final
## DW = 1.4145, p-value < 2.2e-16
## alternative hypothesis: true autocorrelation is greater than 0
## Start: AIC=21785.86
## tch_real ~ 1
##
## Df Sum of Sq RSS AIC
## + mg_1 1 90165 2742345 21684
## + m_1 1 78862 2753648 21697
## + mo_1 1 63906 2768603 21715
## + al_1 1 58315 2774194 21721
## + ph_cacl2_1 1 49139 2783370 21732
## + p_resina_1 1 48025 2784484 21733
## + s_1 1 24942 2807567 21760
## + ctc_1 1 20528 2811981 21765
## + atr 1 10848 2821662 21776
## + k_1 1 2045 2830465 21786
## <none> 2832509 21786
##
## Step: AIC=21683.96
## tch_real ~ mg_1
##
## Df Sum of Sq RSS AIC
## + mo_1 1 35716 2706628 21644
## + p_resina_1 1 28742 2713602 21652
## + m_1 1 26984 2715361 21654
## + al_1 1 25360 2716985 21656
## + s_1 1 19623 2722722 21663
## + ctc_1 1 12554 2729791 21671
## + atr 1 10216 2732129 21674
## + ph_cacl2_1 1 3875 2738470 21681
## + k_1 1 2281 2740064 21683
## <none> 2742345 21684
##
## Step: AIC=21643.85
## tch_real ~ mg_1 + mo_1
##
## Df Sum of Sq RSS AIC
## + m_1 1 27248.8 2679380 21613
## + ctc_1 1 26349.3 2680279 21614
## + al_1 1 25543.9 2681085 21615
## + p_resina_1 1 22236.0 2684393 21619
## + s_1 1 16833.8 2689795 21626
## + atr 1 5156.1 2701472 21640
## + ph_cacl2_1 1 4041.1 2702587 21641
## <none> 2706628 21644
## + k_1 1 1599.8 2705029 21644
##
## Step: AIC=21613.35
## tch_real ~ mg_1 + mo_1 + m_1
##
## Df Sum of Sq RSS AIC
## + ctc_1 1 22402.1 2656978 21588
## + s_1 1 21245.9 2658134 21590
## + p_resina_1 1 17118.3 2662261 21595
## + atr 1 4715.9 2674664 21610
## + k_1 1 2662.8 2676717 21612
## + al_1 1 2440.7 2676939 21612
## <none> 2679380 21613
## + ph_cacl2_1 1 1141.8 2678238 21614
##
## Step: AIC=21588.38
## tch_real ~ mg_1 + mo_1 + m_1 + ctc_1
##
## Df Sum of Sq RSS AIC
## + p_resina_1 1 23299.8 2633678 21562
## + s_1 1 21408.5 2635569 21564
## + ph_cacl2_1 1 4429.4 2652548 21585
## + atr 1 3455.0 2653523 21586
## <none> 2656978 21588
## + k_1 1 856.0 2656122 21589
## + al_1 1 213.8 2656764 21590
##
## Step: AIC=21562.09
## tch_real ~ mg_1 + mo_1 + m_1 + ctc_1 + p_resina_1
##
## Df Sum of Sq RSS AIC
## + s_1 1 19078.2 2614600 21541
## + ph_cacl2_1 1 9586.3 2624092 21552
## + atr 1 3563.7 2630114 21560
## + k_1 1 2846.5 2630831 21561
## <none> 2633678 21562
## + al_1 1 491.5 2633186 21564
##
## Step: AIC=21540.74
## tch_real ~ mg_1 + mo_1 + m_1 + ctc_1 + p_resina_1 + s_1
##
## Df Sum of Sq RSS AIC
## + ph_cacl2_1 1 9805.8 2604794 21531
## + k_1 1 8064.7 2606535 21533
## + atr 1 2383.6 2612216 21540
## <none> 2614600 21541
## + al_1 1 978.6 2613621 21542
##
## Step: AIC=21530.67
## tch_real ~ mg_1 + mo_1 + m_1 + ctc_1 + p_resina_1 + s_1 + ph_cacl2_1
##
## Df Sum of Sq RSS AIC
## + k_1 1 5077.4 2599716 21526
## + atr 1 3089.2 2601705 21529
## <none> 2604794 21531
## + al_1 1 838.9 2603955 21532
##
## Step: AIC=21526.4
## tch_real ~ mg_1 + mo_1 + m_1 + ctc_1 + p_resina_1 + s_1 + ph_cacl2_1 +
## k_1
##
## Df Sum of Sq RSS AIC
## + atr 1 2425.80 2597291 21525
## <none> 2599716 21526
## + al_1 1 637.82 2599079 21528
##
## Step: AIC=21525.4
## tch_real ~ mg_1 + mo_1 + m_1 + ctc_1 + p_resina_1 + s_1 + ph_cacl2_1 +
## k_1 + atr
##
## Df Sum of Sq RSS AIC
## <none> 2597291 21525
## + al_1 1 746.44 2596544 21527
##
## Call:
## lm(formula = tch_real ~ mg_1 + mo_1 + m_1 + ctc_1 + p_resina_1 +
## s_1 + ph_cacl2_1 + k_1 + atr, data = variaveis_validas)
##
## Residuals:
## Min 1Q Median 3Q Max
## -78.652 -23.088 1.137 21.630 78.258
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 161.50446 17.53582 9.210 < 2e-16 ***
## mg_1 2.32729 0.28653 8.122 6.45e-16 ***
## mo_1 1.08482 0.16794 6.460 1.21e-10 ***
## m_1 -4.78253 0.78332 -6.105 1.15e-09 ***
## ctc_1 -22.22220 3.73534 -5.949 2.99e-09 ***
## p_resina_1 7.18113 1.21399 5.915 3.66e-09 ***
## s_1 4.74792 0.92272 5.146 2.83e-07 ***
## ph_cacl2_1 -4.78381 1.57628 -3.035 0.00243 **
## k_1 -1.08354 0.46449 -2.333 0.01972 *
## atr -0.07838 0.04532 -1.729 0.08385 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 28.48 on 3202 degrees of freedom
## Multiple R-squared: 0.08304, Adjusted R-squared: 0.08047
## F-statistic: 32.22 on 9 and 3202 DF, p-value: < 2.2e-16
## [1] "10. PCA e biplot"

## [1] 5.973610947 1.983124694 1.243057890 1.218849537 0.952964515 0.885920970
## [7] 0.744957698 0.647102216 0.617188177 0.286704076 0.263508407 0.152765994
## [13] 0.020290254 0.007046416 0.002908209
## [1] 0.3982407298 0.1322083129 0.0828705260 0.0812566358 0.0635309676
## [6] 0.0590613980 0.0496638466 0.0431401477 0.0411458785 0.0191136051
## [11] 0.0175672271 0.0101843996 0.0013526836 0.0004697611 0.0001938806
## [1] 39.82407 53.04490 61.33196 69.45762 75.81072 81.71686 86.68324
## [8] 90.99726 95.11184 97.02320 98.77993 99.79837 99.93364 99.98061
## [15] 100.00000



## [1] "11. Semivariograma e krigagem"





## [using ordinary kriging]
## 0% done 5% done 10% done 15% done 20% done 25% done 29% done 33% done 37% done 42% done 46% done 50% done 54% done 59% done 63% done 67% done 71% done 76% done 80% done 84% done 88% done 93% done 97% done100% done
