Hi dear Statalisters,
I was wondering if there is any way to get Stata to pick every second variable of a specified list in varlist of a loop command?
Specifically, I would like to use -foreach of varlist-, but indicate stata to skip every second var and take the first, third, fifth and so on.. from the list.
Is there any smart way to do it?
Many thanks for any suggestions!
Related Posts with how to get foreach of varlist v1-v10 take every second variable from the specified set (v1 v3 v5...)?
Creating new variable (subtracting) same individualHi, I am using individual-level dataset across 4 years to try and calculate the mobility out of low…
Cox model with an unbalanced panelHello everyone, I'm running a cox model with an unbalanced panel from 2015-2021 to measure the fact…
Matching data over time?Hello, I have a sample from the Current Population Survey (CPS). My data is monthly from 2015-prese…
vlookup generates same idI read the thread on Complicated Vlookup-type problem in a large dataset. I am facing a similar pro…
When including interacted fixed effects, do I also have to include each fixed effects separately in the model?When including interacted fixed effects, do I also have to include each fixed effects separately in …
Subscribe to:
Post Comments (Atom)
0 Response to how to get foreach of varlist v1-v10 take every second variable from the specified set (v1 v3 v5...)?
Post a Comment