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
Merging two variables + timeDear Statalist users I have some activity data which asks respondents how much time they spent in p…
while loop error, testing overdispersionHello everyone, i have an issue with a loop. I got this from Hilbe's book "modeling count data". I'm…
Looking for a way to do local regressions on data with many zeroesI want to run a nonparametric or semiparametric regression on data which I suspect to be non-linear.…
Point transparency in spmapHi all, I wonder if its possible control the Point transparency using spmap: Code: spmap relig1 …
Need some helpIm working with a "Encuesta Permanente de Hogares" (EPH) can someone help me with something? …
Subscribe to:
Post Comments (Atom)
0 Response to Forloop to import multiple .sav files not working
Post a Comment