Description Usage Arguments Value Author(s) See Also Examples
This function works through a set of copula families and evaluates the best fitting one for each spatio-temporal lag.
1 2 3 4 5 6 | loglikByCopulasStLags(stBins, data, families = c(normalCopula(),
tCopula(),
claytonCopula(),
frankCopula(),
gumbelCopula()),
calcCor, lagSub = 1:length(stBins$meanDists))
|
stBins |
a spatio-temporal bining typically prodsuced with |
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 |
lagSub |
A set of indices indicating which of the bins to use. |
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.
Benedikt Graeler
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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.