I am creating a table in Beamer, and there is one question that really bothers me. The following code works well in MiKTeX, but it does not work in Beamer. Anyone could tell me why? By the way, these codes are generated by Stata. Thank you.
My code looks like this:
Code: Select all
\documentclass[12pt]{beamer}
\usetheme{CambridgeUS}
\usefonttheme{professionalfonts}
\usepackage{amsmath}
\usepackage{booktabs}
\usepackage{ctable}
\begin{document}
\begin{frame}
\def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}
\ctable[
caption=2000 Black Results from Second Step of Residential Sorting Model,
nosuper,
notespar,
label=secondstep2000b
]
{@{} l*{9}{c} @{}}
{\tnote[Notes:]{P value of Hansen’s J Statistics tests the overidentifying restrictions in the presence of heterogeneity. F statistics test the joint significance of excluded instruments in the first stage under the assumption of heterogeneity. Robust Standard errors adjusted for heterogeneity in parentheses\\
\sym{*} \(p<0.10\), \sym{**} \(p<0.05\), \sym{***} \(p<.01\)
}}
{
\toprule
&\multicolumn{1}{c}{(1)}&\multicolumn{1}{c}{(2)}&\multicolumn{1}{c}{(3)}&\multicolumn{1}{c}{(4)}&\multicolumn{1}{c}{(5)}&\multicolumn{1}{c}{(6)}&\multicolumn{1}{c}{(7)}&\multicolumn{1}{c}{(8)}&\multicolumn{1}{c}{(9)}\\
&\multicolumn{1}{c}{OLS}&\multicolumn{1}{c}{OLS}&\multicolumn{1}{c}{Fiscal 2SLS}&\multicolumn{1}{c}{Fiscal 2SLS}&\multicolumn{1}{c}{Topographic 2SLS}&\multicolumn{1}{c}{Topographic 2SLS}&\multicolumn{1}{c}{RDI 2SLS}&\multicolumn{1}{c}{RDI 2SLS}&\multicolumn{1}{c}{Preferred 2SLS}\\
\midrule
ln(dissimilarity index)& -1.161\sym{***}& -0.899\sym{***}& -2.197\sym{***}& -2.234\sym{***}& -1.039 & -2.609\sym{*} & -0.196 & -0.546 & -2.241\sym{***}\\
& (0.204) & (0.161) & (0.372) & (0.372) & (1.243) & (1.348) & (1.059) & (1.100) & (0.372) \\
\addlinespace
ln(population) & 0.919\sym{***}& 1.051\sym{***}& 0.992\sym{***}& 1.094\sym{***}& 0.919\sym{***}& 1.088\sym{***}& 1.111\sym{***}& 1.106\sym{***}& 1.094\sym{***}\\
& (0.0474) & (0.0449) & (0.0564) & (0.0522) & (0.0849) & (0.0638) & (0.0501) & (0.0698) & (0.0522) \\
\addlinespace
ln(black share) & 0.874\sym{***}& 0.806\sym{***}& 0.885\sym{***}& 0.871\sym{***}& 0.810\sym{***}& 0.907\sym{***}& 0.239 & 0.497\sym{*} & 0.871\sym{***}\\
& (0.0661) & (0.0555) & (0.0772) & (0.0725) & (0.113) & (0.123) & (0.265) & (0.270) & (0.0726) \\
\addlinespace
ln(population density)& & -0.190\sym{***}& & -0.0755 & & -0.0753 & & -0.128 & -0.0749 \\
& & (0.0679) & & (0.0871) & & (0.119) & & (0.158) & (0.0868) \\
\addlinespace
ln(college share)& & 1.570\sym{***}& & 1.357\sym{***}& & 1.440\sym{***}& & 1.049\sym{***}& 1.357\sym{***}\\
& & (0.202) & & (0.249) & & (0.259) & & (0.345) & (0.249) \\
\addlinespace
ln(gini) & & -2.527\sym{***}& & -1.627 & & -1.449 & & -2.068 & -1.624 \\
& & (0.792) & & (0.997) & & (1.196) & & (2.002) & (0.998) \\
\addlinespace
ln(median household income)& & -2.513\sym{***}& & -2.248\sym{***}& & -2.168\sym{***}& & -0.777 & -2.248\sym{***}\\
& & (0.418) & & (0.514) & & (0.554) & & (0.826) & (0.515) \\
\addlinespace
ln(manufacturing share)& & 0.110 & & 0.350\sym{***}& & 0.359 & & 0.0316 & 0.351\sym{***}\\
& & (0.0893) & & (0.120) & & (0.226) & & (0.241) & (0.120) \\
\addlinespace
Constant & 3.364\sym{***}& 28.45\sym{***}& 6.564\sym{***}& 30.89\sym{***}& 2.764 & 31.97\sym{***}& -4.796 & 6.088 & 30.92\sym{***}\\
& (0.841) & (4.106) & (1.333) & (5.066) & (4.244) & (6.349) & (4.991) & (10.65) & (5.058) \\
\midrule
Observations & 210 & 210 & 184 & 184 & 198 & 198 & 60 & 60 & 184 \\
Adjusted \(R^{2}\)& 0.699 & 0.790 & 0.667 & 0.726 & 0.719 & 0.714 & 0.771 & 0.797 & 0.725 \\
P\_value\_of\_Hansen\_J& & & 0.00147 & 0.240 & 0.0104 & 0.299 & & & 0.447 \\
F\_statistics & & & 29.98 & 26.17 & 2.946 & 2.363 & 5.635 & 3.744 & 13.48 \\
\bottomrule
}
\end{frame}
\end{document}