[Tex/LaTex] Multiline regression equation in Latex

equations

Noob here. I'm trying to put together a multiline multivariate regression equation in Latex and am having some issues.

$ {Unit.Sales_t} = \alpha + \beta_{1} Date_{t} + \beta_{2}  Cable.TV_{t} + \beta_{3}  Int.Display_{t} + \beta_{4}  Local.Radio_{t} + \beta_{5}  Magazines_{t} + \beta_{6}  Network.TV_{t} + \beta_{7}  Spot.TV_{t} + \epsilon$

I'm trying to match the regression parameters so that it's not one long set of new lines. It should be something along the following lines.

Unit.Sales = A + B1 Date +
                 B2 Cable.TV +
                 B3 Int.Display +
....

Or some variation of the above type so that each predictor is on a separate line.

Best Answer

If you want the equations to be in display mode (i.e, set on their own line you can achieve your desired results with the align* environment:

enter image description here

Notes:

  • The mathtools package loads the amsmath and provides some fixes.

Code:

\documentclass{article}
\usepackage{mathtools}

\begin{document}
\begin{align*}
\mathrm{Unit.Sales}_{t} = \alpha 
    &+ \beta_{1}  \mathrm{Date}_{t} \\
    &+ \beta_{2}  \mathrm{Cable.TV}_{t}    \\
    &+ \beta_{3}  \mathrm{Int.Display}_{t} \\
    &+ \beta_{4}  \mathrm{Local.Radio}_{t} \\
    &+ \beta_{5}  \mathrm{Magazines}_{t}   \\
    &+ \beta_{6}  \mathrm{Network.TV}_{t}  \\
    &+ \beta_{7}  \mathrm{Spot.TV}_{t} + \epsilon
\end{align*}
\end{document}
Related Question