Dear Scott,
That works wonderful. Thanks for the help!
Best wishes,
Alexander
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of
[email protected]
Sent: 8. februar 2006 14:08
To: [email protected]
Subject: Re: st: PDL and cnsreg
How about regressing each independent variable with its matrix of
constraints separately and then gathering all the constraints together
to estimate the full model.
sysuse auto,clear
const drop _all
gen time = _n
tsset time
pdlconstraints 12 4 A
pdlconstraints 6 2 B
qui cnsreg price l(0/12).mpg, con(A)
matrix dispCns, r
forv i = 1/8 {
constraint define `i' `=r(cns`i')'
}
qui cnsreg price l(0/6).weight, con(B)
matrix dispCns, r
forv i = 9/12 {
local j = `i' - 8
constraint define `i' `=r(cns`j')'
}
const dir
cnsreg price l(0/12).mpg l(0/6).weight, const(1-12)
Hope this helps,
Scott
----- Original Message -----
From: Alexander Severinsen <[email protected]>
Date: Wednesday, February 8, 2006 2:36 am
Subject: st: PDL and cnsreg
> Dear Statalisters,
>
> I am trying to estimate a polynomial ditributed lag model (PDL) as
> proposed by McDowell(2004) in The Stata Journal vol.4 nr.2 p.180-189.
> McDowell suggest using the constrained OLS instead of the Almon
> method,both producing the exact same estimates, the former requiring
> less effort. However I am having problems because I want to set
> restrictionson more than one independent variable.
<snip>
*
* 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/
*
* 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/