# Presenting a long linear regression equation

I am using the following code to have a long linear regression model in my two-column latex file. I have used figure * to avoid the overlapping of the equation with the second column. However, it doesn't look good to me. Could you please suggest me any better way for this.

\begin{figure*}[!t]
$$\label{eq:sf} ua = (49.3) + (-13 * m\_a) + (-0.4 * k\_a) + (-1 * l\_b) + (8 * t\_b) + (-9 * s\_a)$$
\end{figure*}

-
Your code snippet won't compile (after suitable completion) since you are enclosing the equation inside a \mbox. Can you please add turn your code snippet into a minimal compilable example? (Please add the document class used and any relevant package). – Gonzalo Medina Aug 1 '11 at 21:35
@Gonzalo: Could you please check now? – samarasa Aug 1 '11 at 21:54
But you haven't provided the document class used. – Gonzalo Medina Aug 1 '11 at 22:02
@Gonzalo: ACM sig-alternate class. – samarasa Aug 1 '11 at 22:11
Then put it in your example so that people can copy and paste it. – Alfred M. Jul 21 '12 at 10:07

I am not sure exactly what the problem is, but does this help:

\documentclass{article}
\usepackage{amsmath}
\usepackage{mathtools}

\newcommand{\op}{\,*\,}% Use \: instead of \, if you want larger space

\begin{document}
\begin{figure*}[!t]
\begin{align}
ua = (49.3) + (-13 * m\_a) + (-0.4 * k\_a) \notag\\
\phantom{=}+ (-1 * l\_b) + (8 * t\_b) + (-9 * s\_a) \label{eq:sf}
\end{align}

\begin{align}
ua = (49.3) + (-13 \op m\_a) + (-0.4 \op k\_a) \notag\\
\phantom{=}+ (-1 \op l\_b) + (8 \op t\_b) + (-9 \op s\_a) \label{eq:sf}
\end{align}

\end{figure*}
\end{document}


If you are looking to automatically break the equation that is a bit more complicated, and perhaps the breqn package may be useful to look into.

-
Thanks. Could you also help me to provide some space between the * operator and variables. – samarasa Aug 1 '11 at 22:18
See updated solution. Is this what you are looking for? – Peter Grill Aug 1 '11 at 22:25
Thank you for the code. – samarasa Aug 1 '11 at 22:28

This may help:

$$\begin{split} ua =& (49.3) \\ &+ (-13 * m\_a) \\ &+ (-0.4 * k\_a) \\ &+ (-1 * l\_b) \\ &+ (8 * t\_b) \\ &+ (-9 * s\_a) \end{split}$$


You have to \usepackage{amsmath} in the preamble.

The Short Math Guide introduces in page 2 other useful environments for formatting equations.

-
Thank you for this simple and good solution. – samarasa Aug 2 '11 at 2:45