Sorry for posting a somewhat long query. I'll appreciate if you can help me
perform the following operation is Stata. Bootstrap commands in Stata helps
me perform some of the things. Specifically, I am looking for a solution
where (sort of) bootsrap is allowed within a bootstrap setup.
Suppose I have a sample of 20,000. I have 3 variables: y, x1 and x2.
Step 1: Draw 30 samples of size 100 each.
Step 2: Calculate mu(y), mu(x1), mu(x2) for each of the subsamples.
Step 3: Create a matrix of mu(y), mu(x1), mu(x2). Clearly, it will be a
matrix of dimension 30x3. Let's call it [Y X1 X2]
Step 4: Run the model Y=a + b1*X1 + b2*X2 + e
Step 5: Create file to save estimated b1 and b2.
Step 6: Repeat Steps 1 through 5 several times (100 times) to obtain a
matrix of estimated b1 and b2s (100x2 in dimension).
While I can create a grand file of all the means, I am having difficulty in
creating the subroutine described in Steps 1 through 5.
Thanks
Achintya Ray
Senior Research Associate
Department of Medicine
Vanderbilt University
[email protected]
*
* 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/