Revision 2b28322cd75357fc6c5547746b38a5c7d71f576a authored by Edzer J. Pebesma on 02 June 2005, 13:54:10 UTC, committed by cran-robot on 02 June 2005, 13:54:10 UTC
1 parent e5a07f3
cv.Rout.save
R : Copyright 2003, The R Development Core Team
Version 1.8.0 (2003-10-08)
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.
> # try bivariate cokriging; cross validate first variable
> library(gstat)
Loading required package: lattice
> data(meuse)
> g=gstat(NULL, "log-zinc", log(zinc)~1, ~x+y, meuse, nmax=10)
> g=gstat(g, "log-lead", log(lead)~1, ~x+y, meuse, nmax=10)
> g=gstat(g, "log-copper", log(copper)~1, ~x+y, meuse, nmax=10)
> v=variogram(g)
> g=gstat(g, model=vgm(1, "Sph", 1000), fill.all=T)
> g=fit.lmc(v, g)
> g
data:
log-zinc : formula = log(zinc)`~`1 ; locations = ~x + y ; data dim = 155 x 14 nmax = 10
log-lead : formula = log(lead)`~`1 ; locations = ~x + y ; data dim = 155 x 14 nmax = 10
log-copper : formula = log(copper)`~`1 ; locations = ~x + y ; data dim = 155 x 14 nmax = 10
variograms:
model psill range
log-zinc Sph 0.7132435 1000
log-lead Sph 0.6133020 1000
log-copper Sph 0.3634211 1000
log-zinc.log-lead Sph 0.6367012 1000
log-zinc.log-copper Sph 0.4570044 1000
log-lead.log-copper Sph 0.3934910 1000
> set.seed(13131)
> summary(gstat.cv(g, remove.all=TRUE, nfold=5))
Intrinsic Correlation found. Good.
[using ordinary cokriging]
Intrinsic Correlation found. Good.
[using ordinary cokriging]
Intrinsic Correlation found. Good.
[using ordinary cokriging]
Intrinsic Correlation found. Good.
[using ordinary cokriging]
Intrinsic Correlation found. Good.
[using ordinary cokriging]
x y log-zinc.pred log-zinc.var
Min. :178605 Min. :329714 Min. :4.840 Min. :0.05409
1st Qu.:179371 1st Qu.:330762 1st Qu.:5.368 1st Qu.:0.10484
Median :179991 Median :331633 Median :5.858 Median :0.13511
Mean :180005 Mean :331635 Mean :5.882 Mean :0.15125
3rd Qu.:180630 3rd Qu.:332463 3rd Qu.:6.353 3rd Qu.:0.16969
Max. :181390 Max. :333611 Max. :7.317 Max. :0.79033
observed residual zscore fold
Min. :4.727 Min. :-1.065578 Min. :-3.008118 Min. :1
1st Qu.:5.288 1st Qu.:-0.217605 1st Qu.:-0.586261 1st Qu.:2
Median :5.787 Median :-0.012082 Median :-0.031313 Median :3
Mean :5.886 Mean : 0.003732 Mean : 0.008212 Mean :3
3rd Qu.:6.514 3rd Qu.: 0.218088 3rd Qu.: 0.632272 3rd Qu.:4
Max. :7.517 Max. : 1.353119 Max. : 3.279924 Max. :5
> summary(gstat.cv(g, remove.all=FALSE, nfold=5))
Intrinsic Correlation found. Good.
[using ordinary cokriging]
Intrinsic Correlation found. Good.
[using ordinary cokriging]
Intrinsic Correlation found. Good.
[using ordinary cokriging]
Intrinsic Correlation found. Good.
[using ordinary cokriging]
Intrinsic Correlation found. Good.
[using ordinary cokriging]
x y log-zinc.pred log-zinc.var
Min. :178605 Min. :329714 Min. :4.632 Min. :0.002590
1st Qu.:179371 1st Qu.:330762 1st Qu.:5.293 1st Qu.:0.005023
Median :179991 Median :331633 Median :5.767 Median :0.006181
Mean :180005 Mean :331635 Mean :5.893 Mean :0.006597
3rd Qu.:180630 3rd Qu.:332463 3rd Qu.:6.426 3rd Qu.:0.007500
Max. :181390 Max. :333611 Max. :7.674 Max. :0.027236
observed residual zscore fold
Min. :4.727 Min. :-0.513948 Min. :-5.45652 Min. :1.000
1st Qu.:5.288 1st Qu.:-0.074101 1st Qu.:-1.05557 1st Qu.:2.000
Median :5.787 Median : 0.010331 Median : 0.11046 Median :3.000
Mean :5.886 Mean :-0.007157 Mean :-0.07335 Mean :2.968
3rd Qu.:6.514 3rd Qu.: 0.070512 3rd Qu.: 0.86810 3rd Qu.:4.000
Max. :7.517 Max. : 0.506778 Max. : 7.37567 Max. :5.000
>
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...