Statalist The Stata Listserver


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

st: PDL and cnsreg


From   "Alexander Severinsen" <[email protected]>
To   <[email protected]>
Subject   st: PDL and cnsreg
Date   Wed, 8 Feb 2006 09:36:19 +0100

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 restrictions
on more than one independent variable.

McDowells example for the constrained OLS starts with constructing a
constraint matrix for any pdl model specification:

program pdlconstraints
	version 8.2
	args p q matname
	local r = `p' - `q'
	local m = `q'+1
	matrix `matname' = J(`r',`p'+3,0)
	forvalues i = 1/`r' {
		local x = `i' + `q' + 1
		local k = -1
		local d = 1
		forvalues j = `x'(-1)`i' {
			local k = `k' + 1
			matrix `matname'[`i',`j'] = `d'*comb(`m',`k')
			local d = -1*`d'
		}
	}
End

Now the PDL model is fitted:

pdlconstraints 12 4 A
cnsreg y L(0/12).x, constraints(A)

However I would like to have different constraints (different lags and
different polynomials) on different independent variables. The normal
definitions as explained in the manual is not working in this setting.
I've tried the following logic (which does not work):

pdlconstraints 12 4 A
pdlconstraints 6 2 B
cnsreg y L(0/12).x L(0/6).z, constraints(A-B)

Any suggestions on how to solve this would be greatly appreciated.

Best wishes,
Alexander Severinsen
PhD Student
Department of Economics and Management
Norwegian College of Fishery Science
University of Tromso/Norway
Office: A466
Direct: +47 77646119
Cell:   +47 99377455 
E-mail: [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