[Vinecopula-commits] r83 - in pkg: . R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Di Feb 24 13:00:28 CET 2015
Author: tnagler
Date: 2015-02-24 13:00:28 +0100 (Tue, 24 Feb 2015)
New Revision: 83
Added:
pkg/man/RVinePDF.Rd
Modified:
pkg/DESCRIPTION
pkg/NAMESPACE
pkg/R/BiCopSelect.r
pkg/R/RVineCopSelect.r
pkg/R/RVineLogLik.r
pkg/R/RVineMatrix.R
pkg/R/RVineStructureSelect.r
pkg/man/BiCopSelect.Rd
pkg/man/RVineCopSelect.Rd
pkg/man/RVineMatrix.Rd
pkg/man/RVineStructureSelect.Rd
Log:
- Update version to 1.5
- add function RVinePDF
- BiCopSelect, RVineCopSelect, RVineStructureSelect: add option "rotations = TRUE" which augments the familyset with all rotations to a given family
- RVineMatrix, RVineStructureSelect: allow upper triagonal matrices as input (output remains lower triagonal)
- addapt manual files and NAMESPACE to changes
Modified: pkg/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION 2015-02-20 13:51:01 UTC (rev 82)
+++ pkg/DESCRIPTION 2015-02-24 12:00:28 UTC (rev 83)
@@ -1,7 +1,7 @@
Package: VineCopula
Type: Package
Title: Statistical Inference of Vine Copulas
-Version: 1.4
+Version: 1.5
Date: 2015-01-26
Author: Ulf Schepsmeier, Jakob Stoeber, Eike Christian Brechmann, Benedikt Graeler
Maintainer: Tobias Erhardt <tobias.erhardt at tum.de>
Modified: pkg/NAMESPACE
===================================================================
--- pkg/NAMESPACE 2015-02-20 13:51:01 UTC (rev 82)
+++ pkg/NAMESPACE 2015-02-24 12:00:28 UTC (rev 83)
@@ -31,6 +31,7 @@
export(BiCopGofTest)
export(RVineLogLik)
+export(RVinePDF)
export(RVineAIC)
export(RVineBIC)
export(RVineMatrix)
Modified: pkg/R/BiCopSelect.r
===================================================================
--- pkg/R/BiCopSelect.r 2015-02-20 13:51:01 UTC (rev 82)
+++ pkg/R/BiCopSelect.r 2015-02-24 12:00:28 UTC (rev 83)
@@ -1,4 +1,6 @@
-BiCopSelect <- function(u1, u2, familyset = NA, selectioncrit = "AIC", indeptest = FALSE, level = 0.05, weights = NA) {
+BiCopSelect <- function(u1, u2, familyset = NA, selectioncrit = "AIC", indeptest = FALSE, level = 0.05, weights = NA, rotations = TRUE) {
+
+ ## sanity checks
if (is.null(u1) == TRUE || is.null(u2) == TRUE)
stop("u1 and/or u2 are not set or have length zero.")
if (length(u1) != length(u2))
@@ -23,10 +25,15 @@
if (level < 0 & level > 1)
stop("Significance level has to be between 0 and 1.")
+ ## prepare objects
out <- list()
data1 <- u1
data2 <- u2
+ ## adjust familyset if rotations = TRUE
+ if (rotations) familyset <- with_rotations(familyset)
+
+
if (!is.na(familyset[1]) & any(familyset == 0)) {
# select independence if allowed
out$p.value.indeptest <- NA
@@ -465,3 +472,28 @@
out$par <- out$par[1]
out
}
+
+
+##### ----------------------------------------------------------------------
+## function for augmenting a familyset with rotations
+with_rotations <- function(nums) {
+ unique(unlist(lapply(nums, get_rotations)))
+}
+
+get_rotations <- function(i) {
+ # no roations for independence, gaussian, student and frank copulas
+ out <- i
+
+ ## rotations for other families
+ if(i %in% c(3, 13, 23, 33)) out <- c(3, 13, 23, 33)
+ if(i %in% c(4, 14, 24, 34)) out <- c(4, 14, 24, 34)
+ if(i %in% c(6, 16, 26, 36)) out <- c(6, 16, 26, 36)
+ if(i %in% c(7, 17, 27, 37)) out <- c(7, 17, 27, 37)
+ if(i %in% c(8, 18, 28, 38)) out <- c(8, 18, 28, 38)
+ if(i %in% c(9, 19, 29, 39)) out <- c(9, 19, 29, 39)
+ if(i %in% c(10, 20, 30, 40)) out <- c(10, 20, 30, 40)
+ if(i %in% c(104, 114, 124, 134)) out <- c(104, 114, 124, 134)
+ if(i %in% c(204, 214, 224, 234)) out <- c(204, 214, 224, 234)
+
+ out
+}
Modified: pkg/R/RVineCopSelect.r
===================================================================
--- pkg/R/RVineCopSelect.r 2015-02-20 13:51:01 UTC (rev 82)
+++ pkg/R/RVineCopSelect.r 2015-02-24 12:00:28 UTC (rev 83)
@@ -1,5 +1,5 @@
-RVineCopSelect <- function(data, familyset = NA, Matrix, selectioncrit = "AIC", indeptest = FALSE, level = 0.05, trunclevel = NA) {
- n <- dim(data)[2]
+RVineCopSelect <- function(data, familyset = NA, Matrix, selectioncrit = "AIC", indeptest = FALSE, level = 0.05, trunclevel = NA, rotations = TRUE) {
+ n <- ncol(data)
N <- nrow(data)
## sanity checks
@@ -22,15 +22,16 @@
stop("Selection criterion not implemented.")
if (level < 0 & level > 1)
stop("Significance level has to be between 0 and 1.")
-
- ## adjustement for truncated vines
if (is.na(trunclevel))
trunclevel <- n
+
+ ## adjust familyset
types <- familyset
if (trunclevel == 0)
types <- 0
## reorder matrix to natural order
+ Matrix <- ToLowerTri(Matrix)
M <- Matrix
Mold <- M
o <- diag(M)
@@ -65,10 +66,24 @@
## estimate pair-copula
if (n + 1 - k > trunclevel) {
- outcop <- BiCopSelect(zr2, zr1, 0, selectioncrit, indeptest, level)
+ outcop <- BiCopSelect(zr2,
+ zr1,
+ 0,
+ selectioncrit,
+ indeptest,
+ level,
+ weights = NA,
+ rotations)
} else {
# outcop = BiCopSelect(zr1,zr2,types,selectioncrit,indeptest,level)
- outcop <- BiCopSelect(zr2, zr1, types[1:3], selectioncrit, indeptest, level)
+ outcop <- BiCopSelect(zr2,
+ zr1,
+ types,
+ selectioncrit,
+ indeptest,
+ level,
+ weights = NA,
+ rotations)
}
## store results for pair-copula
Modified: pkg/R/RVineLogLik.r
===================================================================
--- pkg/R/RVineLogLik.r 2015-02-20 13:51:01 UTC (rev 82)
+++ pkg/R/RVineLogLik.r 2015-02-24 12:00:28 UTC (rev 83)
@@ -107,3 +107,8 @@
return(list(loglik = loglik, V = V))
}
+
+
+RVinePDF <- function(newdata, RVM) {
+ exp(RVineLogLik(newdata, RVM, separate = TRUE)$loglik)
+}
\ No newline at end of file
Modified: pkg/R/RVineMatrix.R
===================================================================
--- pkg/R/RVineMatrix.R 2015-02-20 13:51:01 UTC (rev 82)
+++ pkg/R/RVineMatrix.R 2015-02-24 12:00:28 UTC (rev 83)
@@ -1,11 +1,20 @@
RVineMatrix <- function(Matrix, family = array(0, dim = dim(Matrix)), par = array(NA, dim = dim(Matrix)), par2 = array(NA, dim = dim(Matrix)), names = NULL) {
+ ## set NAs to zero
Matrix[is.na(Matrix)] <- 0
family[is.na(family)] <- 0
+ par[is.na(par)] <- 0
+ par2[is.na(par2)] <- 0
+
+ ## convert to lower triangular matrix if necessary
+ Matrix <- ToLowerTri(Matrix)
+ family <- ToLowerTri(family)
+ par <- ToLowerTri(par)
+ par2 <- ToLowerTri(par2)
+
+ ## set upper triangle to zero
family[upper.tri(family, diag = T)] <- 0
- par[is.na(par)] <- 0
par[upper.tri(par, diag = T)] <- 0
- par2[is.na(par2)] <- 0
par2[upper.tri(par2, diag = T)] <- 0
if (dim(Matrix)[1] != dim(Matrix)[2])
@@ -554,3 +563,23 @@
if (is.matrix(b))
return(1) else return(-1)
}
+
+#### -------------------------------------------------------------
+## function that converts upper triagonal matrix to lower triagonal
+ToLowerTri <- function(x) {
+ ## only change matrix if not already lower triagonal
+ if(all(x[lower.tri(x)] == 0)) {
+ x[nrow(x):1, ncol(x):1]
+ } else {
+ x
+ }
+}
+
+ToUpperTri <- function(x) {
+ ## only change matrix if not already upper triagonal
+ if(all(x[upper.tri(x)] == 0)) {
+ x[nrow(x):1, ncol(x):1]
+ } else {
+ x
+ }
+}
Modified: pkg/R/RVineStructureSelect.r
===================================================================
--- pkg/R/RVineStructureSelect.r 2015-02-20 13:51:01 UTC (rev 82)
+++ pkg/R/RVineStructureSelect.r 2015-02-24 12:00:28 UTC (rev 83)
@@ -1,46 +1,53 @@
RVineStructureSelect <- function(data, familyset = NA, type = 0, selectioncrit = "AIC", indeptest = FALSE,
- level = 0.05, trunclevel = NA, progress = FALSE, weights = NA) {
+ level = 0.05, trunclevel = NA, progress = FALSE, weights = NA, rotations = TRUE) {
+ d <- n <- dim(data)[2]
+ N <- dim(data)[1]
+ ## sanity checks
if (type == 0)
type <- "RVine" else if (type == 1)
type <- "CVine"
if (type != "RVine" & type != "CVine")
stop("Vine model not implemented.")
-
- d <- n <- dim(data)[2]
- N <- dim(data)[1]
-
if (N < 2)
stop("Number of observations has to be at least 2.")
if (d < 3)
stop("Dimension has to be at least 3.")
if (any(data > 1) || any(data < 0))
stop("Data has to be in the interval [0,1].")
-
- if (!is.na(familyset[1]))
- for (i in 1:length(familyset)) if (!(familyset[i] %in% c(0, 1:10, 13, 14, 16:20,
- 23, 24, 26:30, 33, 34, 36:40,
- 104, 114, 124, 134,
- 204, 214, 224, 234)))
- stop("Copula family not implemented.")
+ if (!is.na(familyset[1])) {
+ for (i in 1:length(familyset)) {
+ if (!(familyset[i] %in% c(0, 1:10, 13, 14, 16:20,
+ 23, 24, 26:30, 33, 34, 36:40,
+ 104, 114, 124, 134, 204, 214, 224, 234)))
+ stop("Copula family not implemented.")
+ }
+ }
if (selectioncrit != "AIC" && selectioncrit != "BIC")
stop("Selection criterion not implemented.")
if (level < 0 & level > 1)
stop("Significance level has to be between 0 and 1.")
+ ## set variable names and trunclevel if not provided
if (is.null(colnames(data)))
colnames(data) <- paste("V", 1:n, sep = "")
-
if (is.na(trunclevel))
trunclevel <- d
- RVine <- list(Tree = NULL, Graph = NULL)
-
+ ## adjust familyset
if (trunclevel == 0)
familyset <- 0
+ if (rotations)
+ familyset <- with_rotations(familyset)
+ ## initialize object for results
+ RVine <- list(Tree = NULL, Graph = NULL)
+
+ ## estimation in first tree ----------------------------
+ # find optimal tree
g <- initializeFirstGraph(data, weights)
- mst <- findMaximumTauTree(g, mode = type)
+ mst <- findMaximumTauTree(g, mode = type)
+ # estimate pair-copulas
VineTree <- fit.FirstTreeCopulas(mst,
data,
familyset,
@@ -48,20 +55,20 @@
indeptest,
level,
weights = weights)
-
+ # store results
RVine$Tree[[1]] <- VineTree
RVine$Graph[[1]] <- g
oldVineGraph <- VineTree
-
+ ## estimation in higher trees --------------------------
for (i in 2:(n - 1)) {
-
+ # only estimate pair-copulas if not truncated
if (trunclevel == i - 1)
familyset <- 0
-
+ # find optimal tree
g <- buildNextGraph(VineTree, weights)
- mst <- findMaximumTauTree(g, mode = type)
-
+ mst <- findMaximumTauTree(g, mode = type)
+ # estimate pair-copulas
VineTree <- fit.TreeCopulas(mst,
VineTree,
familyset,
@@ -70,12 +77,13 @@
level,
progress,
weights = weights)
-
+ # store results
RVine$Tree[[i]] <- VineTree
RVine$Graph[[i]] <- g
}
- return(as.RVM(RVine))
+ ## return results as 'RVineMatrix' object
+ as.RVM(RVine)
}
initializeFirstGraph <- function(data.univ, weights) {
@@ -179,11 +187,11 @@
if (is.null(V(mst)[a[1]]$name) || is.null(V(mst)[a[2]]$name)) {
E(mst)[i]$Copula.Name <- paste(a[1], a[2], sep = " , ")
- } else {
- E(mst)[i]$Copula.Name <- paste(V(mst)[a[1]]$name,
- V(mst)[a[2]]$name,
- sep = " , ")
- }
+ } else {
+ E(mst)[i]$Copula.Name <- paste(V(mst)[a[1]]$name,
+ V(mst)[a[2]]$name,
+ sep = " , ")
+ }
}
outForACopula <- lapply(X = parameterForACopula,
@@ -451,7 +459,13 @@
fit.ACopula <- function(u1, u2, familyset = NA, selectioncrit = "AIC", indeptest = FALSE, level = 0.05, weights = NA) {
## select family and estimate parameter(s) for the pair copula
- out <- BiCopSelect(u1, u2, familyset, selectioncrit, indeptest, level, weights = weights)
+ out <- BiCopSelect(u1, u2,
+ familyset,
+ selectioncrit,
+ indeptest,
+ level,
+ weights = weights,
+ rotations = FALSE)
## change rotation if family is not symmetric wrt the main diagonal
if (out$family %in% c(23, 24, 26:30, 124, 224)) {
Modified: pkg/man/BiCopSelect.Rd
===================================================================
--- pkg/man/BiCopSelect.Rd 2015-02-20 13:51:01 UTC (rev 82)
+++ pkg/man/BiCopSelect.Rd 2015-02-24 12:00:28 UTC (rev 83)
@@ -10,8 +10,8 @@
}
\usage{
-BiCopSelect(u1, u2, familyset = NA, selectioncrit = "AIC",
- indeptest = FALSE, level = 0.05, weights = NA)
+BiCopSelect(u1, u2, familyset = NA, selectioncrit = "AIC", indeptest = FALSE,
+ level = 0.05, weights = NA, rotations = TRUE)
}
\arguments{
@@ -67,6 +67,7 @@
The independence copula is chosen if the null hypothesis of independence cannot be rejected.}
\item{level}{Numeric; significance level of the independence test (default: \code{level = 0.05}).}
\item{weights}{Numerical; weights for each observation (optional).}
+ \item{rotations}{If \code{TRUE}, all rotations of the families in \code{familyset} are included.}
}
\value{
Modified: pkg/man/RVineCopSelect.Rd
===================================================================
--- pkg/man/RVineCopSelect.Rd 2015-02-20 13:51:01 UTC (rev 82)
+++ pkg/man/RVineCopSelect.Rd 2015-02-24 12:00:28 UTC (rev 83)
@@ -9,8 +9,8 @@
}
\usage{
-RVineCopSelect(data, familyset = NA, Matrix, selectioncrit = "AIC",
- indeptest = FALSE, level = 0.05, trunclevel = NA)
+RVineCopSelect(data, familyset = NA, Matrix, selectioncrit = "AIC", indeptest = FALSE,
+ level = 0.05, trunclevel = NA, rotations = TRUE)
}
\arguments{
@@ -19,13 +19,14 @@
The vector has to include at least one pair-copula family that allows for positive and one that allows for negative dependence. Not listed copula families might be included to better handle limit cases.
If \code{familyset = NA} (default), selection among all possible families is performed.
The coding of pair-copula families is shown below.}
- \item{Matrix}{Lower triangular d x d matrix that defines the R-vine tree structure.}
+ \item{Matrix}{Lower or upper triangular d x d matrix that defines the R-vine tree structure.}
\item{selectioncrit}{Character indicating the criterion for pair-copula selection. Possible choices: \code{selectioncrit = "AIC"} (default) or \code{"BIC"} (see \code{\link{BiCopSelect}}).}
\item{indeptest}{Logical; whether a hypothesis test for the independence of \code{u1} and \code{u2} is performed before bivariate copula selection
(default: \code{indeptest = FALSE}; see \code{\link{BiCopIndTest}}).
The independence copula is chosen for a (conditional) pair if the null hypothesis of independence cannot be rejected.}
\item{level}{Numeric; significance level of the independence test (default: \code{level = 0.05}).}
\item{trunclevel}{Integer; level of truncation.}
+ \item{rotations}{If \code{TRUE}, all rotations of the families in \code{familyset} are included.}
}
\details{
@@ -134,5 +135,6 @@
# determine the pair-copula families and parameters
RVM1 <- RVineCopSelect(simdata, familyset = c(1, 3, 4, 5 ,6), Matrix)
+
}
Modified: pkg/man/RVineMatrix.Rd
===================================================================
--- pkg/man/RVineMatrix.Rd 2015-02-20 13:51:01 UTC (rev 82)
+++ pkg/man/RVineMatrix.Rd 2015-02-24 12:00:28 UTC (rev 83)
@@ -16,8 +16,8 @@
}
\arguments{
- \item{Matrix}{Lower triangular d x d matrix that defines the R-vine tree structure.}
- \item{family}{Lower triangular d x d matrix with zero diagonal entries that assigns the pair-copula families
+ \item{Matrix}{Lower (or upper) triangular d x d matrix that defines the R-vine tree structure.}
+ \item{family}{Lower (or upper) triangular d x d matrix with zero diagonal entries that assigns the pair-copula families
to each (conditional) pair defined by \code{Matrix} (default: \code{family = array(0,dim=dim(Matrix))}).
The bivariate copula families are defined as follows:\cr
\code{0} = independence copula \cr
@@ -61,10 +61,10 @@
\code{224} = rotated Tawn type 2 copula (90 degrees) \cr
\code{234} = rotated Tawn type 2 copula (270 degrees) \cr
}
- \item{par}{Lower triangular d x d matrix with zero diagonal entries that assigns the (first) pair-copula parameter
+ \item{par}{Lower (or upper) triangular d x d matrix with zero diagonal entries that assigns the (first) pair-copula parameter
to each (conditional) pair defined by \code{Matrix} \cr
(default: \code{par = array(NA, dim = dim(Matrix))}).}
- \item{par2}{Lower triangular d x d matrix with zero diagonal entries that assigns the second parameter
+ \item{par2}{Lower (or upper) triangular d x d matrix with zero diagonal entries that assigns the second parameter
for pair-copula families with two parameters to each (conditional) pair defined by \code{Matrix} (default: \code{par2 = array(NA, dim = dim(Matrix))}).}
\item{names}{A vector of names for the d variables; default: \code{names = NULL}.}
}
@@ -80,7 +80,8 @@
\note{
The \code{print} function writes the R-vine matrix defined by \code{Matrix}. A detailed output is given by \code{print(RVM, detail=TRUE)},
where \code{RVM} is the \code{\link{RVineMatrix}} object. \cr
-The \code{\link{RVineMatrix}} function automatically checks if the given matrix is a valid R-vine matrix (see \code{\link{RVineMatrixCheck}}).
+The \code{\link{RVineMatrix}} function automatically checks if the given matrix is a valid R-vine matrix (see \code{\link{RVineMatrixCheck}}). \cr
+Although the function allows upper triangular matrices as its input, it will always store them as lower triangular matrices.
}
\references{
Added: pkg/man/RVinePDF.Rd
===================================================================
--- pkg/man/RVinePDF.Rd (rev 0)
+++ pkg/man/RVinePDF.Rd 2015-02-24 12:00:28 UTC (rev 83)
@@ -0,0 +1,91 @@
+\name{RVinePDF}
+\alias{RVinePDF}
+
+\title{PDF of an R-Vine Copula Model}
+
+\description{
+This function calculates the probability density function of a d-dimensional R-vine copula.
+}
+
+\usage{
+RVinePDF(newdata, RVM)
+}
+
+\arguments{
+ \item{newdata}{An N x d data matrix that specifies where the density shall be evaluated.}
+ \item{RVM}{An \code{\link{RVineMatrix}} object including the structure and the pair-copula families and parameters.}
+}
+
+
+\details{
+The density of a \eqn{d}-dimensional R-vine copula with \eqn{d-1} trees and corresponding edge sets \eqn{E_1,...,E_{d-1}} is given by
+\deqn{
+\prod_{\ell=1}^{d-1} \prod_{e\in E_\ell}
+c_{j(e),k(e)|D(e)}\left(F(u_{j(e)}|\boldsymbol{u}_{D(e)}),F(u_{k(e)}|\boldsymbol{u}_{D(e)})|\boldsymbol{\theta}_{j(e),k(e)|D(e)}\right),
+}{
+=\prod_{k=1}^{d-1} \prod_{e\in E_k}
+c_{j(e),k(e)|D(e)}(F(u_{j(e)}|u_{D(e)}),F(u_{k(e)}|u_{D(e)})|\theta_{j(e),k(e)|D(e)}),
+}
+where \eqn{\boldsymbol{u}=(u_{1},...,u_{d})^\prime\in[0,1]^d}{u=(u_{1},...,u_{d})'\in[0,1]^d}.
+Further \eqn{c_{j(e),k(e)|D(e)}} denotes a bivariate copula density associated to an edge \eqn{e} and with parameter(s) \eqn{\boldsymbol{\theta}_{j(e),k(e)|D(e)}}{\theta_{j(e),k(e)|D(e)}}.
+Conditional distribution functions such as \eqn{F(u_{j(e)}|\boldsymbol{u}_{D(e)})}{F(u_{j(e)}|u_{D(e)})} are obtained recursively using the relationship
+\deqn{
+h(u|\boldsymbol{v},\boldsymbol{\theta}) := F(u|\boldsymbol{v}) =
+\frac{\partial C_{uv_j|\boldsymbol{v}_{-j}}(F(u|\boldsymbol{v}_{-j}),F(v_j|\boldsymbol{v}_{-j}))}{\partial F(v_j|\boldsymbol{v}_{-j})},
+}{
+h(u|v,\theta) := F(u|v) =
+d C_{uv_j|v_{-j}}(F(u|v_{-j}),F(v_j|v_{-j}))/d F(v_j|v_{-j}),
+}
+where \eqn{C_{uv_j|\boldsymbol{v}_{-j}}}{C_{uv_j|v_{-j}}} is a bivariate copula distribution function with parameter(s) \eqn{\boldsymbol{\theta}}{\theta}
+and \eqn{\boldsymbol{v}_{-j}}{v_{-j}} denotes a vector with the \eqn{j}-th component \eqn{v_j} removed.
+The notation of h-functions is introduced for convenience. For more details see Dissmann et al. (2013).
+
+The function is actually just a wrapper to \code{\link{RVineLogLik}}.
+}
+
+\references{
+Dissmann, J. F., E. C. Brechmann, C. Czado, and D. Kurowicka (2013).
+Selecting and estimating regular vine copulae and application to financial returns.
+Computational Statistics & Data Analysis, 59 (1), 52-69.
+}
+
+\author{Thomas Nagler}
+
+\seealso{\code{\link{BiCopHfunc}}, \code{\link{RVineMatrix}}, \code{\link{RVineMLE}}, \code{\link{RVineAIC}}, \code{\link{RVineBIC}}}
+
+\examples{
+# define 5-dimensional R-vine tree structure matrix
+Matrix <- c(5, 2, 3, 1, 4,
+ 0, 2, 3, 4, 1,
+ 0, 0, 3, 4, 1,
+ 0, 0, 0, 4, 1,
+ 0, 0, 0, 0, 1)
+Matrix <- matrix(Matrix, 5, 5)
+
+# define R-vine pair-copula family matrix
+family <- c(0, 1, 3, 4, 4,
+ 0, 0, 3, 4, 1,
+ 0, 0, 0, 4, 1,
+ 0, 0, 0, 0, 3,
+ 0, 0, 0, 0, 0)
+family <- matrix(family, 5, 5)
+
+# define R-vine pair-copula parameter matrix
+par <- c(0, 0.2, 0.9, 1.5, 3.9,
+ 0, 0, 1.1, 1.6, 0.9,
+ 0, 0, 0, 1.9, 0.5,
+ 0, 0, 0, 0, 4.8,
+ 0, 0, 0, 0, 0)
+par <- matrix(par, 5, 5)
+
+# define second R-vine pair-copula parameter matrix
+par2 <- matrix(0, 5, 5)
+
+# define RVineMatrix object
+RVM <- RVineMatrix(Matrix = Matrix, family = family,
+ par = par, par2 = par2,
+ names = c("V1", "V2", "V3", "V4", "V5"))
+
+# compute the density at (0.1, 0.2, 0.3, 0.4, 0.5)
+RVinePDF(c(0.1, 0.2, 0.3, 0.4, 0.5), RVM)
+}
Modified: pkg/man/RVineStructureSelect.Rd
===================================================================
--- pkg/man/RVineStructureSelect.Rd 2015-02-20 13:51:01 UTC (rev 82)
+++ pkg/man/RVineStructureSelect.Rd 2015-02-24 12:00:28 UTC (rev 83)
@@ -9,10 +9,9 @@
}
\usage{
-RVineStructureSelect(data, familyset = NA, type = 0,
- selectioncrit = "AIC", indeptest = FALSE,
- level = 0.05, trunclevel = NA,
- progress = FALSE, weights = NA)
+RVineStructureSelect(data, familyset = NA, type = 0, selectioncrit = "AIC",
+ indeptest = FALSE, level = 0.05, trunclevel = NA,
+ progress = FALSE, weights = NA, rotations = TRUE)
}
\arguments{
@@ -74,6 +73,7 @@
\item{trunclevel}{Integer; level of truncation.}
\item{progress}{Logical; whether the tree-wise specification progress is printed (default: \code{progress = FALSE}).}
\item{weights}{Numerical; weights for each observation (opitional).}
+ \item{rotations}{If \code{TRUE}, all rotations of the families in \code{familyset} are included.}
}
\details{
Mehr Informationen über die Mailingliste Vinecopula-commits