Announcement

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

  • Error in "model specification" in MLE

    Hello everyone, In the MLE model, I have done this following programe but model specification (given below) is always showing error(model is not define. please let me know where i am making mistake.
    define Raghu_MLeut
    args lnf r
    tempvar prob0l prob1l prob0r prob1r y0 y1 y2 y3
    tempvar euL euR euDiff euRatio tmp inf_eut lnf_pt p1 p2 f1 f2
    quietly {
    * construct likelihood for EUT
    generate double `prob0l' = $ML_y2
    generate double `prob1l' = $ML_y3
    generate double `prob0r' = $ML_y4
    generate double `prob1r' = $ML_y5
    generate double `y0' = ($ML_y6)^`r'
    generate double `y1' = ($ML_y7)^`r'
    generate double `y2' = ($ML_y8)^`r'
    generate double `y3' = ($ML_y9)^`r'
    gen double `euL' = (`prob0l'*`y0')+(`prob1l'*`y1')
    gen double `euR' = (`prob0r'*`y2')+(`prob1r'*`y3')
    generate double `euDiff' = `euR' - `euL'
    replace `lnf' = ln(normal( `euDiff')) if $ML_y1==1
    replace `lnf' = ln(normal(-`euDiff')) if $ML_y1==0
    }
    end

    . ml model lf Raghu_MLeut (r: Choices P0left P0right prize0 prize1 prize2 prize3 = )if Choices==., cluster (id)technique(nr) maximize
    *
Working...
X