in the case that I want to run the analysis of a group of variables by quintiles and considering also a dummy (let's say gender), how could I write this command?
i define a local
local quint_sum num_employees time_psp furthest_loc_time
quintiles variable:prof_quint
dummy variable: gender
loop I am trying to use:
foreach x of numlist 1/5 {
foreach y of local operation_dec {
foreach k of varlist gender {
tab `y' if prof_quint==`x' & gender==`k'
}
}
}
Related Posts with nested loops
Moving Average in Time SeriesHi All, I want to calculate the backward 12-month moving average of bse_monthly_market_volatility. …
how to create a cross-tabulations, dummy variables and regression with wide dataCan someone help me with a syntax to use; on how to run cross tabulations, create dummy variables an…
Bar graph with multiple variables overlayingHello, I am wondering if it is possible to create a figure like this using stata. I have two variab…
how to create a cross-tabulation, dummy variables and regression with wide dataCan someone help me a syntax to use on how to i run cross tabulations, create dummy variables and ru…
Reshape with two types of ID variablesHi all, Is there a way to reshape by individual ID with another ID (household ID) as a variable, as …
Subscribe to:
Post Comments (Atom)
0 Response to nested loops
Post a Comment