latex number listing as equation 1

latex number listing as equation

\begin{equation} \label{eq:lm.eq:lm.model}
    \text{\lstinline[language=R]|lm.model <- lm(Total.Score ~ Game.Num, data = sid1133)|}
\end{equation}

Here is what the above code is Doing:
1. We're creating a new variable called \lstinline[language=R]|lm.model|.
2. We're using the \lstinline[language=R]|lm()| function to create a linear model.
3. We're telling the \lstinline[language=R]|lm()| function that we want to predict \lstinline[language=R]|Total.Score| using \lstinline[language=R]|Game.Num|.
4. We're telling the \lstinline[language=R]|lm()| function to use the \lstinline[language=R]|sid1133| data frame.

We can now use the \lstinline[language=R]|summary()| function to get a summary of the model.

Similar Posts