Statalist The Stata Listserver


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

st: RE: levinlin-help


From   "Scott Merryman" <[email protected]>
To   <[email protected]>
Subject   st: RE: levinlin-help
Date   Tue, 13 Feb 2007 08:31:06 -0600

It might be easier to feed -levinlin- a list of lag numbers before you place
them in a matrix, but here is one way.

1. Convert the matrix to a series of variables.

2. Place the values of the variables into local macro

3. Use the local macro in -levinlin-

For example:

webuse grunfeld,clear
matrix A = 1,2,3,4,5,1,2,3,4,5
matrix list A
svmat A

foreach var of varlist A* {
local lags "`lags' `=`var'[1]'"
}
drop A*
disp "`lags'"
levinlin invest , lag(`lags')

Scott


> -----Original Message-----
> From: [email protected] [mailto:owner-
> [email protected]] On Behalf Of G�lden B�d�s
> Sent: Wednesday, February 07, 2007 7:30 AM
> To: [email protected]
> Subject: st: levinlin-help
> 
> Hi,
> 
> I am using levinlin panel unit root method for my research. I have a
> problem while writing lag numbers.
>      "levinlin variablename, lags(numlist)"
> 
> Before using this method, i created a matrix (row matrix) which contains
> the optimum lag numbers for each panel and I want to insert the values
> of this matrix
> as numlist of  the lags  in the  above syntax. However,  it says
> "invalid numlist" when i put the matrix instead of numlist. How can I
> insert the values of matrix as my lags
> without writing them one by one?? I have many panels and I will also
> use  this program for different datasets, that's why it takes too much
> time.
> Could you please help me?
> Thanks.
> Gulden




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