You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Permute requires the number of strata to be the same across all plots. However, it also requires the number of strata to be the same across all blocks. Since blocks are never exchanged, this seems unnecessary, and it prevents an easy implementation of permutation schemes where the defining feature of a block is the number of strata. For instance, if I have a variable number of observations per sample, I would like to define the block as the number of observations per sample, and then permute such that I only exchange with samples that have the same number of observations. This is a common enough design that some researchers have written custom code specific to this kind of design. Is it possible to allow blocks to have different number of strata?
The text was updated successfully, but these errors were encountered:
Do you have an example where I enforce this in permute? I don't recall putting in that restriction but it's a while since I wrote a lot of this and something might have sneaked in without my thinking too much about it.
I suspect this is getting caught in check() because I'm not considering the blocks at the point I check for strata length consistency. I certainly take a look at addressing this, but if you have some dummy or example code that triggers the issue that would help me get to fixing this sooner?
Error in check(sn, control = control, quietly = quietly) : Design must be balanced if permuting 'strata'.
If instead the blocks all have the same number of levels: dat<-data.frame(blocklevel = c(rep(1,20),rep(2,30)), plotlevel = c(rep(c(1,2),10),rep(c(3:5),10))) dat<-dat[order(dat$plotlevel,dat$blocklevel),]
No error, runs perfectly. And if the first example includes only one of the blocks it also runs perfectly.
Permute requires the number of strata to be the same across all plots. However, it also requires the number of strata to be the same across all blocks. Since blocks are never exchanged, this seems unnecessary, and it prevents an easy implementation of permutation schemes where the defining feature of a block is the number of strata. For instance, if I have a variable number of observations per sample, I would like to define the block as the number of observations per sample, and then permute such that I only exchange with samples that have the same number of observations. This is a common enough design that some researchers have written custom code specific to this kind of design. Is it possible to allow blocks to have different number of strata?
The text was updated successfully, but these errors were encountered: