\documentclass[a4paper]{article}

%\usepackage[left=1.25in,top=1in,right=1.25in,nohead,nofoot]{geometry}

\oddsidemargin 0.0in \textwidth 6.5in \topmargin -0.1in \textheight
9.0in


\usepackage{tabularx}

% symbols like \Telefon, \Mobilefone, \Letter and \Email
\usepackage{marvosym}

% package to have clickable website links
%\usepackage[pdftex]{hyperref}
\usepackage{hyperref}
\hypersetup{colorlinks,%
citecolor=red,%
filecolor=red,%
linkcolor=red,%
urlcolor=blue,%
pdftex}

% page numbers
\pagenumbering{arabic}
\usepackage{amsmath}

% multicolumns
\usepackage{palatino, url, multicol}
% setting up links to email
%\renewcommand\UrlLeft{<url: }
%\renewcommand\UrlRight{>}
%\DeclareUrlCommand\email{\urlstyle{rm}%
% \renewcommanad\UrlLeft{e-mail: \  }%
% \renewcommand\UrlRight{}}
\newcommand\email{\begingroup \urlstyle{rm}\Url}


%\usepackage{doublespace}
%\setstretch{1.2}

\usepackage{ae}
\usepackage[T1]{fontenc}
%Define how sections should be laid out
\makeatletter
\renewcommand{\section}{\@startsection{section}{12}
{0mm} % Einzug
{.5\baselineskip} % Vorabstand
{0.2\baselineskip} % Nachabstand
{\large \scshape{\vspace{0.3\baselineskip}}}}
%{\bfseries \scshape \large{\vspace{0.3\baselineskip}}}}
\makeatother

\begin{document}

%\pagestyle{empty}


%Ueberschrift
\begin{center}
\large  \textsc {Step by step guide for reading in data to calibrate depreciation parameters}\\
\small{Feel free to improve, but here's one algorithm...}\\
\end{center}
\vspace{.5\baselineskip}


\begin{enumerate}
\item Create crosswalks for industry codes:
	\begin{enumerate}
	\item From the BEA detailed fixed asset tables industry code worksheet, create a data frame (or dictionary object) like Table \ref{tab:step1a}:
	
	% Table generated by Excel2LaTeX from sheet 'Step1a'
\begin{table}[h!]
  \centering
  \caption{}
    \begin{tabular}{rr}
   \underline{naics} & \underline{bea\_ind\_code} \\
  3-digit naics code & corresponding bea code \\
   ...     & ... \\
    \end{tabular}%
  \label{tab:step1a}%
\end{table}%
	
	\item From the SOI Corporate Source Book metadata page with industry classifications, create a data frame (or dictionary object) like Table \ref{tab:step1b}:
	
	% Table generated by Excel2LaTeX from sheet 'Step1b'
\begin{table}[h!]
  \centering
  \caption{}
    \begin{tabular}{rrr}
    
    \underline{naics} & \underline{soi\_ind\_code} & \underline{soi\_ind\_name} \\
    
    naics code- various levels & corresponding soi code & string var for soi name \\
    ...     & ...     & ... \\
    
    \end{tabular}%
  \label{tab:step1b}%
\end{table}%


	
	\item Create some kind of structure (maybe a ``tree", as you described) to relate parent and sibling NAICS codes so one can easily aggregate/disaggregate industry categories when creating future tables.  With this, you might just need a list of NAICS codes that correspond to each of the 24 industry categories we will want to use (though the tree might be better).
	\end{enumerate}
\item Read in the IRS c corporation data
	\begin{enumerate}
	\item When read in, you'll want to merge in NAICS codes from 1b.
	\item Use the aggregation rules from 1c to aggregate/disaggregate to the 24 NAICS categories we'll use.
	\item A data frame like Table \ref{tab:step2} should be created:
	
	% Table generated by Excel2LaTeX from sheet 'Step2'
\begin{table}[h!]
  \centering
  \caption{}
    \begin{tabular}{rrrr}
    
   \underline{naics} & \underline{fa}    & \underline{inv}   & \underline{land} \\
    
    1     & $FA^{\tau}_{1,corp}$ & $INV^{\tau}_{1,corp}$ & $LAND^{\tau}_{1,corp}$ \\
    2     & $FA^{\tau}_{2,corp}$ & $INV^{\tau}_{2,corp}$ & $LAND^{\tau}_{2,corp}$ \\
    ...     & ...     & ...     & ... \\
    24    & $FA^{\tau}_{24,corp}$ & $INV^{\tau}_{24,corp}$ & $LAND^{\tau}_{24,corp}$ \\
    
    \end{tabular}%
  \label{tab:step2}%
\end{table}%

	
	\end{enumerate}
\item Follow Step 2 for the s corporation, partnership, sole proprietorship, and farm proprietorship data
	\begin{itemize}
	\item Note that some of these returns have some special instructions that I'm not including here.
	\item You'll end this step with data frames for each tax entity type that have the same format as Table \ref{tab:step2}.
	\end{itemize}
\item Use the data frames from Step 2 and 3 together to create a table like Table \ref{tab:step4}:

% Table generated by Excel2LaTeX from sheet 'Step4'
\begin{table}[h!]
  \centering
  \caption{}
    \begin{tabular}{rrrrrrr}
    
    \underline{naics} & \underline{fa\_corp} & \underline{fa\_noncorp} & \underline{inv\_corp} & \underline{inv\_noncorp} & \underline{land\_corp} & \underline{land\_noncorp} \\
    
    1     & $FA^{\tau}_{1,c}$ & $FA^{\tau}_{1,nc}$ & $INV^{\tau}_{1,c}$ & $INC^{\tau}_{1,nc}$ & $LAND^{\tau}_{1,c}$ & $LAND^{\tau}_{1,nc}$ \\
    2     & $FA^{\tau}_{2,c}$ & $FA^{\tau}_{2,nc}$ & $INV^{\tau}_{2,c}$ & $INV^{\tau}_{2,nc}$ & $LAND^{\tau}_{2,c}$ & $LAND^{\tau}_{2,nc}$ \\
    ...    & ...     & ...    & ...     & ...     & ...     & ... \\
    24    & $FA^{\tau}_{24,c}$ & $FA^{\tau}_{24,nc}$ & $INV^{\tau}_{24,c}$ & $INV^{\tau}_{24,nc}$ & $LAND^{\tau}_{24,c}$ & $LAND^{\tau}_{24,nc}$ \\
    
    \end{tabular}%
  \label{tab:step4}%
\end{table}%


\item From the data from created in Step 4, create another data frame with the ratio of assets in each industry attributed to the corporate and noncoroporate tax treatment.  The data frame will look like Table \ref{tab:step5}:

% Table generated by Excel2LaTeX from sheet 'Step5'
\begin{table}[h!]
  \centering
  \caption{}
    \begin{tabular}{rrrrrrr}
    
    \underline{naics} & \underline{fa\_ratio\_corp} & \underline{fa\_ratio\_noncorp} & \underline{inv\_ratio\_corp} & \underline{inv\_ratio\_noncorp} & \underline{land\_ratio\_corp} & \underline{land\_ratio\_noncorp} \\
    
    1     & $\frac{FA^{\tau}_{1,c}}{FA^{\tau}_{1}}$ & $\frac{FA^{\tau}_{1,nc}}{FA^{\tau}_{1}}$ & $\frac{INV^{\tau}_{1,c}}{INV^{\tau}_{1}}$ & $\frac{INV^{\tau}_{1,nc}}{INV^{\tau}_{1}}$ & $\frac{LAND^{\tau}_{1,c}}{LAND^{\tau}_{1}}$ & $\frac{LAND^{\tau}_{1,nc}}{LAND^{\tau}_{1}}$ \\
    2     & $\frac{FA^{\tau}_{2,c}}{FA^{\tau}_{2}}$ & $\frac{FA^{\tau}_{2n,c}}{FA^{\tau}_{2}}$ & $\frac{INV^{\tau}_{2,c}}{INV^{\tau}_{2}}$ & $\frac{INV^{\tau}_{2n,c}}{INV^{\tau}_{2}}$ & $\frac{LAND^{\tau}_{2,c}}{LAND^{\tau}_{2}}$ & $\frac{LAND^{\tau}_{2n,c}}{LAND^{\tau}_{2}}$ \\
    ...     & ...    & ...     & ...     & ...     & ...     & ... \\
    24    & $\frac{FA^{\tau}_{24,c}}{FA^{\tau}_{24}}$ & $\frac{FA^{\tau}_{24,nc}}{FA^{\tau}_{24}}$ & $\frac{INV^{\tau}_{24,c}}{INV^{\tau}_{24}}$ & $\frac{INV^{\tau}_{24,nc}}{INV^{\tau}_{24}}$ & $\frac{LAND^{\tau}_{24,c}}{LAND^{\tau}_{24}}$ & $\frac{LAND^{\tau}_{24,nc}}{LAND^{\tau}_{24}}$ \\
    
    \end{tabular}%
  \label{tab:step5}%
\end{table}%


\item Read in the BEA detailed fixed asset tables (a worksheet for each industry).  
	\begin{enumerate}
	\item When read in, you'll want to merge in NAICS codes from 1a.
	\item Use the aggregation rules from 1c to aggregate/disaggregate to the 24 NAICS categories we'll use.
	\item A data frame like Table \ref{tab:step6} should be created:
	
	% Table generated by Excel2LaTeX from sheet 'Step6'
\begin{table}[h!]
  \centering
  \caption{}
    \begin{tabular}{rrrrr}
    
    \underline{bea\_asset\_code} & \underline{naics\_1} & \underline{naics\_2} & ...     & \underline{naics\_24} \\
    
    1     & $FA_{1,1}$ & $FA_{1,2}$ & ...     & $FA_{1,24}$ \\
    2     & $FA_{2,1}$ & $FA_{2,2}$ & ...    & $FA_{2,24}$ \\
    ...   & ...     & ...     & ...     & ... \\
    $J$   & $FA_{J,1}$ & $FA_{J,2}$ & ...     & $FA_{J,24}$ \\
    
    \end{tabular}%
  \label{tab:step6}%
\end{table}%
	
	\end{enumerate}
\item Use the data frames from Step 5 (ratios of assets to corp/noncorp by industry) and 6 (amounts of FAs by asset type and industry) together to create a table like Table \ref{tab:step7}:

	% Table generated by Excel2LaTeX from sheet 'Step7'
\begin{table}[h!]
  \centering
  \caption{}
    \begin{tabular}{rrrrrrrr}
    
    \underline{bea\_asset\_code} & \underline{naics\_1\_corp} & \underline{naics\_1\_noncorp} & \underline{naics\_2\_corp} & \underline{naics\_2\_noncorp} & ...     & \underline{naics\_24\_corp} & \underline{naics\_24\_noncorp} \\
    
    1     & $FA_{1,1,c}$ & $FA_{1,1,nc}$ & $FA_{1,2,c}$ & $FA_{1,2,nc}$ & ...    & $FA_{1,24,c}$ & $FA_{1,24,nc}$ \\
    2     & $FA_{2,1,c}$ & $FA_{2,1,nc}$ & $FA_{2,2,c}$ & $FA_{2,2,nc}$ & ...     & $FA_{2,24,c}$ & $FA_{2,24,nc}$ \\
    ...     & ...     & ...     & ...     & ...   & ...     & ...     & ... \\
    $J$   & $FA_{J,1,c}$ & $FA_{J,1,nc}$ & $FA_{J,2,c}$ & $FA_{J,2,nc}$ & ...     & $FA_{J,24,c}$ & $FA_{J,24,nc}$ \\
    
    \end{tabular}%
  \label{tab:step7}%
\end{table}%

	
	\begin{itemize}
	\item You might create two different data frames for these data
	\item Or you might create a 3-dimensional array for these data
	\end{itemize}
\item Read in the economic depreciation rates from the BEA to create a table like Table \ref{tab:step8}:
	
	% Table generated by Excel2LaTeX from sheet 'Step8'
\begin{table}[h!]
  \centering
  \caption{}
    \begin{tabular}{rr}
    
    \underline{bea\_asset\_code} & \underline{delta} \\
    
    1     & $\delta_{1}$ \\
    2     & $\delta_{2}$ \\
    ...     & ...  \\
    $J$   & $\delta_{J}$ \\
    
    \end{tabular}%
  \label{tab:step8}%
\end{table}%


	\begin{itemize}
	\item When read in, you might have to merge with BEA asset codes from the detailed fixed asset tables (thus you'll need to create a crosswalk for asset codes used in the detailed fixed asset tables vs. the codes used in the BEA's estimated depreciation rates.
	\end{itemize}
\item Use the data frames created in Steps 8 and 9 (and the weighted average calculation) to produces a data frame with the format of Table \ref{tab:step9}.  This is what will be read into the dynamic model.
	
	% Table generated by Excel2LaTeX from sheet 'Step9'
\begin{table}[h!]
  \centering
  \caption{}
    \begin{tabular}{rrr}

    \underline{naics} & \underline{delta\_corp} & \underline{delta\_noncorp} \\

    1     & $\delta_{1,c}$ & $\delta_{1,nc}$ \\
    2     & $\delta_{2,c}$ & $\delta_{2,nc}$ \\
    ...    & ...    & ... \\
    24    & $\delta_{24,c}$ & $\delta_{24,nc}$ \\

    \end{tabular}%
  \label{tab:step9}%
\end{table}%


\end{enumerate}

\end{document}