Statalist The Stata Listserver


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

st: Re: extract rows from panel dataset


From   Kit Baum <[email protected]>
To   [email protected]
Subject   st: Re: extract rows from panel dataset
Date   Mon, 11 Sep 2006 02:55:29 -0400

Tom,

You can get such a matrix after running my foo2 routine, by just specifying mkmat with a list of variables with an "if sampl1" condition. But if you really want to write an estimation routine that will work reliably (even if, e.g., there are more than 800 obs. in what the user has specified) then you had better figure out how to do it with Mata. Have a look at the source code for hprescott.ado on SSC -- it doesn't estimate parameters, but it deals with the notion of moving a subset of the data in memory into a matrix.

Kit Baum, Boston College Economics
http://ideas.repec.org/e/pba1.html
An Introduction to Modern Econometrics Using Stata:
http://www.stata-press.com/books/imeus.html


On Sep 11, 2006, at 2:33 AM, statalist-digest wrote:


Hi Kit Baum and Scott,

thanks (again) for your input, this helps me a lot to understand stata
programming better. In my case the utility I am trying to write is in
fact just a preperation command to extract the right matrices from the
panel dataset. Every matrix corresponds to different groups of units
and different time periods. Your code suggestions provides a great
help for this preparation tool.

I need these matrices in a second step to implement my estimator etc.
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index