Statalist The Stata Listserver

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

RE: st: Sample command question

From   "David McClintick" <>
To   <>
Subject   RE: st: Sample command question
Date   Mon, 30 Oct 2006 00:15:29 -0500

Perhaps I can clear up what it is that I am trying to accomplish.

I have 91 variables. I want to generate 10 random samples of each
variable. So, for instance, for the first variable I would have 10 sets
of 5 observations, only using observations from that variable. Thus,
when all is said and done, I should have 10 individual databases, with
each database containing 91 variables with 5 terms in each one.

-----Original Message-----
[] On Behalf Of Richard
Sent: Sunday, October 29, 2006 11:43 PM
Subject: RE: st: Sample command question

At 09:46 PM 10/29/2006, Nick Cox wrote:
>Richard's line of code does what you ask.
>It works on just the variable that you are focusing on.
>I can see some other problems, some trivial, some
>not so, that you will face.

Other than the 20 problems Nick points out, it should work fine.  :)

One other thing I wondered about - each of the little mini-samples is 
going to include all the variables.  Is that what you want, or did 
you just want each sample to include the X in question?  You keep on 
referring to "5 terms" rather than "5 cases" which is why I ask this.

Without knowing anything about the Xs, it is hard to tell what the 
purpose of the program is, but I do wonder if maybe there aren't some 
other logical errors lurking out there or if there are better ways of 
approaching it.

Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
FAX:    (574)288-4373
HOME:   (574)289-5227
EMAIL:  Richard.A.Williams.5@ND.Edu
WWW (personal):
WWW (department): 

*   For searches and help try:

*   For searches and help try:

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