Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Varlist required


From   "Francis, Richard N" <rnfrancis@utep.edu>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: Varlist required
Date   Wed, 4 Dec 2013 03:37:02 +0000

Hi Statalist,

Receive a "Varlist required" error for the following:

local limit=r(max)
 foreach v in tstat {
      g `v' = .
 }
 gen which = ""

 forval i = 1/`limit' {
         display "Iteration of `i' of `limit"
         replace which = "`: label (id) `i''" in `i'
         dfgls fcf if id == `i' , maxlag(4) ers
		 matrix b = e(b)
		 matrix v = e(V)
		 local coeff = b[1,1]
		 local se1 = sqrt(v[1,1])
		 local tstat = coeff/se
		 
		 qui foreach tstat in df {
				
                replace `v' = r(`v') in `i'
		
         }
}

Any thoughts for what I am doing incorrectly?

Rick 


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index