Announcement

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

  • Creating a gamma distribution function to estimate likelihoods

    I have created a dataset from the following:

    set obs 10
    gen goals=_n-1
    gen alpha=1.4
    gen beta=1

    I want to use a gamma distribution function to estimate the likelihood for each observation in goals given the alpha and beta parameters defined. I believe i need to do this in mata but have never used this programming language and am at a loss of to create the function in mata and then access that function to generate a new variable

    Giulio DiDiodato

  • #2
    I am having a hard time understanding exactly what you want to do. I suspect that we are dealing with an XY problem ( https://en.wikipedia.org/wiki/XY_problem ). So best way to solve that is to tell us why you want to do this. Right now this looks like you are on completely the wrong track.

    Maybe you are looking for ssc desc gammafit ?
    ---------------------------------
    Maarten L. Buis
    University of Konstanz
    Department of history and sociology
    box 40
    78457 Konstanz
    Germany
    http://www.maartenbuis.nl
    ---------------------------------

    Comment

    Working...
    X