I'm using the blockrand package to create an allocation table for a randomized clinical trial and have been asked to set it up in a way I can't figure out. My code is below; it generates the 6:8 block sizes I need, and outputs without a problem. The challenge I have is that the Principal Investigator has now come back asking for "2 blocks to be randomly inserted", to have a pattern (for example) like 4/6/6/4/4/2/6/6/4/2/6. I don't know how to do this - I've spent a few hours playing around and reading various blogs etc. without luck.
Any help would be greatly appreciated. Thanks for your time,
Chris
I hope you had a good weekend - apologies for bumping this but I need to present my allocation table to the study team tomorrow and still don't know what I need to do to randomly insert 2-sized blocks into my table (4:6 blocks) using blockrand. If anyone has ideas I'd appreciate it.
Thanks
Chris
Hi Chris,
While I, unfortunately, don't have an answer for you I thought it might be helpful to share the R in Healthcare Slack community link in case someone may be able to help in the future there as well: Join rinhealthcare on Slack | Slack
Thank you!! I actually reached out to the author of blockrand and he confirmed that there's no way to do this in his package. I can either use the uneq.mid=TRUE parameter, which will insert randomly sized blocks randomly into the table, or I can create the base table and then insert the 2 blocks myself.
I'll be joining the Slack channel as well, thanks again for sharing and I hope you have a good day Chris