Announcement

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

  • set the initial values using an exit matrice when using the command of optimize_init_params

    Hello, I want to do the optimization with the loop method. but I am not familiar with mata :

    the following is the code:

    optimize_init_params(S, rowvector initialvalues)

    in my data ,the ols_26 is a matrice ( 1*n)

    so I run the code : optimize_init_params(S,ols_26) in mata.

    but stata shows these errors:

    optimize_init_params(): 3202 ols_26[0,0] found where rowvector required
    DLW(): - function returned error
    <istmt>: - function returned error

    Thank you for your help.








  • #2
    From the question, it is a little unclear what exactly is going on. Do you have a more thorough decription of your objective function and how you have defined it?

    Best,

    Matt Baker

    Comment


    • #3
      Have you tried passing a row vector to the second argument of the function?

      Code:
      optimize_init_params(): 3202 ols_26[0,0] found where rowvector required
      Seems to be saying you cannot pass a matrix to the second argument. Maybe placing your starting values in a row vector will solve the problem for you?

      Comment

      Working...
      X