简体   繁体   中英

calculate Transfer entropy in r

library(TransferEntropy)

x = c(0,1,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,1,0)

y = c(0,0,0,1,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,1,0,0,0,1,0,1,0,1,0,0,0,0,0,1,0)

computeTE(x,y,3,1,"MI_diff",safetyCheck = T)

Error in computeTE(x, y, 3, 1, "MI_diff", safetyCheck = T) : Points with same coordinates in the X tree (add noise).

I have binary data like x and y and i need to calculate transfer entropy between them, I used R and performed above steps but i am getting error !!But when i use :

computeTE(x,y,3,1,"Correlation")

this works but i want to know why and my actual data have 43200 records when i give that to same code R crashes

由于数据格式的原因,如果数据为双倍格式,则不会接受它,从而导致崩溃

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM