R/random.gammaprime.R

# take each possible move as proposition and sample from these
# 
# Author: benderc
###############################################################################

random.gammaprime <- function(gammax) {
	gammax.u <- uniquegamma(gammax)
	cols <- sample(1:ncol(gammax.u),ncol(gammax.u),replace=T)
	gammax.u.rnd <- gammax.u[,cols]
	ret <- expand.gamma(gammax.u.rnd[,order(as.numeric(colnames(gammax.u.rnd)))],reps=ncol(gammax)/ncol(gammax.u))
	colnames(ret) <- colnames(gammax)
	return(ret)
}

Try the ddepn package in your browser

Any scripts or data that you put into this service are public.

ddepn documentation built on May 2, 2019, 4:42 p.m.