# non-parametric tdc
g<- graph(c(1,2,2,3), directed=FALSE)
g<- set.vertex.attribute(g, "name", V(g), c("a", "b", "c")) # name the nodes
data<- matrix(rnorm(1000*3), 1000,3)
colnames(data)<- c("a", "b", "c") # name the columns
net<- Network(x = g, data = data)
v<- c(1,0,1)
names(v)<- c("a", "b", "c")
taildepCoeff(net, 0.2, v = v, correction = TRUE)
# parametric tdc
g<- graph(c(1,2,2,3), directed=FALSE)
g<- set.vertex.attribute(g, "name", V(g), c("a", "b", "c")) # name the nodes
obj<- HRMtree(g)
obj<- setParams(obj, c(0.5,0.6))
taildepCoeff(obj, v)
Run the code above in your browser using DataLab