Statalist The Stata Listserver


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

Re: st: statsby on a panel


From   [email protected] (Jeff Pitblado, StataCorp LP)
To   [email protected]
Subject   Re: st: statsby on a panel
Date   Thu, 23 Mar 2006 09:41:38 -0600

James Mahon <[email protected]> using -statsby- with panel data:

> I'm running statsby on a panel to do group mean pooling of VAR regression 
> coefficients and SEs.  But it tells me I haven't tsset when I have:
> 
> tsset id1 year
>         panel variable:  id1, 1 to 208
>          time variable:  year, 1966 to 2002, but with a gap
> 
> . statsby _b , by(id1) saving(varDT): varbasic ICRGliberal DirTax year, lags(1/2)
> (running varbasic on estimation sample)
> time variable not set, use -tsset varname ...-
> an error occurred when statsby executed varbasic
> r(111);
> 
> Am I doing something wrong?  Has someone on the list written a good routine 
> for group mean pooling of VAR regressions across a panel?

James needs to use the -basepop()- option to restrict the initializing sample
to a single panel.  -statsby- must run the prefixed command once in order to
build the expression list from '_b', however -varbasic- can only be used with
a single panel.  Based on the above output, the following should work:

	statsby _b , by(id1) basepop(id1==1) saving(varDT): varbasic ICRGliberal DirTax year, lags(1/2)

--Jeff
[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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index