Recent content by stillsarah

  1. S

    Randomized Allocation w/in Category - Loop

    Awesome - the more simple the better. Doesn't need to be completely automated.
  2. S

    Randomized Allocation w/in Category - Loop

    I knew in this case it wouldn't be random in the mathematical sense. It's why I put "random" in quotes several times. If you have time later to write up how to force the 60/40, that would be much appreciated. Thanks again for your help.
  3. S

    Randomized Allocation w/in Category - Loop

    Thanks for the explanation. For the first level (this 60/40) it needs to be exact at the town level. I understand it won't be truly "random." The dist from the other thread should be random and is great as is. Thanks, Sarah
  4. S

    Randomized Allocation w/in Category - Loop

    I've been piecemealing, assuming I could figure out how to combine the two sections. Basically, there are two levels of randomization. Your comments on the other thread helped me with one level, and now I'm trying to work on the other piece. Might be easier to explain the whole of what I'm...
  5. S

    Randomized Allocation w/in Category - Loop

    Hi All, I have a database with 200 individual IDs that are grouped by town into 10 groups of 20 people. I want to "randomly" assign 60% of each town (12 people per town) a value of 1 and the rest 0. Is there a way to do this through a query? VBA is fine too. Thanks, Sarah
  6. S

    How to weight randomization

    I'm back :( @MajP I'm trying to find in your code how you did this, but can't. Assuming you didn't copy and paste?
  7. S

    How to weight randomization

    Thank you so much! I appreciate it
  8. S

    How to weight randomization

    Screenshots attached
  9. S

    How to weight randomization

    I'v gotten rid of the space and I'm getting the same error message as before. Sorry for being dense, but I'm copying this code into sql view of a new query, correct? You're correct that I need them to persist. I don't understand what you mean here
  10. S

    How to weight randomization

    I want them in a table. The table you created (adapted to reflect the 50 - 30 - 10 -10 distribution I meant to have initially) is named "Complicated" and the table where I have the individuals IDs is "Randomization Practice". Ideally the randomized treatment arms (0 - 3) would show up in this...
  11. S

    How to weight randomization

    Apologies - I'm completely new to Access and SQL. Can you please spell out exactly what steps to take? Where in this code is the reference to the specific table? If I copy and paste this into a query in sql view, it comes up with a "invalid statement" error :banghead:
  12. S

    How to weight randomization

    Ok so assuming I change the ranges to add up to 1, how do I build an expression that pulls from this? Thanks!
  13. S

    How to weight randomization

    Sorry, I meant 1 - 30%** @Micron what would the “cumulative” column look like in this case?
  14. S

    How to weight randomization

    I am trying to build a query that randomly assigns each observation (ID) a number between 0-3. To do so, I used: X: Int(Rnd([Randomization Practice]![ID])*4) However, now I want to edit it so that different values have different weights (0 - 50%, 1 - 30%, 2 - 10%, 3 - 10%) Can anyone help...
Back
Top Bottom