Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | "Lin, Bill" <bill.lin.79@gmail.com> |
To | statalist@hsphsun2.harvard.edu |
Subject | st: using bootstrap for sample splitting and out-of-sample prediction |
Date | Mon, 26 Apr 2010 16:53:32 -0400 |
Hello All, I am trying to split my sample into two halves, use one half for estimation and another half for out-of sample prediction, and then calculate the average difference between fitted values and the observed values. I want to do it repeatedly, say 1000 times, using bootstrap. My problem is that I don't know how to store the average difference calculated each time in a matrice as in Matlab. Can any one give some suggestions? thanks, Bill Lin * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/