Hello. I have a variable X with, say, 10000 observations. I want to randomly assign a treatment value of 1 to this variable but cap the number of treatments to 50%, or 5000, observations. How can I do so in my do-file?
Thank you!
Related Posts with Randomly assigning treatment at a proportion to a variable
integrated time dependent area under the curveHello Is there any command in stata to calculate the integrated time dependent area under the curve…
Problem with a program that will open a dataset with a user defined list of variablesHi all, I'm creating a STATA program that will: 1. open a dataset, 2. keep a user defined list of v…
Merged data is incorrectDear everyone, I really hope to get your advice. I am merging two dta files using command: merge 1:…
Graphs with mi estimatesDear all, I am currently working with a multiple imputed survey and want to create graphs out of th…
what does this mean?Number of obs = 20 F(3, 16) = 31.78 Prob > F = 0.0000 R-squared = 0.8438 Root MSE = 4.8689 -----…
Subscribe to:
Post Comments (Atom)
0 Response to Randomly assigning treatment at a proportion to a variable
Post a Comment