Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: Re: saving output from zandrews command
From
Christopher Baum <[email protected]>
To
"[email protected]" <[email protected]>
Subject
st: Re: saving output from zandrews command
Date
Sun, 30 Mar 2014 03:04:58 +0000
On Mar 27, 2014, at 2:33 AM,Kathleen wrote:
> I run the zandrews command for each of the members of my panel dataset with 300+ members. Does anyone know how to save the output from this command in variables? I already managed to get the number of the datapoint for which the endogenous break is most likely (which is called dminobs), but I would also like to store the minimum t-statistic at this point to test whether the break is significant. Does anyone have an idea on how to store this data? Thanks!
webuse grunfeld,clear
mat res = J(10,2,.)
forv i=1/10 {
zandrews invest if company==`i', break(trend)
mat res[`i',1] = r(tminobs)
mat res[`i',2] = r(tmin)
}
mat colnames res = "min_t_at" "min_tstat"
mat li res
Kit
Kit Baum
Professor of Economics and Social Work, Boston College, Chestnut Hill MA, USA
DIW Research Professor, Department of Macroeconomics, DIW Berlin, Berlin, Germany
[email protected] | http://ideas.repec.org/e/pba1.html
*
* 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/