Announcement

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

  • Solve an equation

    I am trying to find the value for which an equation holds.
    The equation is 0.1(12-4x)^a+0.9(7-9x)^a=0.1(8-2x)^a+0.9(9-x)^a which I want to solve for x for each observation in my dataset, given a value a, that is stored in a variable for each observation. It is necessary that I use stata as I estimated the value of a before this and need to use this value of x for further analysis, all in stata.

    I have tried looking online and find a lot of solutions using the optimize command, but my stata says this command is unrecognized. I have checked spelling mistakes. I am using stata 18.
    Last edited by Eline Helder; 08 Apr 2024, 08:22. Reason: equation

  • #2
    Eline:
    welcome to this forum.
    See -help ml- and related entries list, that includes the -mata- command you mentioned.
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment

    Working...
    X