![]() |
StarVine
|
Cononical vine (C-vine). More...
Public Member Functions | |
def | __init__ (self, data, dataWeights=None) |
def | constructVine (self) |
Sequentially construct the vine structure. More... | |
def | buildDeepTrees (self, level=1) |
Recursivley build each tree in the vine. More... | |
![]() | |
def | __init__ (self, data=None, weights=None) |
def | loadVineStructure (self, vS) |
Load saved vine structure. | |
def | vineNLLH (self, vineParams=[None], kwargs) |
Compute the vine negative log likelyhood. More... | |
def | sfitMLE (self, kwargs) |
Simulataneously estimate all copula paramters in the vine by MLE. More... | |
def | treeHfun (self, level=0) |
Operates on a tree, T_(i). More... | |
def | sample (self, n=1000) |
Draws n samples from the vine. More... | |
def | plotVine (self, plotAll=True, savefig=None) |
Plots the vine's graph structure. More... | |
Public Attributes | |
data | |
weights | |
nLevels | |
vine | |
![]() | |
nLLH | |
vineParams | |
vineParamsMap | |
fittedParams | |
Cononical vine (C-vine).
Provides methods to fit pair copula constructions sequentially and simultaneously. Additional methods are provided to draw samples from a constructed C-vine. Base class starvine.vine.base_vine.BaseVine .
Example 3 variable C-vine structure:
X1 ---C_13--- X3 | C_12 | X2
F(X2|X1) ---C_23|1--- F(X3|X1)
The nodes of the top level tree are the rank transformed, uniformly distributed marginals (defined on [0, 1]).
The formation of the lower level trees involve computing conditional distributions of the form:
For the bivariate case, Joe (1996) showed that:
Which simplifies further if x and v are uniform:
Where we have defined the convinience conditional distribution
The nodes of the lower level trees are formed by using to compute marginal distirbution of the RV
given the parent copula's parameters
and the root node's uniformly distributed
.
The n-dimensional density of a C-vine copula is given by:
Where the outer product index represents the tree level, and the inner product indicies represent the pair copula constructions (PCC) withen the given tree.
def starvine.vine.C_vine.Cvine.buildDeepTrees | ( | self, | |
level = 1 |
|||
) |
Recursivley build each tree in the vine.
Must keep track of edge—node linkages between trees.
level | int Current tree level. |
def starvine.vine.C_vine.Cvine.constructVine | ( | self | ) |
Sequentially construct the vine structure.
Construct the top-level tree first, then recursively build all tree levels.