Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using RandTreat For Fixed Proportions Per Treatment

    Hello! I have a set of data with 943 observations each with an ID and two binary variables. The data looks like so...
    id var1 var2
    0000 1 0
    0001 0 1
    0002 0 0
    0003 1 1
    and so on. I'm trying to use -randtreat- to randomly assign these 943 observations to 14 different treatment groups, 13 of which have to be exactly 70 observations and 1 of which has to have the rest of the observations (the remaining 33). However, when I run this code -
    Code:
        randtreat, gen(week) setseed(1234) strata(pricemedian jikokoa) misfits(strata) unequal(70/943 70/943 70/943 70/943 70/943 70/943 70/943 70/943 70/943 70/943 70/943 70/943 70/943 33/943) replace
    - I instead get 14 groups that are evenly split amongst themselves, with ~67 observations per group. Does anyone know how to fix this to get the proper split?

  • #2
    The output of help randtreat describes the use of the misfits() option, and tells us that both misfits(strata) and misfits(global) allocate misfits without weighting treatments as specified in unequal(). You would seem to need a different choice of misfits() option.
    Last edited by William Lisowski; 12 Oct 2022, 12:42.

    Comment


    • #3
      William Lisowski This was exactly it! Thank you!

      Comment

      Working...
      X