I am trying to recreate this table using LaTeX.
I want to additionally align the decimals. I have tried using this code to do so.
\begin{frame}
\frametitle{Table}
\begin{table}
\begin{tabular}{l *{4}{d{3.3}} }
\toprule
Variable & Weighted Test Statistic & Unweighted p-value & Weighted Test Statistic & Unweighted p-value\\
\midrule
Attendance Rate&0.55&0.0875&2.15&$<$0.0001\\
Test Average&4.14&0.0320&4.68&0.0080\\
Final Exam&4.12&0.0022&1.99&0.1590\\
\makecell{Data Analysis \\ Assignment Average}&20.98&$<$0.0001&17.42&$<$0.0001\\
Quiz Average&3.88&0.0035&2.33&0.0399\\
\bottomrule
\end{tabular}
\caption{Kruskal-Wallis Tests by Semester}
\end{table}
\end{frame}
This code created the following table. There are several things I would like to fix. Namely
- Adding fall and spring panels like in the original table
- Aligning the values associated with the "Data Analysis Assignment Average" at the top of that row
- Fixing the < signs
- Fixing the headings so that they can be within the bounds of a PowerPoint slide. I tried using the makecell{.} function but it didn't work the same as with the \midrule components.
Note: I wasn't sure what to title this question so feel free to change it.
Edit:
Using Zarko's code, I get the following.