-
Notifications
You must be signed in to change notification settings - Fork 8
/
CovarianceUpper.html
89 lines (60 loc) · 2.09 KB
/
CovarianceUpper.html
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
<!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: Evaluate covariance over upper triangle of distance matrix</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 CovarianceUpper {fields}"><tr><td>CovarianceUpper {fields}</td><td style="text-align: right;">R Documentation</td></tr></table>
<h2>
Evaluate covariance over upper triangle of distance matrix
</h2>
<h3>Description</h3>
<p>Evaluates the covariance over the upper triangle of a distance matrix
rather than over the entire matrix to reduce computation time. Note
that the <code>chol</code> function only requires the upper triangle of
the covariance matrix to perform the Cholesky decomposition.
</p>
<h3>Usage</h3>
<pre>
ExponentialUpper(distMat, range = 1, alpha = 1/range)
</pre>
<h3>Arguments</h3>
<table summary="R argblock">
<tr valign="top"><td><code>distMat</code></td>
<td>
<p>The distance matrix to evaluate the covariance over.
</p>
</td></tr>
<tr valign="top"><td><code>range</code></td>
<td>
<p>Range parameter default is one. Note that the scale can also
be specified through the "theta" scaling argument used in
fields covariance functions)
</p>
</td></tr>
<tr valign="top"><td><code>alpha</code></td>
<td>
<p>1/range
</p>
</td></tr>
</table>
<h3>Value</h3>
<p>The covariance matrix, where only the upper triangle is calculated.
</p>
<h3>Author(s)</h3>
<p>John Paige
</p>
<h3>See Also</h3>
<p><code><a href="Exponential.html">Exponential</a></code>
</p>
<h3>Examples</h3>
<pre>
set.seed(123)
#make distance matrix using the random locations
coords = matrix(runif(10), ncol=2)
distMat = rdist(coords)
#compute covariance matrix, but only over the upper triangle
upperCov = ExponentialUpper(distMat, range=.1)
print(distMat)
print(upperCov)
</pre>
<hr /><div style="text-align: center;">[Package <em>fields</em> version 9.9 <a href="00Index.html">Index</a>]</div>
</body></html>