Hi all,
I am trying to let Stata loop over only certain files ending with _p in one folder. The files meant are named "2004_c_y_cross_pers_data_p", the year however varies 2004 2006 2008 2012 etc. till 2018. I tried adjusting the syntax by adding this part files "*_cross_eu_silc_pers_data_p.dta" but something does not work. Any clue about the right syntax? Thanks!
cd "Y:\Cross\All_countries"
local statafiles : dir . files "*.dta
foreach file of local statafiles {
tab PB020 if PY000 <0
}
Array
Related Posts with Loop over certain stata files in one folder
Endogeneity with Hausman test?Hello all, I'm finishing up my master thesis and I received feedback that I should include something…
margins - factor variables may not contain noninteger valuesDear all, i want to create a marginsplot of the variables returnoninvestment and pat_yr but I got t…
Time-invariant industry effects strugglesDear all, I'm currently writing my pre-master thesis. For my thesis, I have panel data and ran a Ne…
Power for one group proportion where sample size is sufficient for lower 95%CI to be above a certain thresholdHi I am trying to replicate the sample size calculation from a 1:1 RCT. The sample size is based on…
import csv file to stataDear Statlisters, I have a folder that containf 40 csv files (OAEX1 to OAEX40). the first cilucolumn…
Subscribe to:
Post Comments (Atom)
0 Response to Loop over certain stata files in one folder
Post a Comment