sep.cov: Construct time and parameter covariance matrices

Description Usage Arguments Details Value References See Also Examples

Description

Construct time and parameter covariance matrices. The time matrix follows standard AR(1) covariance. The parameter covariance is squared exponential, separable between the parameters, with an extra nugget term. While not directly related to other functions in this package, this function can be re-used if someone wants to build a new/different Gaussian Process emulator code.

Usage

1
sep.cov(Theta.mat, t.vec, rho, kappa, phi.vec, zeta)

Arguments

Theta.mat

Parameter matrix of the ensemble. [row, col] = [run number, parameter number]. See References for more information on this and other arguments.

t.vec

Evenly spaced vector of times for model output (can also be a coordinate vector for a regularly spaced spatial transect)

rho

Lag-1 time autocorrelation parameter ρ

kappa

Parameter covariance scaling factor κ

phi.vec

Vector of range parameters. Must have the same length as number of columns in Theta.mat. All elements should be positive.

zeta

Nugget ζ. Should be positive.

Details

The time covariance is an n*n matrix (where n is the length of time dimension). Its (j,k) element is specified by Σ_t,jk = [ρ^|t_j - t_k|]/(1-ρ^2). The parameter covariance is a p*p matrix (where p is the number of runs in the model ensemble). Specifically, Σ_{θ,ij} = κ*exp(-A) + ζ*1(i=j) where A = sum(k=1:m)([θ_k,i - θ_k,j]^2/[(φ_k)^2]). Here k refers to parameter index. For more details on the time and parameter covariance matrices produced by this function, see References.

Value

List with components

$Sigma.t.mat

Time covariance matrix

$Sigma.theta.mat

Parameter covariance matrix

References

R. Olson and W. Chang (2013): Mathematical framework for a separable Gaussian Process Emulator. Tech. Rep., available from
www.scrimhub.org/resources/stilt/Olson_and_Chang_2013_Stilt_Emulator_Technical_Report.pdf.

See Also

predict.emul

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
# Construct time AR(1) and square exponential separable parameter
# covariance matrix for a simple 1D parameter ensemble output example
data(Data.1D.par)
data(Data.1D.model)

Theta.mat.1D <- t(Data.1D.par$par)
t.vec.1D     <- Data.1D.model$t

# Use lag-1 time autocorrelation of 0.9, nugget and parameter covariance
# scaling factor of 100, and range of 3.
cov <- sep.cov(Theta.mat.1D, t.vec.1D, 0.9, 100, 3, 100)

# Find the covariance between second parameter setting (Theta=1) and
# ninth parameter setting (Theta=8)
cov.2.9 <- cov$Sigma.theta.mat[2,9]
cat("Covariance between Theta=1 and Theta=8 is:", cov.2.9, "\n")

# Plot the time covariance matrix [for fun]
# Note how covariance is high between similar years, but is low for markedly
# different years. Produces a pretty plot.
filled.contour(t.vec.1D, t.vec.1D, cov$Sigma.t.mat, xlab="Year", ylab="Year")

scrim-network/Stilt-Rpkge documentation built on May 29, 2019, 4:07 p.m.