Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem with Maximum Likelihood Estimation with parameter constraints

    The likelihood function for my model is essentially the exponential distribution with parameter 'lambda', where lambda should be positive by definition.

    I want to specify 'lambda' as a linear combination of a set of variables which may cause 'lambda' to be negative for some observations.

    In order to keep my 'lambda' always positive, I replace 'lambda' with exp(lambda) in my log likelihood function (As advised in the Parameter Constraints section of the http://www.stata.com/manuals13/rmlexp.pdf).
    The program I wrote for this is as follows:

    program expo_lf
    version 11
    args lnfj lambda
    quietly replace `lnfj' = ln(exp(`lambda')) - (exp(`lambda')*$ML_y1)
    end


    My ML command looks like the following:
    ml model lf expo_lf (delay= users update_count)

    I can generate the coefficients for the for the 2 regressors, but I need to recover the coeffIcients from the impact of the transform I did for lambda.

    In cases where constrained parameters are not linear combination of variables, I see that we can recover original parameter using the "nlcom" command, but I am confused in this case.

    Your advice is highly appreciated.

    Thank You.
    Last edited by Priyanga Gunarathne; 12 Apr 2014, 00:49.
Working...
X