The function prints the structure of HAC as string, so that the important characteristics of the copula can be identified.
tree2str(hac, theta =TRUE, digits =2)
Arguments
hac: an object of the class hac.
theta: boolean. Determines, whether the values of the dependency parameter(s) are printed (TRUE) or not (FALSE).
digits: a non-negative integer value specifying the number of digits of the dependency parameter(s).
Returns
a string of the class character.
See Also
plot.hac
Examples
# construct a hac objecttree = list(list("X1","X5","X2",3), list("X3","X4","X6",4),2)model = hac(type =1, tree = tree)# the parameters are returned within the curly brackets# variables nested at the same node are separated by a dottree2str(model)# [1] "((X1.X5.X2)_{3}.(X3.X4.X6)_{4})_{2}"# (X1.X5.X2)_{3} and (X3.X4.X6)_{4} are the two variables nested at the# initial node with dependency parameter 2tree2str(model, theta =FALSE)# [1] "((X1.X5.X2).(X3.X4.X6))"# if theta = FALSE, only the structure of the variables is returned# alternatively consider the following nested ACtree = list("X1", list("X5","X2",3), list("X3","X4","X6",4),1.01)model = hac(type =1, tree = tree)tree2str(model)# [1] "(X1.(X5.X2)_{3}.(X3.X4.X6)_{4})_{1.01}"# _{1.01} represents the initial node# the first three variables are given by the subtrees (X3.X4.X6)_{4},# (X5.X2)_{3} and X1