Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: PDLs


From   Kit Baum <[email protected]>
To   [email protected]
Subject   st: Re: PDLs
Date   Mon, 24 Feb 2003 07:16:28 -0500

--On Monday, February 24, 2003 2:33 -0500 Patrick wrote:

Mingguo Lei ([email protected])
how do i estimate Polynomial distributed lag model in
Stata 7.0?
To a similar question Kit Baum replied on January 17, 2001,

Assuming you mean polynomial distributed lags (Almon lags),
no. This question came up last year; I looked into the
possibility to implement same, and it is a nontrivial issue
given the way Stata deals with constraints. That is, unlike
e.g. RATS, you cannot do constrained least squares by
supplying the matrix and vector which transforms the
b-vector into the shorter constrained set (R b = r). You
can write out the constraints, each one, with 'define
constraint' and recover the matrix of constraints implied
by them, but you can't stuff that matrix (to my
knowledge; may have changed in Stata7, but I don't think
so) and perform cnsreg. That makes it exceedingly clumsy
to do something like Almon lags, which depend on a pattern
in the constraint matrix (as any textbook indicates).
It would be very easy to program if you could just whip up
that matrix and stuff it into the place where Stata saves
the constraints (and I would have already written that
routine).
This may have changed in Stata 8 but I can't say, I use v.7.
One thing _did_ change in v7 since that posting. In the meanwhile, StataCorp thoughtfully added a built-in command mat_put_rr (help mat_put_rr) which will allow one to do what I said I could not do above. Unfortunately, the press of time and lack of need to use PDLs in my own work has prevented me from writing the routine. Given this new command and a textbook description of PDLs, it would now not be hard to do so. I presume that the same facility exists in v8 (it doesn't run on this machine).

Kit


*
* 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