\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{dsjac3} \pdfinfo{ /Title (econometrics.pdf) /Creator (Cheatography) /Author (dsjac3) /Subject (Econometrics Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{A3A3A3} \definecolor{LightBackground}{HTML}{F3F3F3} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{Econometrics Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{dsjac3} via \textcolor{DarkBackground}{\uline{cheatography.com/31611/cs/9635/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}dsjac3 \\ \uline{cheatography.com/dsjac3} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Not Yet Published.\\ Updated 31st October, 2016.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{multicols*}{2} \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{properties of OLS Matrix}} \tn % Row 0 \SetRowColor{LightBackground} Sum of Squared Residuals & (y − Xβˆ)′(y − Xβˆ) \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} & y′y − βˆ′X′y − y′Xβˆ + βˆ′X′Xβˆ \tn % Row Count 5 (+ 3) % Row 2 \SetRowColor{LightBackground} & y′y − 2βˆ′X′y + βˆ′X′Xβˆ \tn % Row Count 8 (+ 3) % Row 3 \SetRowColor{white} Minimise the SSR & ∂(SSR)/∂βˆ = −2X′y + 2X′Xβˆ = 0 \tn % Row Count 11 (+ 3) % Row 4 \SetRowColor{LightBackground} from the minimum we get: "normal equation" & (X′X)βˆ = X′y \tn % Row Count 14 (+ 3) % Row 5 \SetRowColor{white} Solve for OLS estimator βˆ; by pre multiplying both sides by (X′X) & \seqsplit{(X′X)−1(X′X)βˆ} = (X′X)−1X′y \tn % Row Count 18 (+ 4) % Row 6 \SetRowColor{LightBackground} by definition, (X′X)−1(X′X) = I & Iβˆ = (X′X)−1X′y \tn % Row Count 20 (+ 2) % Row 7 \SetRowColor{white} & βˆ = (X ′ X )−1 X ′ y \tn % Row Count 22 (+ 2) % Row 8 \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{{\bf{Properties}}} \tn % Row Count 23 (+ 1) % Row 9 \SetRowColor{white} The observed values of X are uncorrelated with the residuals. & X′e = 0 implies that for every column xk of X, x′ke = 0. \tn % Row Count 27 (+ 4) % Row 10 \SetRowColor{LightBackground} substitute in y = Xβˆ + e into normal equation & (X′X)βˆ = X′(Xβˆ + e) \tn % Row Count 30 (+ 3) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{properties of OLS Matrix (cont)}} \tn % Row 11 \SetRowColor{LightBackground} & (X′X)βˆ = (X′X)βˆ + X′e \tn % Row Count 2 (+ 2) % Row 12 \SetRowColor{white} & X′e = 0 \tn % Row Count 3 (+ 1) % Row 13 \SetRowColor{LightBackground} The sum of the residuals is zero. & If there is a constant, then the first column in X (i.e. X1) will be a column of ones. This means that for the first element in the X′e vector (i.e. X11 ×e1 +X12 ×e2 +...+X1n ×en) to be zero, it must be the case that ei = 0. \tn % Row Count 15 (+ 12) % Row 14 \SetRowColor{white} The sample mean of the residuals is zero. & e= ∑e i/n = 0. \tn % Row Count 18 (+ 3) % Row 15 \SetRowColor{LightBackground} The regression hyperplane passes through the means of the observed values (X and y). & This follows from the fact that e = 0. Recall that e = y − Xβˆ. Dividing by the number of observations, we get e = y − xβˆ = 0. This implies that y = xβˆ. This shows that the regression hyperplane goes through the point of means of the data. \tn % Row Count 31 (+ 13) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{properties of OLS Matrix (cont)}} \tn % Row 16 \SetRowColor{LightBackground} The predicted values of y are uncorrelated with the residuals. & ˆ′e = (Xβˆ)′e = b′X′e = 0 \tn % Row Count 4 (+ 4) % Row 17 \SetRowColor{white} \mymulticolumn{2}{x{8.4cm}}{The mean of the predicted Y's for the sample will equal the mean of the observed Y's : y\textasciicircum{}-=y-} \tn % Row Count 6 (+ 2) % Row 18 \SetRowColor{LightBackground} {\bf{The Gauss-Markov Theorem:}} Proof that βˆ is an unbiased estimator of β & βˆ = (X′X)\textasciicircum{}−1\textasciicircum{}X′y=(X′X)\textasciicircum{}−1\textasciicircum{}X′(Xβ + ε) \tn % Row Count 10 (+ 4) % Row 19 \SetRowColor{white} & β + (X′X)\textasciicircum{}−1\textasciicircum{}X′ε \tn % Row Count 12 (+ 2) % Row 20 \SetRowColor{LightBackground} given (X′X)\textasciicircum{}−1\textasciicircum{}X′X = I & E{[}βˆ{]} = E{[}β{]} + E{[}(X′X)\textasciicircum{}−1\textasciicircum{}X′ε{]} = β + (X′X)\textasciicircum{}−1\textasciicircum{}X′E{[}ε{]} \tn % Row Count 16 (+ 4) % Row 21 \SetRowColor{white} where E{[}X′ε{]}=0 & E{[}βˆ{]}=β \tn % Row Count 17 (+ 1) % Row 22 \SetRowColor{LightBackground} {\bf{Proof that βˆ is a linear estimator of β.}} & βˆ = β + (X′X)\textasciicircum{}−1\textasciicircum{}X′ε; where (X′X)\textasciicircum{}−1\textasciicircum{}X′= A \tn % Row Count 20 (+ 3) % Row 23 \SetRowColor{white} & βˆ = β + Aε =\textgreater{} linear equation \tn % Row Count 22 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{3.12 cm} x{4.88 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Hetroskedasticity}} \tn % Row 0 \SetRowColor{LightBackground} consequence: & the statistics used to test hypotheses under Gauss-Markov assumptions are not valid in the presence of hetroskedasticity. \tn % Row Count 6 (+ 6) % Row 1 \SetRowColor{white} Valid estimator (any form) & ∑{[}(x1- x-)\textasciicircum{}2\textasciicircum{} uˆi\textasciicircum{}2\textasciicircum{}{]}/{[}SST\textasciicircum{}2\textasciicircum{}x{]} \tn % Row Count 8 (+ 2) % Row 2 \SetRowColor{LightBackground} & SSTx=∑(x1- x-)\textasciicircum{}2\textasciicircum{} \tn % Row Count 9 (+ 1) % Row 3 \SetRowColor{white} Robust Standard error & Varˆ(βˆj)=∑{[}rˆij\textasciicircum{}2\textasciicircum{}û\textasciicircum{}2\textasciicircum{}i{]}/{[}SSR\textasciicircum{}2\textasciicircum{}j{]} \tn % Row Count 11 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Inference}} \tn % Row 0 \SetRowColor{LightBackground} Normality Assumption: & zero mean and Variance \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} & Var(u)= σ\textasciicircum{}2\textasciicircum{} \tn % Row Count 3 (+ 1) % Row 2 \SetRowColor{LightBackground} {\bf{T-test:}} & (βˆ j- β j)/se(βˆ j)\textasciitilde{} t n-k-1 =t df \tn % Row Count 5 (+ 2) % Row 3 \SetRowColor{white} H0 : βj = 0 & used in testing hypotheses about a single population parameter as in . \tn % Row Count 9 (+ 4) % Row 4 \SetRowColor{LightBackground} Test statistic & t βˆ j=(βˆ j)/se(βˆ j)\textasciitilde{} t n-k-1 \tn % Row Count 11 (+ 2) % Row 5 \SetRowColor{white} & t = (estimate − hypothesised value)/ standard error \tn % Row Count 14 (+ 3) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{{\bf{Alternative Hypothesis/one sided}}} \tn % Row Count 15 (+ 1) % Row 7 \SetRowColor{white} H1: βj \textgreater{} 0 & t βˆj \textgreater{} c {[}c @5\%{]} \tn % Row Count 16 (+ 1) % Row 8 \SetRowColor{LightBackground} H1: βj \textless{} 0 & t βˆj \textless{}- c {[}c @5\%{]} \tn % Row Count 17 (+ 1) % Row 9 \SetRowColor{white} \mymulticolumn{2}{x{8.4cm}}{{\bf{Two sided}}} \tn % Row Count 18 (+ 1) % Row 10 \SetRowColor{LightBackground} H1: βj =/= 0 & |tβˆj | \textgreater{} c {[}c @2.5\%{]} \tn % Row Count 20 (+ 2) % Row 11 \SetRowColor{white} If H0, rejected & x j is statistically significant, (significantly different from zero), @ the 5\% level \tn % Row Count 25 (+ 5) % Row 12 \SetRowColor{LightBackground} if H0, not rejected & x j is statistically insignificant @the 5\% level \tn % Row Count 28 (+ 3) % Row 13 \SetRowColor{white} P-value & smallest significant level at which the null hypotheses would be rejected \tn % Row Count 32 (+ 4) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Inference (cont)}} \tn % Row 14 \SetRowColor{LightBackground} {\bf{Confidence Interval}} & βˆj ±c·se(βˆj) \tn % Row Count 2 (+ 2) % Row 15 \SetRowColor{white} & where c is 97.5 percentile in a t n-k-1 distribution \tn % Row Count 5 (+ 3) % Row 16 \SetRowColor{LightBackground} CI given; @ 5\% significant level & H0 :βj =aj is rejected against H1:βj = ̸=aj ; if aj is not in the 95\% confidence interval \tn % Row Count 10 (+ 5) % Row 17 \SetRowColor{white} H0:β1\textless{}β2 ⇔ β1−β2\textless{}0 & t= (βˆ1−βˆ2) /se(βˆ1 − βˆ2) \tn % Row Count 12 (+ 2) % Row 18 \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{se(βˆ1 − βˆ2) = √Var(βˆ1 − βˆ2)} \tn % Row Count 13 (+ 1) % Row 19 \SetRowColor{white} & Var(βˆ1 − βˆ2) = Var(βˆ1) + Var(βˆ2) − 2Cov(βˆ1, βˆ2) \tn % Row Count 17 (+ 4) % Row 20 \SetRowColor{LightBackground} {\emph{alternative to calculating se(βˆ1 − βˆ2)}} & Let θ = βˆ1 − βˆ2; β1 = θ + βˆ2 \tn % Row Count 20 (+ 3) % Row 21 \SetRowColor{white} H0: θ=0, H1: θ\textless{}0 & Substituting β1 = θ + βˆ2 into the model we obtain \tn % Row Count 23 (+ 3) % Row 22 \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{β0 +θ x1 +β2(x1 +x2)+β3 x3 +u} \tn % Row Count 24 (+ 1) % Row 23 \SetRowColor{white} {\bf{F Test}} & \{\{noshy\}\} F ={[}(SSRr-SSRur )/q{]} / {[}SSRur/(n-k-1){]} \tn % Row Count 27 (+ 3) % Row 24 \SetRowColor{LightBackground} q & =number of restrictions \tn % Row Count 29 (+ 2) % Row 25 \SetRowColor{white} n-k-1= df ur & = df r- df ur \tn % Row Count 30 (+ 1) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Inference (cont)}} \tn % Row 26 \SetRowColor{LightBackground} {\bf{R\textasciicircum{}2\textasciicircum{} F stat}} & SSR= SST(1 - R\textasciicircum{}2\textasciicircum{} ) \tn % Row Count 1 (+ 1) % Row 27 \SetRowColor{white} & \{\{noshy\}\} F= {[}(R\textasciicircum{}2\textasciicircum{}ur-R\textasciicircum{}2\textasciicircum{}r)/q{]} / {[}1-R\textasciicircum{}2\textasciicircum{}ur)/(df ur){]} \tn % Row Count 4 (+ 3) % Row 28 \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{remember to not square the R value thats already been done} \tn % Row Count 6 (+ 2) % Row 29 \SetRowColor{white} \mymulticolumn{2}{x{8.4cm}}{Overall significance of the regression} \tn % Row Count 7 (+ 1) % Row 30 \SetRowColor{LightBackground} Testing joint exclusion & {[}R\textasciicircum{}2\textasciicircum{}/R{]}/{[}(1-R\textasciicircum{}2\textasciicircum{})/(n-k-1){]} \tn % Row Count 9 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{3.52 cm} x{4.48 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Data Scaling}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{Changes:} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} if Xj is * by c & Its coefficient is / by c \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} If dependant variable is * by c & ALL OLS coefficients are * by c \tn % Row Count 5 (+ 2) % Row 3 \SetRowColor{white} \mymulticolumn{2}{x{8.4cm}}{neither t nor F statistics are affected} \tn % Row Count 6 (+ 1) % Row 4 \SetRowColor{LightBackground} Beta coefficients & obtained from an OLS regression after the dependant and independent variables have been transformed into z-scores \tn % Row Count 12 (+ 6) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Dummy Variables}} \tn % Row 0 \SetRowColor{LightBackground} \{\{noshy\}\}Dummy/Binary Variables & = yes/no variables \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} & = take on the values 0 and 1 to identify the mutually exclusive classes of the explanatory variables. \tn % Row Count 8 (+ 6) % Row 2 \SetRowColor{LightBackground} & = leads to regression models where the parameters have very natural interpretations \tn % Row Count 13 (+ 5) % Row 3 \SetRowColor{white} \mymulticolumn{2}{x{8.4cm}}{Given: wage= β0+ ∂0 female + β1 edu + u} \tn % Row Count 14 (+ 1) % Row 4 \SetRowColor{LightBackground} & To solve for ∂0: \tn % Row Count 15 (+ 1) % Row 5 \SetRowColor{white} & ∂0=E(wage|female,edu)-E(wage|male,edu) \tn % Row Count 17 (+ 2) % Row 6 \SetRowColor{LightBackground} & where level of education is the same \tn % Row Count 19 (+ 2) % Row 7 \SetRowColor{white} Graphically ∂0 = & an intercept shift \tn % Row Count 20 (+ 1) % Row 8 \SetRowColor{LightBackground} & male intercept= β0 \tn % Row Count 21 (+ 1) % Row 9 \SetRowColor{white} & female intercept= β0+∂0 \tn % Row Count 23 (+ 2) % Row 10 \SetRowColor{LightBackground} \{\{noshy\}\}dummy variable trap= & when both dummy variables (male \& female) are included; resulting in perfect collinearity \tn % Row Count 28 (+ 5) % Row 11 \SetRowColor{white} \{\{noshy\}\}If a qualitative variable has m levels; & then (m−1) dummy variables are required and each of them takes value 0 and 1. \tn % Row Count 32 (+ 4) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Dummy Variables (cont)}} \tn % Row 12 \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{{\bf{Hypothesis test}}} \tn % Row Count 1 (+ 1) % Row 13 \SetRowColor{white} \mymulticolumn{2}{x{8.4cm}}{Test whether the two regression models are identical:} \tn % Row Count 3 (+ 2) % Row 14 \SetRowColor{LightBackground} & H0 :β2 =β3 0 \tn % Row Count 4 (+ 1) % Row 15 \SetRowColor{white} & H1 :β2 ≠0 and/or β3 ≠0. \tn % Row Count 6 (+ 2) % Row 16 \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{Acceptance of H0 indicates that only single model is necessary to explain the relationship.} \tn % Row Count 8 (+ 2) % Row 17 \SetRowColor{white} \mymulticolumn{2}{x{8.4cm}}{Test is two models differ with respect to intercepts only and they have same slopes} \tn % Row Count 10 (+ 2) % Row 18 \SetRowColor{LightBackground} & H0 :β3 =0 \tn % Row Count 11 (+ 1) % Row 19 \SetRowColor{white} & H1:β3 ≠0. \tn % Row Count 12 (+ 1) % Row 20 \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{Treating a {\bf{quantitative variable}} as qualitative variable increases the complexity of the model.} \tn % Row Count 14 (+ 2) % Row 21 \SetRowColor{white} & The degrees of freedom for error are reduced. \tn % Row Count 17 (+ 3) % Row 22 \SetRowColor{LightBackground} & Can effect the inferences if data set is small \tn % Row Count 20 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}