Displaying 2 results from an estimated 2 matches for "bistochmat".
2006 Oct 16
2
Re : Re : Generate a random bistochastic matrix
Yes, you're right. In fact, it's just an adaptation of a matlab command and the author advises using N^4 replications that's why it's the default in the function. The bistochastic matrix is not my subject of interest, but I need it to perform some random tranformation of a vector of incomes.
Florent Bresson
----- Message d'origine ----
De : Richard M. Heiberger <rmh at
2006 Oct 16
5
Re : Generate a random bistochastic matrix
Thanks, I tried someting like this, but computation takes times for large matrices
btransf <- function(y,X=length(y)^4) {
N <- length(y)
bm <- matrix(rep(1/N,N^2),N,N)
for(j in 1:X){
coord <- sample(1:N,4,replace=T)
d <- runif(1,0,min(bm[coord[1],coord[2]],bm[coord[3],coord[4]]))