Hello all, would appreciate an advise on how i can fix the following line of commands to import/read multiple SPSS files in a directory and save each as .dta file. The commands below do not produce any output or give an error message --
global dir "C:\Users\mydesktop"
local fls: dir "$dir" files "*.sav"
global save "$dir/STATA"
foreach f of local fls{
usespss `"`fls'"' , clear
save "$save/`"`f'"'.dta", replace
}
Related Posts with Forloop to import multiple .sav files not working
Import Excel Loop issuesHello everyone, I'm trying to write code to import certain worksheets from an excel workbook, but I …
Update to -iscogen- available from SSCAn update to the iscogen package is now available from SSC. Type Code: . ssc install iscogen, repl…
Update to -kmatch- available from SSCA maintenance update to kmatch is now available from SSC. Type Code: . ssc install kmatch, replace…
Adding 'proportion' to esttab command.Dear All, I am estimating a logistic fixed effects regression to estimate the effect of a policy ch…
Equivalent of 'exposure' variable for xtlogit regression for diff-in-diffDear All, I am running a logistic FE regression to estimate a the effect of a 'treatment' using a g…
Subscribe to:
Post Comments (Atom)
0 Response to Forloop to import multiple .sav files not working
Post a Comment