y = c(rep(1,500),rep(0,500))
x1 = sample(c(0,1,2),500,replace=TRUE,prob = c(0.64,0.32,0))
x2 = sample(c(0,1,2),500,replace=TRUE,prob = c(0.49,0.42,0))
x = c(x1,x2)
LRT_H(x,y)
Run the code above in your browser using DataLab