Hello
I have 524 sas files I would like to import as dta files, ex.
bef201012.sas7bdat
bef201112.sas7bdat
bef201212.sas7bdat
faik2010.sas7bdat
faik2011.sas7bdat
faik2012.sas7bdat
ind2010.sas7bdat
ind2011.sas7bdat
ind2012.sas7dat
etc,
My code looks like this:
local filenames: dir . files "*sas7bdat"
foreach file of local filenames {
import sas using "`file'"
save `file'.dta, replace
}
but it doesn't seems to work very well? Is there anybody that can help me correct my code
Kind regards Frank
Related Posts with Import mulitple sas7bdat files into stata with a loop?
Using suest to compare coefficientsHi statalist, I am running an ordinal regression model separately for each sex because I expect that…
Lagged dependent variable in mixed models?Hi everyone, I have some questions. I have a dataset of about political parties in 30 countries and …
unbalanced panelHi everyone I'm running a regression with fixed effects of individuals: reg y x i.firm i.year i.indi…
Finding max and min of a numbers' list stored in macroDear All, I am looking for a solution to find maximum and minimum numbers stored in a local/global …
Model's forecast accuracy evaluationHi everyone, I want to evaluate forecasting accuracy of ARIMA (1,1,1) model. I use only one variabl…
Subscribe to:
Post Comments (Atom)
0 Response to Import mulitple sas7bdat files into stata with a loop?
Post a Comment