# bivariate extremal coefficients of a tree model
g<- graph(c(1, 2, 2, 3, 2, 4), directed = FALSE)
g<- set.vertex.attribute(g, "name", V(g), c("a", "b", "c", "d"))
obj<- HRMtree(g)
obj<- setParams(obj, c(0.2, 0.3, 0.4))
extrCoeff(obj)
# arbitrary vector of coordinates
v<- c(1,2,0,6); names(v)<- c("a", "b", "c", "d")
extrCoeff(obj, v)
# non-parametric extremal coefficients
data<- matrix(rnorm(4 * 500), 500, 4)
colnames(data)<- c("a" , "b", "c", "d")
tobj<- Tree(g, data)
extrCoeff(tobj, 0.2)
# arbitrary vector of coordinates
v<- c(1, 2, 0, 6); names(v)<- c("a", "b", "c", "d")
extrCoeff(tobj, k_ratio = 0.2, v = v)
#bivariate extremal coefficients of a block graph model
g<- graph(c(1, 2, 2, 3, 1, 3, 3, 4, 4, 5, 3, 5), directed = FALSE)
g<- set.vertex.attribute(g, "name", V(g), c("a", "b", "c", "d", "e"))
obj<- HRMBG(g)
obj<- setParams(obj, c(0.2, 0.3, 0.4, 0.5, 0.6, 0.1))
extrCoeff(obj)
# arbitrary vector of coordinates
v<- c(1, 1, 0, 1, 1); names(v)<- c("a", "b", "c", "d", "e")
extrCoeff(obj, v)
Run the code above in your browser using DataLab