diff --git a/run/iebaltab.do b/run/iebaltab.do index 5f7fc8b4..541f9336 100644 --- a/run/iebaltab.do +++ b/run/iebaltab.do @@ -387,7 +387,7 @@ restore /*************************************************************************** - Table 14 - test pair and f stats preferences + Table 14 - test showing no pair tests ***************************************************************************/ preserve @@ -412,4 +412,28 @@ ie_test_mat_nomiss, mat1(mat1) mat2(mat2) restore - + /*************************************************************************** + Table 15 - more test pair stats preferences + ***************************************************************************/ + preserve + + local tnum 15 + local csvfile "iebt-csv`tnum'" + local exlfile "iebt-xlsx`tnum'" + local texfile "iebt-tex`tnum'" + local txnfile "iebt-tex`tnum'-note" + + iebaltab weight price , grpvar(tmt_cl) replace /// + ftest control(1) /// + savecsv("${out_fldr}/`csvfile'") /// + savexlsx("${out_fldr}/`exlfile'") /// + savetex("${out_fldr}/`texfile'") /// + texnotefile("${out_fldr}/`txnfile'") /// + stats(pair(se)) /// + cov(mpg) fixed(foreign) + + * Test no regaular missing values in matrices + mat mat1 = r(iebaltabrmat) + mat mat2 = r(iebaltabfmat) + ie_test_mat_nomiss, mat1(mat1) mat2(mat2) + restore diff --git a/run/tex_masterfiles/iebaltab_tex_master.tex b/run/tex_masterfiles/iebaltab_tex_master.tex index 807da36f..d6594d62 100644 --- a/run/tex_masterfiles/iebaltab_tex_master.tex +++ b/run/tex_masterfiles/iebaltab_tex_master.tex @@ -181,4 +181,18 @@ \end{adjustbox} \end{table} +% Table 15 +\begin{table} + \centering + \caption{File iebt-tex15} + \begin{adjustbox}{max width=\textwidth} + \begin{threeparttable}[!h] + \input{../output/iebaltab/iebt-tex15.tex} + \begin{tablenotes}[flushleft] + \item\hspace{-.25em}\input{../output/iebaltab/iebt-tex15-note} + \end{tablenotes} + \end{threeparttable} + \end{adjustbox} +\end{table} + \end{document} \ No newline at end of file diff --git a/src/ado_files/iebaltab.ado b/src/ado_files/iebaltab.ado index 1d9b6dbc..445b0a61 100644 --- a/src/ado_files/iebaltab.ado +++ b/src/ado_files/iebaltab.ado @@ -972,6 +972,10 @@ qui { test `dummy_pair_`ttest_pair'' mat row[1,`++colindex'] = r(p) + *Store standard error and standard deviation + mat row[1,`++colindex'] = `se_this_pair' + mat row[1,`++colindex'] = `sd_this_pair' + *Calculate and store the normalized difference mat row[1,`++colindex'] = el(row,1,colnumb(row,"diff_`ttest_pair'")) / `sd_this_pair' } @@ -2025,7 +2029,7 @@ cap program drop setUpResultMatrix *Locals with stats names for each category local desc_stats = "n cl mean se sd" - local pair_stats = "diff n cl beta t p nrmd" + local pair_stats = "diff n cl beta t p se sd nrmd" local feq_stats = "feqn feqcl feqf feqp" local ftest_stats = "fn fcl ff fp" @@ -2110,7 +2114,7 @@ cap program drop parse_and_clean_stats local allowed_test_names "pair f feq" *List allowed test names - local allowed_pair_stats "diff beta nrmd t p none" + local allowed_pair_stats "diff beta t p nrmd se sd none" local allowed_f_stats "f p" local allowed_feq_stats "f p" @@ -2216,6 +2220,8 @@ cap program drop get_stat_label_stats_string local pair_nrmd_label "Normalized difference" local pair_t_label "t-statistics" local pair_p_label "P-value" + local pair_se_label "Standard error" + local pair_sd_label "Standard deviation" local pair_none_label "none" * F-test stat labels