Hi Statalist experts,
Suppose I have data on a population of N subjects, each has X1-X5 and and variable p specifying its sampling probability. Each subject has an unequal probability of being selected. Supposed I would like to select a sample of size n taking into account the sampling probability, how would I do that? I am looking for a function that parallels the "sample(x, size, replace = , prob = )" function in R.
Thank you in advance!
Best,
Eva
Related Posts with How to sample with unequal probability in a given population
Difference-in-Difference - collinearityDear Statalisters, I am relatively new to Stata, so please bear with me. Also, I am aware that thi…
Loop, preserve, save, merge, restoreDear Stata Users I need to change the data layout for 1164 daily files. The names of the files corr…
Confusion w/ model specifications and outcomesHello, I write my thesis atm and I want to investigate the relationship between an almost constant …
Two way clustering at Sector and Year level with two fixed effects at Firm and YearHi all, I have a panel dataset for 477 firms in one Country for 2007 to 2017. The following is the …
Choosing the highest value of a variable in each category corresponding to another variableHello all, I have Var1, which is postal codes, and Var2, dissemination area codes, for which there a…
Subscribe to:
Post Comments (Atom)
0 Response to How to sample with unequal probability in a given population
Post a Comment