方程中未定义的控制序列

方程中未定义的控制序列

我已经加载了amsmath包。我无法获得负二项分布的质量函数。代码是:

\begin{equation*}

f(count_{i,t}|\lambda_{i,t},\theta_i) = 
{\Gamma(\lambda_{i,t} + count_{i,t})/{\Gamma(\lambda_{i,t})\Gamma(count_{i,t}+1)}}{(\theta_i/{1+\theta_i})}^count_{i,t} {(1/{1+\theta_i})}^\lamba_{i,t}

\end{equation*}

错误是:

[14] [15] [16] [17]
! Undefined control sequence.
l.380 ...})}^count_{i,t} {(1/{1+\theta_i})}^\lamba
                                                  _{i,t}

这就是我想要的方程式提前致谢!

答案1

\documentclass{article}
\usepackage{amsmath}

\begin{document}
This is your equation corrected:
\begin{equation*}
f(\mathrm{count}_{i,t}\mid\lambda_{i,t},\theta_i) = {\Gamma(\lambda_{i,t} + \mathrm{count}_{i,t})/{\Gamma(\lambda_{i,t})\Gamma(\mathrm{count}_{i,t}+1)}}{(\theta_i/{1+\theta_i})}^{\mathrm{count}_{i,t}}{(1/{1+\theta_i})}^{\lambda_{i,t}}
\end{equation*}
This is the equation from the image you've posted:
\begin{equation*}
f(y_{it}\mid\lambda_{it},\theta_i) = \frac{\Gamma(\lambda_{it} + y_{it})}{\Gamma(\lambda_{it})\Gamma(y_{it}+1)}\left(\frac{\theta_i}{1+\theta_i}\right)^{y_{it}}\left(\frac{1}{1+\theta_i}\right)^{\lambda_{it}}
\end{equation*}
\end{document}

相关内容