\documentclass{article}
\usepackage{graphicx} % Required for inserting images
\usepackage{amsmath} % package to write math equations
\usepackage{setspace}
\usepackage{natbib}

\title{APSA Workshop} % title of doc
\author{Alejandra López Villegas} % sets author
\date{September 2024} % sets date

\begin{document}
\maketitle % puts title, author, and date in the document
\section{Introduction} % command to create new section, if you use * before {, it removes the number

\subsection{Writing math equations}

We want to type some math... 2+2=4\\

Or... $2+2=4$\\

Or something more complex... $y_i=\beta_0+\beta_1x_i+\epsilon_i$\\

\subsection{Creating lists}

\begin{itemize}
    \item Item 1
    \item Item 2
    \item Item 3
\end{itemize}

\subsection{Spacing}

\setstretch{1}
This is a sample paragraph. I am a political scientist. I study democracy and gender. I am a Ph.D. Candidate. I live in Michigan. This paragraph will have single line spacing. 

\setstretch{2}
This is a sample paragraph. I am a political scientist. I study democracy and gender. I am a Ph.D. Candidate. I live in Michigan. This paragraph will have double line spacing. 

\setstretch{1}
\subsection{Tables}

\begin{tabular}{c|c}
   a  & b \\ % & indicates separation between columns, \\ indicates next row
   \hline % creates line between rows
   c  & d
\end{tabular}

\subsection{Figures}

\begin{figure}[h] %[h] positions the figure where we want it
    \includegraphics[scale=.5]{APSA.png}
\end{figure}

\subsection{Bibliography}
Imagine we want to cite a book in paragraph \citet{king2021designing}. Or we may just want to reference it in the end of the sentence \citep{king2021designing}.\\

\begin{table}[!htbp] \centering 
  \caption{} 
  \label{} 
\begin{tabular}{@{\extracolsep{5pt}}lc} 
\\[-1.8ex]\hline 
\hline \\[-1.8ex] 
 & \multicolumn{1}{c}{\textit{Dependent variable:}} \\ 
\cline{2-2} 
\\[-1.8ex] & dist \\ 
\hline \\[-1.8ex] 
 speed & 3.932$^{***}$ \\ 
  & (0.416) \\ 
  & \\ 
 Constant & $-$17.579$^{**}$ \\ 
  & (6.758) \\ 
  & \\ 
\hline \\[-1.8ex] 
Observations & 50 \\ 
R$^{2}$ & 0.651 \\ 
Adjusted R$^{2}$ & 0.644 \\ 
Residual Std. Error & 15.380 (df = 48) \\ 
F Statistic & 89.567$^{***}$ (df = 1; 48) \\ 
\hline 
\hline \\[-1.8ex] 
\textit{Note:}  & \multicolumn{1}{r}{$^{*}$p$<$0.1; $^{**}$p$<$0.05; $^{***}$p$<$0.01} \\ 
\end{tabular} 
\end{table} 



\bibliographystyle{apsr} %sets bibliography style 
\bibliography{bibliography} %automatically generates references


\end{document}

