I did a linear regression model (OLS) and a spatial autoregressive model (Spatial lag). I read that for comparing these models I need to use the Akaike information criterion (AIC). The formula is the following $$ AIC=-2log L(\hat\theta)+2k $$ where $\theta$ is the vector of model parameters, $L(\hat\theta)$ is the likelihood of the candidate model given the data when evaluated at the maximum likelihood estimate of $\theta$ and $k$ is the number of estimated parameters in the candidate model.
But I don't understand what parameters $\theta$ are necessary to use AIC in a linear regression context. For example, if I have a model like this $Y=\beta_0+\beta_1X_1+\beta_2X_2+...+\beta_nX_n+\epsilon$ where $\epsilon$ is a normal variable with zero mean and variance $\sigma$ How do I calculate its AIC?