(can we go lower case please?)
You have a dataset.
You want to take a sample from part of it.
The key is to specify that part using -if-.
You later want to take a sample in another
way.
The same is true. -if- specifies what you
are sampling from.
If it's important that the samples don't
overlap, as seems likely, that's to be
included in the -if- condition second time
around.
Whether you do this from first principles
using random numbers directly or use
a command like -sample- is secondary.
Nick
[email protected]
sgsr100
> The think is I am trying to get random samples from a data set. I have
> to use the traning and houldout data. But I have to get this samples
> with the same criteria that the original data set was built.
> In order to do this in a first stage I have to get a random
> sample from
> the primary units (it is composed of the group of housings ). In a
> second stage I need to get another random sample from the secondary
> units (it is composed of the group of households). Is the cluster
> command useful for this?
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/