My likelihood function is of the form:
\[ L_t = N_t \ln\theta + \ln\Gamma\left(\frac{1}\theta+N_t\right)-\ln\Gamma\left(\frac{1}\theta\right)+ \sum_{i=1}^{N _t}\ln\left(\rho\lambda\left(\frac{b_{it}}\lambda \right)^{\rho-1}\right) +\left(\frac{1}\theta+N_t\right)\ln\left( 1+\theta\sum_{i=1}^{N_t}\left(\frac{b_{it}}\lambda \right)^\rho\right) \]
The problem is that N_t, the number of bidders in auction t appears in one of the parameters I want to estimate via maximum likelihood:
\[ \rho=\gamma_1N_t+\gamma_0 \]
This means that N_t shows up in my ml program as both a dependent variable and an independent variable
which gives me this output:
\[ L_t = N_t \ln\theta + \ln\Gamma\left(\frac{1}\theta+N_t\right)-\ln\Gamma\left(\frac{1}\theta\right)+ \sum_{i=1}^{N _t}\ln\left(\rho\lambda\left(\frac{b_{it}}\lambda \right)^{\rho-1}\right) +\left(\frac{1}\theta+N_t\right)\ln\left( 1+\theta\sum_{i=1}^{N_t}\left(\frac{b_{it}}\lambda \right)^\rho\right) \]
The problem is that N_t, the number of bidders in auction t appears in one of the parameters I want to estimate via maximum likelihood:
\[ \rho=\gamma_1N_t+\gamma_0 \]
This means that N_t shows up in my ml program as both a dependent variable and an independent variable
Code:
program gammaweibull3 args lnf lambda rho theta quietly replace `lnf' = 3 * ln(`theta') + lngamma(1/`theta' + 3 ) - lngamma(1/`theta') + ln(`rho'*`lambda'*($ML_y1 /`lambda')^(`rho'-1)) + ln(`rho'*`lambda'*($ML_y2 /`lambda')^(`rho'-1)) + ln(`rho'*`lambda'*($ML_y3 /`lambda')^(`rho'-1)) + (1/`theta' + 3 )*ln(1+`theta'*(($ML_y1 /`lambda')^(`rho') + ($ML_y2 /`lambda')^(`rho') + ($ML_y3 /`lambda')^(`rho'))) end ml model lf gammaweibull3 (lambda: bid1 bid2 bid3 = nbidders ...) (rho:) (theta:) ml maximize
Code:
initial: log likelihood = 1796499.8 rescale: log likelihood = 1796499.8 rescale eq: log likelihood = 3.88e+298 could not calculate numerical derivatives -- discontinuous region with missing values encountered r(430);
Comment