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: RE: RE: RE: RE: Extracting results from -rolling- in one file per window
From
Micha Schildmann <[email protected]>
To
"[email protected]" <[email protected]>
Subject
st: RE: RE: RE: RE: Extracting results from -rolling- in one file per window
Date
Mon, 17 Mar 2014 01:13:56 +0000 (GMT)
Dear Joe,
again your reply was most welcomed. I tried the following code
global counter "0"
capture program drop rollingwindow
program rollingwindow
global counter=`counter'+1
global tflist ""
foreach var of varlist *SA{
reg Mid `var'
tempfile tfcur
parmest, idstr("`var'") saving(`"`tfcur'"', replace) flis(tflist)
}
preserve
clear
append using $tflist
sencode idstr, gene(xvar)
lab var xvar "X-variable"
keybygen xvar, gene(parmseq)
drop if parmseq==2
egen rank = rank (-t)
drop if rank>30
save `counter', replace
restore
end
rolling, window(4) stepsize (4) recursive: rollingwindow
but I get the following error
- save `counter', replace
= save , replace
invalid file specification
when enabling trace.
This confuses me as I tried something very similar and it worked.
Do you or anyone else have any idea what could cause this error?
Best regards
Micha
*
* 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/