condSpVine: Conditions a spatial vine copula for conditional prediction

Description Usage Arguments Value Author(s) See Also Examples

Description

A spatial vine copula is conditioned under the observations of all but one neighbour generating a conditional univariate distribution used for prediction.

Usage

1
condSpVine(condVar, dists, spVine, n = 1000)

Arguments

condVar

the conditional variables

dists

the distances between the neighbours to adjust the spatial vine copula parameters.

spVine

the spatial vine copula

n

a proxy to the number of intervals to be used in the numerical integration. The intervals will not be split uniform with a shorter intervals at the corners of the copula.

Value

A function describing the conditional density.

Author(s)

Benedikt Graeler

See Also

spVineCopula

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
data("spCopDemo")

calcKTauPol <- fitCorFun(bins, degree=3)

spCop <- spCopula(components=list(normalCopula(0.2), tCopula(0.2, dispstr = "un"),
                                  frankCopula(1.2), normalCopula(0.2), claytonCopula(0.2),
                                  claytonCopula(0.2), claytonCopula(0.2), claytonCopula(0.2),
                                  claytonCopula(0.2), indepCopula()),
                  distances=c(0, bins$meanDists[1:9]),
                  spDepFun=calcKTauPol, unit="m")

spVineCop <- spVineCopula(spCop, vineCopula(4L))

dists <- list(c(473, 124, 116, 649))
condVar <- c(0.29, 0.55, 0.05, 0.41)
condDensity <- condSpVine(condVar,dists,spVineCop)

curve(condDensity)
mtext(paste("Dists:",paste(round(dists[[1]],0),collapse=", ")),line=0)
mtext(paste("Cond.:",paste(round(condVar,2),collapse=", ")),line=1)

BenGraeler/spcopula documentation built on Nov. 20, 2020, 4:07 p.m.