Announcement

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

  • how can I program this log-likelyhood function?

    Could anyone kindly help me program this log-likelyhood funtion in Stata?
    Sorry inadvance, for the complicated fuction, but I'm so desperate to code this in Stata.

    The function is as follows:
    Click image for larger version

Name:	loglikelyhood.png
Views:	1
Size:	18.4 KB
ID:	1523670



    where f(δ) is normal distribution pdf function, and yij = 1 or 0.

    I'd like to maximize above function (marked as "(4)") to estimate alpha(α), beta(βj), and delta(δij).

    I'll really appreciate if anyone could help me.

    Thank you.
    Last edited by Jeongmin Yu; 07 Nov 2019, 00:27.

  • #2
    First, if this is a conventional estimator, then you'll find it infinitely easier to use Stata's routines rather than trying to program this yourself. Look at the logit, probit, and panel versions of such documentation.

    Second, a lot of the summations can be done with egen by something.

    But, if this needs to be programmed, it will need to be in the context of an optimizer.

    Comment

    Working...
    X