Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: GSAMPLE R3300

From   Nick Cox <>
Subject   Re: st: GSAMPLE R3300
Date   Thu, 6 Sep 2012 15:40:20 +0100

This is a puzzling email. Are you saying that you expected -gsample-
(SSC by the way; please explain where user-written programs you refer
to come from) to cope with an illogical request? As a Stata
user-programmer, I support similar behaviour always. If a user is
asking something crazy, the program shouldn't try to work out what is
really meant, but bounce it back. It's likely to arise from a mistake
or misunderstanding that could be embarrassing or disastrous in other
applications. It is not helpful program behaviour to indulge
non-trivial problems.

So, I guess the solution is for you to work out weights that -gsample-
will accept and then it will do what it was designed to do.
Alternatively, you can always write your own program that does what
you want it to do.


On Thu, Sep 6, 2012 at 3:28 PM, Lieke Boonen (SiRM)
<> wrote:
> Dear StataUsers
> We try to take a sample from our population, without replacement. we have several subgroeps with a high sampling weight. However with the gsample command it gives an error because for these cases the w_i*n /sum(w) is lager than 1. We thought the program looked at the relation between the weights and that this should not be a problem. Does anyone recognize this problem and is there a solution for this problem?
> many thanks,
> Lieke Boonen
> command: gsample 30000, [aweight = pop_weight], wor
> error: mm_upswor(): 3300 22140 cases have w_i*n/sum(w)>1
> mm_sample(): - function returned error
> <istmt>: - function returned error

*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index