Announcement

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

  • maximum command in stata

    > Dear Sir or Madam,

    >

    > I tried to use ml maximize command in Stata.

    > But I received the following error message.

    >

    > Following the manual, I used the following program.

    >

    > program mynormal1_lf

    > version 16

    > args lnfj mu sigma

    > quietly replace 'infj' = ln(normalden($ML_y1, 'mu', 'sigma') end

    >

    > sysuse auto

    >

    > . ml model lf mynormal1_lf (mpg = weight displacement) ()

    >

    > ml maximize

    >

    > invalid name

    > r(198);

    >

    >

    > Other mle-type programs such as mlexp work fine.

    > Do I need to install programs to activate ml program in my Stata?

    >

    > Shigeru Matsumoto

  • #2
    ml is part of Stata as purchased. You don't need to install it separately if you have installed Stata. Indeed that isn't possible.

    Looking at your code I wonder whether you need


    Code:
    quietly replace 'infj' = ln(normalden($ML_y1, 'mu', 'sigma') end
    to be two lines

    Code:
    quietly replace 'infj' = ln(normalden($ML_y1, 'mu', 'sigma')
    end

    Comment


    • #3
      Thanks Nick. I moved "end" to the next line. However, the program does not work still... I got the exactly same error message.

      Comment


      • #4
        Another one

        Code:
         'infj'
        should be

        Code:
         `lnfj'
        Notice the left single quote ` not '

        That seems to apply to all your references to local macros.
        Last edited by Nick Cox; Yesterday, 09:12.

        Comment


        • #5
          I couldn't distinguish between ' and ` due to my presbyopia. It worked.
          Appreciate Nick!

          Comment

          Working...
          X