|
1 | | - |
2 | | -R version 3.6.0 (2019-04-26) -- "Planting of a Tree" |
3 | | -Copyright (C) 2019 The R Foundation for Statistical Computing |
4 | | -Platform: x86_64-pc-linux-gnu (64-bit) |
5 | | - |
6 | | -R is free software and comes with ABSOLUTELY NO WARRANTY. |
7 | | -You are welcome to redistribute it under certain conditions. |
8 | | -Type 'license()' or 'licence()' for distribution details. |
9 | | - |
10 | | -R is a collaborative project with many contributors. |
11 | | -Type 'contributors()' for more information and |
12 | | -'citation()' on how to cite R or R packages in publications. |
13 | | - |
14 | | -Type 'demo()' for some demos, 'help()' for on-line help, or |
15 | | -'help.start()' for an HTML browser interface to help. |
16 | | -Type 'q()' to quit R. |
17 | | - |
18 | | -> # try bivariate cokriging; cross validate first variable |
19 | | -> library(sp) |
20 | | -> data(meuse) |
21 | | -> library(gstat) |
22 | | -> g=gstat(NULL, "log-zinc", log(zinc)~1, ~x+y, meuse, nmax=10) |
23 | | -> g=gstat(g, "log-lead", log(lead)~1, ~x+y, meuse, nmax=10) |
24 | | -> g=gstat(g, "log-copper", log(copper)~1, ~x+y, meuse, nmax=10) |
25 | | -> v=variogram(g) |
26 | | -> g=gstat(g, model=vgm(1, "Sph", 1000), fill.all=T) |
27 | | -> g=fit.lmc(v, g) |
28 | | -> g |
29 | | -data: |
30 | | -log-zinc : formula = log(zinc)`~`1 ; data dim = 155 x 12 nmax = 10 |
31 | | -log-lead : formula = log(lead)`~`1 ; data dim = 155 x 12 nmax = 10 |
32 | | -log-copper : formula = log(copper)`~`1 ; data dim = 155 x 12 nmax = 10 |
33 | | -variograms: |
34 | | - model psill range |
35 | | -log-zinc Sph 0.7132435 1000 |
36 | | -log-lead Sph 0.6133020 1000 |
37 | | -log-copper Sph 0.3634211 1000 |
38 | | -log-zinc.log-lead Sph 0.6367012 1000 |
39 | | -log-zinc.log-copper Sph 0.4570044 1000 |
40 | | -log-lead.log-copper Sph 0.3934910 1000 |
41 | | -~x + y |
42 | | -> set.seed(13131) |
43 | | -> summary(gstat.cv(g, remove.all=TRUE, nfold=5)) |
44 | | -Intrinsic Correlation found. Good. |
45 | | -[using ordinary cokriging] |
46 | | -Intrinsic Correlation found. Good. |
47 | | -[using ordinary cokriging] |
48 | | -Intrinsic Correlation found. Good. |
49 | | -[using ordinary cokriging] |
50 | | -Intrinsic Correlation found. Good. |
51 | | -[using ordinary cokriging] |
52 | | -Intrinsic Correlation found. Good. |
53 | | -[using ordinary cokriging] |
54 | | - log.zinc.pred log.zinc.var observed residual |
55 | | - Min. :4.779 Min. :0.05426 Min. :4.727 Min. :-1.317697 |
56 | | - 1st Qu.:5.396 1st Qu.:0.10872 1st Qu.:5.288 1st Qu.:-0.230224 |
57 | | - Median :5.858 Median :0.13745 Median :5.787 Median :-0.034374 |
58 | | - Mean :5.895 Mean :0.15249 Mean :5.886 Mean :-0.009094 |
59 | | - 3rd Qu.:6.367 3rd Qu.:0.18303 3rd Qu.:6.514 3rd Qu.: 0.244075 |
60 | | - Max. :7.358 Max. :0.60571 Max. :7.517 Max. : 1.414147 |
61 | | - zscore fold x y |
62 | | - Min. :-3.35764 Min. :1.000 Min. :178605 Min. :329714 |
63 | | - 1st Qu.:-0.58683 1st Qu.:2.000 1st Qu.:179371 1st Qu.:330762 |
64 | | - Median :-0.10755 Median :3.000 Median :179991 Median :331633 |
65 | | - Mean :-0.02766 Mean :2.852 Mean :180005 Mean :331635 |
66 | | - 3rd Qu.: 0.70691 3rd Qu.:4.000 3rd Qu.:180630 3rd Qu.:332463 |
67 | | - Max. : 3.43370 Max. :5.000 Max. :181390 Max. :333611 |
68 | | -Warning message: |
69 | | -In checkNames(value) : |
70 | | - attempt to set invalid names: this may lead to problems later on. See ?make.names |
71 | | -> summary(gstat.cv(g, remove.all=FALSE, nfold=5)) |
72 | | -Intrinsic Correlation found. Good. |
73 | | -[using ordinary cokriging] |
74 | | -Intrinsic Correlation found. Good. |
75 | | -[using ordinary cokriging] |
76 | | -Intrinsic Correlation found. Good. |
77 | | -[using ordinary cokriging] |
78 | | -Intrinsic Correlation found. Good. |
79 | | -[using ordinary cokriging] |
80 | | -Intrinsic Correlation found. Good. |
81 | | -[using ordinary cokriging] |
82 | | - log.zinc.pred log.zinc.var observed residual |
83 | | - Min. :4.644 Min. :0.002371 Min. :4.727 Min. :-0.4190977 |
84 | | - 1st Qu.:5.308 1st Qu.:0.004975 1st Qu.:5.288 1st Qu.:-0.0773273 |
85 | | - Median :5.777 Median :0.005875 Median :5.787 Median : 0.0006165 |
86 | | - Mean :5.883 Mean :0.006609 Mean :5.886 Mean : 0.0026164 |
87 | | - 3rd Qu.:6.422 3rd Qu.:0.007419 3rd Qu.:6.514 3rd Qu.: 0.0825770 |
88 | | - Max. :7.676 Max. :0.027247 Max. :7.517 Max. : 0.4659503 |
89 | | - zscore fold x y |
90 | | - Min. :-4.793253 Min. :1.000 Min. :178605 Min. :329714 |
91 | | - 1st Qu.:-1.080725 1st Qu.:2.000 1st Qu.:179371 1st Qu.:330762 |
92 | | - Median : 0.007242 Median :3.000 Median :179991 Median :331633 |
93 | | - Mean : 0.050487 Mean :2.974 Mean :180005 Mean :331635 |
94 | | - 3rd Qu.: 1.117469 3rd Qu.:4.000 3rd Qu.:180630 3rd Qu.:332463 |
95 | | - Max. : 6.475831 Max. :5.000 Max. :181390 Max. :333611 |
96 | | -Warning message: |
97 | | -In checkNames(value) : |
98 | | - attempt to set invalid names: this may lead to problems later on. See ?make.names |
99 | | -> |
100 | | -> proc.time() |
101 | | - user system elapsed |
102 | | - 0.614 0.050 0.655 |
| 1 | +
|
| 2 | +R Under development (unstable) (2025-02-03 r87683 ucrt) -- "Unsuffered Consequences" |
| 3 | +Copyright (C) 2025 The R Foundation for Statistical Computing |
| 4 | +Platform: x86_64-w64-mingw32/x64 |
| 5 | +
|
| 6 | +R is free software and comes with ABSOLUTELY NO WARRANTY. |
| 7 | +You are welcome to redistribute it under certain conditions. |
| 8 | +Type 'license()' or 'licence()' for distribution details. |
| 9 | +
|
| 10 | +R is a collaborative project with many contributors. |
| 11 | +Type 'contributors()' for more information and |
| 12 | +'citation()' on how to cite R or R packages in publications. |
| 13 | +
|
| 14 | +Type 'demo()' for some demos, 'help()' for on-line help, or |
| 15 | +'help.start()' for an HTML browser interface to help. |
| 16 | +Type 'q()' to quit R. |
| 17 | +
|
| 18 | +> # try bivariate cokriging; cross validate first variable |
| 19 | +> library(sp) |
| 20 | +> data(meuse) |
| 21 | +> library(gstat) |
| 22 | +> g=gstat(NULL, "log-zinc", log(zinc)~1, ~x+y, meuse, nmax=10) |
| 23 | +> g=gstat(g, "log-lead", log(lead)~1, ~x+y, meuse, nmax=10) |
| 24 | +> g=gstat(g, "log-copper", log(copper)~1, ~x+y, meuse, nmax=10) |
| 25 | +> v=variogram(g) |
| 26 | +> g=gstat(g, model=vgm(1, "Sph", 1000), fill.all=T) |
| 27 | +> g=fit.lmc(v, g) |
| 28 | +> g |
| 29 | +data: |
| 30 | +log-zinc : formula = log(zinc)`~`1 ; data dim = 155 x 12 nmax = 10 |
| 31 | +log-lead : formula = log(lead)`~`1 ; data dim = 155 x 12 nmax = 10 |
| 32 | +log-copper : formula = log(copper)`~`1 ; data dim = 155 x 12 nmax = 10 |
| 33 | +variograms: |
| 34 | + model psill range |
| 35 | +log-zinc Sph 0.7132435 1000 |
| 36 | +log-lead Sph 0.6133020 1000 |
| 37 | +log-copper Sph 0.3634211 1000 |
| 38 | +log-zinc.log-lead Sph 0.6367012 1000 |
| 39 | +log-zinc.log-copper Sph 0.4570044 1000 |
| 40 | +log-lead.log-copper Sph 0.3934910 1000 |
| 41 | +~x + y |
| 42 | +> set.seed(13131) |
| 43 | +> summary(gstat.cv(g, remove.all=TRUE, nfold=5)) |
| 44 | +Intrinsic Correlation found. Good. |
| 45 | +[using ordinary cokriging] |
| 46 | +Intrinsic Correlation found. Good. |
| 47 | +[using ordinary cokriging] |
| 48 | +Intrinsic Correlation found. Good. |
| 49 | +[using ordinary cokriging] |
| 50 | +Intrinsic Correlation found. Good. |
| 51 | +[using ordinary cokriging] |
| 52 | +Intrinsic Correlation found. Good. |
| 53 | +[using ordinary cokriging] |
| 54 | + log.zinc.pred log.zinc.var observed residual |
| 55 | + Min. :4.779 Min. :0.05426 Min. :4.727 Min. :-1.317697 |
| 56 | + 1st Qu.:5.396 1st Qu.:0.10872 1st Qu.:5.288 1st Qu.:-0.230224 |
| 57 | + Median :5.858 Median :0.13745 Median :5.787 Median :-0.034374 |
| 58 | + Mean :5.895 Mean :0.15249 Mean :5.886 Mean :-0.009094 |
| 59 | + 3rd Qu.:6.367 3rd Qu.:0.18303 3rd Qu.:6.514 3rd Qu.: 0.244075 |
| 60 | + Max. :7.358 Max. :0.60571 Max. :7.517 Max. : 1.414147 |
| 61 | + zscore fold x y |
| 62 | + Min. :-3.35764 Min. :1.000 Min. :178605 Min. :329714 |
| 63 | + 1st Qu.:-0.58683 1st Qu.:2.000 1st Qu.:179371 1st Qu.:330762 |
| 64 | + Median :-0.10755 Median :3.000 Median :179991 Median :331633 |
| 65 | + Mean :-0.02766 Mean :2.852 Mean :180005 Mean :331635 |
| 66 | + 3rd Qu.: 0.70691 3rd Qu.:4.000 3rd Qu.:180630 3rd Qu.:332463 |
| 67 | + Max. : 3.43370 Max. :5.000 Max. :181390 Max. :333611 |
| 68 | +Warning message: |
| 69 | +In checkNames(value) : |
| 70 | + attempt to set invalid names: this may lead to problems later on. See ?make.names |
| 71 | +> summary(gstat.cv(g, remove.all=FALSE, nfold=5)) |
| 72 | +Intrinsic Correlation found. Good. |
| 73 | +[using ordinary cokriging] |
| 74 | +Intrinsic Correlation found. Good. |
| 75 | +[using ordinary cokriging] |
| 76 | +Intrinsic Correlation found. Good. |
| 77 | +[using ordinary cokriging] |
| 78 | +Intrinsic Correlation found. Good. |
| 79 | +[using ordinary cokriging] |
| 80 | +Intrinsic Correlation found. Good. |
| 81 | +[using ordinary cokriging] |
| 82 | + log.zinc.pred log.zinc.var observed residual |
| 83 | + Min. :4.644 Min. :0.002371 Min. :4.727 Min. :-0.4190976 |
| 84 | + 1st Qu.:5.308 1st Qu.:0.004975 1st Qu.:5.288 1st Qu.:-0.0773273 |
| 85 | + Median :5.777 Median :0.005875 Median :5.787 Median : 0.0006165 |
| 86 | + Mean :5.883 Mean :0.006609 Mean :5.886 Mean : 0.0026164 |
| 87 | + 3rd Qu.:6.422 3rd Qu.:0.007419 3rd Qu.:6.514 3rd Qu.: 0.0825770 |
| 88 | + Max. :7.676 Max. :0.027247 Max. :7.517 Max. : 0.4659503 |
| 89 | + zscore fold x y |
| 90 | + Min. :-4.793253 Min. :1.000 Min. :178605 Min. :329714 |
| 91 | + 1st Qu.:-1.080725 1st Qu.:2.000 1st Qu.:179371 1st Qu.:330762 |
| 92 | + Median : 0.007242 Median :3.000 Median :179991 Median :331633 |
| 93 | + Mean : 0.050487 Mean :2.974 Mean :180005 Mean :331635 |
| 94 | + 3rd Qu.: 1.117469 3rd Qu.:4.000 3rd Qu.:180630 3rd Qu.:332463 |
| 95 | + Max. : 6.475831 Max. :5.000 Max. :181390 Max. :333611 |
| 96 | +Warning message: |
| 97 | +In checkNames(value) : |
| 98 | + attempt to set invalid names: this may lead to problems later on. See ?make.names |
| 99 | +> |
| 100 | +> proc.time() |
| 101 | + user system elapsed |
| 102 | + 1.31 0.09 1.39 |
0 commit comments