Results 1 to 2 of 2

Math Help - MLE

  1. #1
    Newbie
    Joined
    Sep 2008
    Posts
    14

    MLE

    Hi! I have a problem to solve:

    |y/x 0 1_|
    |0__ 5 15|
    |1 _10 20_|

    Above are the observations of which a dataset consists (N=50). I hope that you can read the table: (there are 5 observations with x=0 and y=0, 15 with y=0 and x=1, etc) Both x and y are binary and I need to plug these into a logit model and find the MLE. I start out by defining the likelihood function:

    L = \prod_{i=1}^{50} (\frac{exp(\beta_0 +\beta _1X_i )}{1 + exp(\beta_0 +\beta _1X_i) })^{Y_i}(\frac{1}{1 + exp(\beta_0 +\beta _1X_i })^{1-Y_i}<br />

    After this I go on with the usual MLE-process. I take the log of the expression above, I then calculate the first
    derivative with respect of beta_0 and thereafter beta_1. I then maximize these expressions with respect to the actual parameter. My problem is that I don't know how to use these observations above to receive a numerical MLE. Can someone please help me with this? Thank you.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Banned
    Joined
    Mar 2009
    Posts
    11
    It would have been easier to have a normal pdf and then use MLE , at least to get a good idea about the numerical solution.

    In such situations, here is what you do. You assume the parameters, Beta0, etc. Then for each observation pair (x,y), plug in the formula and calculate L. Hence, you shall have 50 such L ( call them L1, L2, L3.... ). You can simultaneously take the log of these L's (Call them Log_L1, Log_L2, etc).

    Then you add them up. Call the total Sum = Sum_LL.

    Then you maximize the sum_LL by changing the parameters, beta0, beta1 and with any other constraints on the betas that you can think of to make the solution viable.

    The key here is the first guess of the betas. Also, you might need an optimizer to maximize sum_LL. You can do this in excel (using solver) or in matlab. In summary it is an iterative procedure. 1) you assume parameters (betas) , 2) you plug (x,y) with the assumed betas in the Log function 3) Calculate sum of the Log Likelihood. 4) Change the betas in until there is no further increment in the sum of the Log LL (essentially optimize w.r.t betas).


    Quote Originally Posted by mirrormirror View Post
    Hi! I have a problem to solve:

    |y/x 0 1_|
    |0__ 5 15|
    |1 _10 20_|

    Above are the observations of which a dataset consists (N=50). I hope that you can read the table: (there are 5 observations with x=0 and y=0, 15 with y=0 and x=1, etc) Both x and y are binary and I need to plug these into a logit model and find the MLE. I start out by defining the likelihood function:

    L = \prod_{i=1}^{50} (\frac{exp(\beta_0 +\beta _1X_i )}{1 + exp(\beta_0 +\beta _1X_i) })^{Y_i}(\frac{1}{1 + exp(\beta_0 +\beta _1X_i })^{1-Y_i}<br />

    After this I go on with the usual MLE-process. I take the log of the expression above, I then calculate the first
    derivative with respect of beta_0 and thereafter beta_1. I then maximize these expressions with respect to the actual parameter. My problem is that I don't know how to use these observations above to receive a numerical MLE. Can someone please help me with this? Thank you.
    Follow Math Help Forum on Facebook and Google+

Search Tags


/mathhelpforum @mathhelpforum