BradleyTerryScalable icon indicating copy to clipboard operation
BradleyTerryScalable copied to clipboard

btfit error: Mat::init(): requested size is not compatible with column vector layout

Open DavidFirth opened this issue 5 years ago • 0 comments

This small example (see code below) fails with error message

Error in BT_EM(wins, a = a, b = b, maxit = maxit, epsilon = epsilon) : Mat::init(): requested size is not compatible with column vector layout

Strangely, if "1000" in the code below is changed to 100, then things seem to work fine. I haven't checked any further at this point --- just noting it here for later.

The example code that fails:

require(BradleyTerryScalable) ex1 <- matrix(c( 0, 1, 0, 0, 3, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0), 4, 4) * 1000 ex1a <- rbind(1, cbind(1, ex1)) ex1a[1, 1] <- 0 rownames(ex1a) <- colnames(ex1a) <- LETTERS[1:5] ex1a.fit <- btfit(btdata(ex1a), 1) ## fails, with error message as above

DavidFirth avatar Oct 24 '19 15:10 DavidFirth