Hello,
I would like to extract this code in a nice table format in Word (or Latex and even Excel):
However, I only get "individual" rows on Stata. How can I get a table for each of the above variables, so that it can be extracted?
I'm obviously open to improvements to this code, which surely has many errors. It seems to me that Nick Cox had already pointed out that "local" was not necessary in these cases, but I'm not sure (Please correct me if I have written atrocities, Nick Cox).
Thanks for the help.
I would like to extract this code in a nice table format in Word (or Latex and even Excel):
Code:
foreach var of varlist wasgach wasgeink wasfihan wasmfqe /// wasfach11 wasfort wasfawe wasmtza wasbeta wasfrei { * recode `var' (-1 -9 = .) //recoding missing variables==. enumerated in "var" * * // loop for Bachelor_hes only forvalues i = 0/3 { local ba_hes Bachelor_hes foreach c of local ba_hes { svy,subpop(`c'`i'):mean `var' } } * * // loop for Bachelor_heu only forvalues i=0/2{ local ba_heu Bachelor_heu foreach c of local ba_heu { svy,subpop(`c'`i'):mean `var' } } }
However, I only get "individual" rows on Stata. How can I get a table for each of the above variables, so that it can be extracted?
I'm obviously open to improvements to this code, which surely has many errors. It seems to me that Nick Cox had already pointed out that "local" was not necessary in these cases, but I'm not sure (Please correct me if I have written atrocities, Nick Cox).
Thanks for the help.
Comment