Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Theophilus Dapel <dapelzg82@gmail.com> |
To | Statalist <statalist@hsphsun2.harvard.edu> |
Subject | st: Obtaining a average replications from a random draw |
Date | Thu, 13 Mar 2014 20:02:48 +0000 |
Dear Stata Users, I have a simple predicted equation for approximately 7000 observations and need to obtain the value of “y": y = a + bx + e ——————— (1) The parameters “a” and “b” are given. Values of the variable “x” are also given. To fine the value of ‘y’, we need the given values of ‘’e’’. Now, I have “e” elsewhere with approximately 8000 observations. I wish to take a random draw of 7000 with replacement from the 8000 so I can substitute for “e” in (1). This is fairly simple because I was able to use bsample 7000. This is just a single replication. What if I want to have at least 300 replications (sampling “e” 300 times and substituting for “e” 300 times) and then take the average of the 300 “y’s” resulting from the replication and use the average in place of “y” . Any commands to deal with these? Thanks, Dapel * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/