search for: getlrtpval

Displaying 1 result from an estimated 1 matches for "getlrtpval".

2008 Jan 25
1
increasing speed for permutations of glm
...) # initalize permutation of response 'labels'. perm.response <- response counts <- rep(1,18) # Number of permutations nperm <- 5 # matrix of all pairs of indices all.pairs <- combn2(1:ncol(myData)) # initalize results pmatrix <- matrix(-1,nrow=nperm,ncol=nrow(all.pairs)) getLRTpval <- function(index) { # A contingency table is formed from two columns of the data and the response (3 way table) and made into a vector counts <- as.vector(table(myData[,index[1]],myData[,index[2]], perm.response)); # Add 1 to any count that = 0. counts[counts == 0] <- 1 reduce...