Statalist The Stata Listserver


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

RE: st: Sample command question


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: Sample command question
Date   Mon, 30 Oct 2006 08:58:36 -0000

Partly to echo Richard's comment. 

One key thing that remains unclear is quite what you mean by 
"database", as Stata has no such notion. Is this a Stata 
dataset or a bundle of Stata datasets, or is the Stata 
processing a means towards an end of holding the data
in some other form? 

Similarly, I don't know what "term" means here either. 

In broad terms, your specification seems a long way from the code 
you posted. 

Perhaps you should work on the specific suggestions already 
made, as I don't think your problem is yet precise enough 
for anyone to write down code without making further wild 
guesses. 

Nick 
n.j.cox@durham.ac.uk 

David McClintick
 
> 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.
> 
Richard Williams
 
> 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.

*
*   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/



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