-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathpredictSE.Krig.html
More file actions
164 lines (129 loc) · 5.5 KB
/
Copy pathpredictSE.Krig.html
File metadata and controls
164 lines (129 loc) · 5.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Standard errors of predictions for Krig spatial process...</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="R.css" />
</head><body>
<table width="100%" summary="page for predictSE {fields}"><tr><td>predictSE {fields}</td><td style="text-align: right;">R Documentation</td></tr></table>
<h2>
Standard errors of predictions for Krig spatial process estimate
</h2>
<h3>Description</h3>
<p>Finds the standard error ( or covariance) of prediction based on a linear
combination of
the observed data. The linear combination is usually the "Best Linear
Unbiased Estimate" (BLUE) found from the Kriging equations.
This statistical computation is done under the assumption that the
covariance function is known.
</p>
<h3>Usage</h3>
<pre>
predictSE(object, ...)
## S3 method for class 'Krig'
predictSE(object, x = NULL, cov = FALSE, verbose = FALSE,...)
## S3 method for class 'mKrig'
predictSE(object, xnew = NULL, Z = NULL, verbose = FALSE, drop.Z
= FALSE, ...)
</pre>
<h3>Arguments</h3>
<table summary="R argblock">
<tr valign="top"><td><code>drop.Z</code></td>
<td>
<p>If FALSE find standard error without including the additional spatial covariates
described by <code>Z</code>. If TRUE find full standard error with spatial covariates if they are part of the model.</p>
</td></tr>
<tr valign="top"><td><code>object</code></td>
<td>
<p> A fitted object that can be used to find prediction standard errors. This is usually from fitting a spatial model to data. e.g. a Krig or mKrig object.
</p>
</td></tr>
<tr valign="top"><td><code>xnew</code></td>
<td>
<p>Points to compute the predict standard error or the prediction
cross covariance matrix.
</p>
</td></tr>
<tr valign="top"><td><code>x</code></td>
<td>
<p>Same as <code>xnew</code> – points to compute the predict standard error or the prediction
cross covariance matrix.
</p>
</td></tr>
<tr valign="top"><td><code>cov</code></td>
<td>
<p>If TRUE the full covariance matrix for the predicted values is returned.
Make sure this will not be big if this option is used. ( e.g. 50X50 grid
will return a matrix that is 2500X2500!) If FALSE just the marginal
standard deviations of the predicted values are returned. Default is
FALSE – of course.
</p>
</td></tr>
<tr valign="top"><td><code>verbose</code></td>
<td>
<p>If TRUE will print out various information for debugging.</p>
</td></tr>
<tr valign="top"><td><code>...</code></td>
<td>
<p>These additional arguments passed to the predictSE function.
</p>
</td></tr>
<tr valign="top"><td><code>Z</code></td>
<td>
<p>Additional matrix of spatial covariates used for prediction. These are used to
determine the additional covariance contributed in teh fixed part of the model.</p>
</td></tr>
</table>
<h3>Details</h3>
<p>The predictions are represented as a linear combination of the dependent
variable, Y. Call this LY. Based on this representation the conditional
variance is the same as the expected value of (P(x) + Z(X) - LY)**2.
where
P(x)+Z(x) is the value of the surface at x and LY is the linear
combination that estimates this point. Finding this expected value is
straight forward given the unbiasedness of LY for P(x) and the covariance
for Z and Y.
</p>
<p>In these calculations it is assumed that the covariance parameters are fixed.
This is an approximation since in most cases they have been estimated from the
data. It should also be noted that if one assumes a Gaussian field and known
parameters in the covariance, the usual Kriging estimate is the
conditional mean of the field given the data. This function finds the
conditional standard deviations (or full covariance matrix) of the
fields given the data.
</p>
<p>There are two useful extensions supported by this function. Adding the
variance to the estimate of the spatial mean if this is a correlation
model. (See help file for Krig) and calculating the variances under
covariance misspecification. The function <code>predictSE.KrigA</code> uses
the smoother matrix ( A(lambda) ) to find the standard errors or
covariances directly from the linear combination of the spatial
predictor. Currently this is also the calculation in
<code>predictSE.Krig</code> although a shortcut is used
<code>predictSE.mKrig</code> for mKrig objects.
</p>
<h3>Value</h3>
<p>A vector of standard errors for the predicted values of the Kriging fit.
</p>
<h3>See Also</h3>
<p>Krig, predict.Krig, predictSurfaceSE
</p>
<h3>Examples</h3>
<pre>
#
# Note: in these examples predictSE will default to predictSE.Krig using
# a Krig object
fit<- Krig(ChicagoO3$x,ChicagoO3$y,cov.function="Exp.cov", theta=10) # Krig fit
predictSE.Krig(fit) # std errors of predictions at obs.
# make a grid of X's
xg<-make.surface.grid(
list(East.West=seq(-27,34,,20),North.South=seq(-20,35,,20)))
out<- predictSE(fit,xg) # std errors of predictions
#at the grid points out is a vector of length 400
#reshape the grid points into a 20X20 matrix etc.
out.p<-as.surface( xg, out)
surface( out.p, type="C")
# this is equivalent to the single step function
# (but default is not to extrapolation beyond data
# out<- predictSurfaceSE( fit)
# image.plot( out)
</pre>
<hr /><div style="text-align: center;">[Package <em>fields</em> version 9.9 <a href="00Index.html">Index</a>]</div>
</body></html>