loglikByCopulasStLags: Log-likelihoods by copula family and spatio-temporal lag...

Description Usage Arguments Value Author(s) See Also Examples

Description

This function works through a set of copula families and evaluates the best fitting one for each spatio-temporal lag.

Usage

1
2
3
4
5
6
loglikByCopulasStLags(stBins, data, families = c(normalCopula(),
                                             tCopula(),
                                             claytonCopula(),
                                             frankCopula(),
                                             gumbelCopula()),
                      calcCor, lagSub = 1:length(stBins$meanDists))

Arguments

stBins

a spatio-temporal bining typically prodsuced with calcBins.

data

the spatial data set used to derive the bins from for data retrieval.

families

A vector of representatives of the bivariate copula families that should be investigated.

calcCor

a two place function tuning the copulas' parameters. Typically, the output of the fitCorFun function. Its either based on Kendall's tau, Spearman's rho or the identity. This parameter might be "missing" for static convex spatial copulas.

lagSub

A set of indices indicating which of the bins to use.

Value

A list containing the result of loglikByCopulasLags per temporal lag: i.e. a list containing a matrix (loglik) of spatial lags (rows) and copula family names (columns) holding the calculated log-likelihood value and a list of the corresponding copula fits.

Author(s)

Benedikt Graeler

See Also

calcBins, loglikByCopulasLags

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# the spatial case
# load spatial data
library("sp")
data("meuse")
coordinates(meuse) <- ~x+y

# drop margins
meuse$marZinc <- plnorm(meuse$zinc, mean(log(meuse$zinc)), sd(log(meuse$zinc)))

# load parts of the workspace from demo(spCopula)
data("spCopDemo") 

calcKTauPol <- fitCorFun(bins, degree=3)

loglikTau <- loglikByCopulasLags(bins, meuse, calcCor=calcKTauPol)
loglikTau$loglik

spcopula documentation built on May 2, 2019, 4:49 p.m.