Hi all,
I am running the "orth_out" command in Stata 18 to conduct a series of balance tests for an experimental study. The codes based on the help file is simple, but I keep running into "variable __000000 already defined" errors. This happens even if I replace the local with a single variable's name. When I test out the orth_out command using the auto dataset, "orth_out mpg, by(foreign)", the code runs fine. Any help would be much appreciated. Thanks!
Below are my codes:
* Preliminary steps
clear all
set more off
cap log close
* Import data
use "clean data/mkv_ng_men_merged_na.dta", clear
* Balance test
// macro drop _all
local ctrl dem_literacy_ws_pre dem_age_ws_pre dem_marital_otherwives_ws_pre ///
dem_household_size_ws_pre dem_children_ws_pre assets_index_ws_pre ///
dem_religion_ws_pre dem_religiosity_ws_pre dem_education_ws_pre ///
dem_hh_income_ws_pre dem_personal_income_ws_pre
orth_out `ctrl' using "tables/balancetest.tex", by(treatment) proportion ///
test se replace latex
exit, clear
I am running the "orth_out" command in Stata 18 to conduct a series of balance tests for an experimental study. The codes based on the help file is simple, but I keep running into "variable __000000 already defined" errors. This happens even if I replace the local with a single variable's name. When I test out the orth_out command using the auto dataset, "orth_out mpg, by(foreign)", the code runs fine. Any help would be much appreciated. Thanks!
Below are my codes:
* Preliminary steps
clear all
set more off
cap log close
* Import data
use "clean data/mkv_ng_men_merged_na.dta", clear
* Balance test
// macro drop _all
local ctrl dem_literacy_ws_pre dem_age_ws_pre dem_marital_otherwives_ws_pre ///
dem_household_size_ws_pre dem_children_ws_pre assets_index_ws_pre ///
dem_religion_ws_pre dem_religiosity_ws_pre dem_education_ws_pre ///
dem_hh_income_ws_pre dem_personal_income_ws_pre
orth_out `ctrl' using "tables/balancetest.tex", by(treatment) proportion ///
test se replace latex
exit, clear

Comment