Hi everyone, wondering if anyone can help as I seem stuck.
I have a dataset with 105 hospitals and each hospital has a varying number of patients- total patient(24000). I want to select 6 hospital but make sure it represents approximately 20% of patients (total -4910). But not sure how. So far i have tried
bsample 6, cluster ()
But this just randomly gives any 6 hospital sometimes is more than 20% and sometimes less.
Is there anything else I can try?
Many thanks
Related Posts with Codes for Randomly selecting from a particular cluster but a certain percentage
Error r(430) when including lagged DV in XTMIXEDI am trying to run an HLM model in which monthly brand sales is my dependent variable. The model run…
gsem with dependent binary variablesHello statalisters, Using Code: webuse womenwk , one can estimate a Heckman model in gsem as outl…
How to rename all the variables?Hi, I want to rename all the variables by adding _year to all of them at the end (eg. religion_2005…
Parameters in assert command must be positiveHello, I am using the assert command in a program that I wrote and I get the error message indicati…
Store p-values in a matrix after 'actest'Dear Statalist users, I am using the 'actest' command to conduct a serial correlation test after ti…
Subscribe to:
Post Comments (Atom)
0 Response to Codes for Randomly selecting from a particular cluster but a certain percentage
Post a Comment