Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: random subsample - sample weights

From   "Ellen Van de Poel" <>
To   <>
Subject   st: random subsample - sample weights
Date   Thu, 15 Feb 2007 14:14:16 +0100

Dear all,
I want to draw a random subsample from my data, but taking into account my
sample weights. 
I thought of inflating my data (with the command "expand") to get rid of the
weights and then draw a random subsample from the expanded data. But I'm not
sure whether this is correct, since then I can have the same observation
multiple times in the random subsample?
The extra difficulty is that I am working with matrix language. The code
where the random subsample is drawn looks something like this:
p0i = p0[sort(unorder(rows(p0))[|1 \ n|],1)]

So I take the first n observations, that are drawn randomly from p0, and
then sort them again. 

Thereafter I match this random subsample with another sample (I'm doing a
Fairlie decomposition). So I guess it is necessary to account for the sample
weights when I match the random subsample with another sample?

Could anyone help me with this?

Thanks a lot in advance,
Ellen Van de Poel

Ellen Van de Poel 


Department of Applied Economics

Erasmus School of Economics and Business Economics 

Erasmus University Rotterdam 

Burg. Oudlaan 50  

3000 DR Rotterdam 

The Netherlands

Room H13-09

T: +31 (0) 10 408 15 02

F: +31 (0) 10 408 91 41

E :

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index