[spcopula-commits] r129 - / pkg/R pkg/man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Mar 17 14:57:06 CET 2014
Author: ben_graeler
Date: 2014-03-17 14:57:05 +0100 (Mon, 17 Mar 2014)
New Revision: 129
Added:
pkg/man/loglikByCopulasStLags.Rd
Modified:
/
pkg/R/utilities.R
Log:
- new function loglikByCopulasStLags
Property changes on:
___________________________________________________________________
Modified: svn:ignore
- .Rd2pdf6724
.Rhistory
.Rproj.user
Meuse_spcopula_estimation.R
pkg.Rcheck
pkg.pdf
spcopula.Rcheck
spcopula.Rproj
+ .Rd2pdf6724
.Rhistory
.Rproj.user
Meuse_spcopula_estimation.R
pkg.Rcheck
pkg.pdf
spcopula.Rcheck
spcopula.Rproj
spCopDemo_old_Mar_2013.RData
.RData
inst
Modified: pkg/R/utilities.R
===================================================================
--- pkg/R/utilities.R 2014-02-21 14:27:50 UTC (rev 128)
+++ pkg/R/utilities.R 2014-03-17 13:57:05 UTC (rev 129)
@@ -18,7 +18,7 @@
##
dependencePlot <- function(var=NULL, smpl, bandwidth=0.075,
- main="Stength of dependece",
+ main="Stength of dependence",
transformation=function (x) x, ...) {
if(is.null(var)) {
if (ncol(smpl)>2) {
Added: pkg/man/loglikByCopulasStLags.Rd
===================================================================
--- pkg/man/loglikByCopulasStLags.Rd (rev 0)
+++ pkg/man/loglikByCopulasStLags.Rd 2014-03-17 13:57:05 UTC (rev 129)
@@ -0,0 +1,48 @@
+\name{loglikByCopulasStLags}
+\alias{loglikByCopulasStLags}
+
+\title{Log-likelihoods by copula family and spatio-temporal lag class}
+
+\description{This function works through a set of copula family and evaluates the best fitting one for each spatiao-temporal lag.}
+
+\usage{
+loglikByCopulasStLags(stBins, data, families = c(normalCopula(),
+ tCopula(),
+ claytonCopula(),
+ frankCopula(),
+ gumbelCopula()),
+ calcCor, lagSub = 1:length(stBins$meanDists))
+}
+
+\arguments{
+ \item{stBins}{a spatio-temporal bining typically prodsuced with \code{\link{calcBins}}.}
+ \item{data}{the spatial data set used to derive the bins from for data retrieval.}
+ \item{families}{A vector of representatives of the bivariate copula families that should be investigated.}
+ \item{calcCor}{a two place function tuning the copulas' parameters. Typically, the output of the \code{\link{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.}
+ \item{lagSub}{A set of indices indicating which of the bins to use.}
+}
+
+\value{A list containing the result of \code{\link{loglikByCopulasLags}} per temporal lag: i.e. a list containing a matrix (\code{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{Benedikt Graeler}
+
+\seealso{\code{\link{calcBins}}, \code{\link{loglikByCopulasLags}}}
+
+\examples{
+# 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
+}
More information about the spcopula-commits
mailing list