cope {cope} | R Documentation |
Coverage Probability Excursion (CoPE) Sets
Description
The package cope computes and plots CoPE sets defined in Sommerfeld, Sain and
Schwartzman (2015) for 2D functions. CoPE sets for
a real-valued target function \mu(s)
on a two-dimensional domain
are designed to bound the excursion set
{\mu(s) >= c}
from above and below with a predefined probability.
The target
function can be a parameter in spatially
indexed linear regression Y(s)=X*b(s)+ \epsilon(s)
, where s
is the spatial location, X
is a known n
by p
design matrix,
\epsilon(s)
is an error field and Y(s)
is the observed data.
Major functions
ComputeCope
Computes CoPE sets for 2D data.PlotCope
Plots CoPE sets.
Toy example functions
ToySignal
Generates a toy signal.ToyNoise1
,ToyNoise2
,ToyNoise3
Generates realizations of toy noise fields.
References
M. Sommerfeld, S. Sain and A. Schwartzman. Confidence regions for excursion sets in asymptotically Gaussian random fields, with an application to climate. Preprint, 2015.
Examples
# An example using the ToySignal and the Toy Noise1 of this package.
# Set sample size.
n = 30
# Generate n realizations of the toy noise field.
Data = ToyNoise1(n = n)
# Add the toy signal to the noise.
Data$z = Data$z + rep(ToySignal()$z, n)
# Compute the CoPE sets.
CopeSet = ComputeCope(Data,level=4/3, mu=ToySignal()$z)
# Plot the result.
PlotCope(CopeSet)