Announcement

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

  • initial values not feasible r(1400);

    Good Afternoon,

    I am new at Mata but a good user of Stata.

    I want to make a GMM with 15 independent variables and 1 dependent.

    Problem is that, I have change values of 15 independent variables; so I have 30 independent ones. I have to put in 15 of them. For example X and changeX must not be in the equation at the same time.

    First I declared all 30 in stata,

    Then

    mata

    optimize_init_argument(S, 1, X)
    CTS =st_data(.,.)
    BR=st_data(.,.)
    W=cholinv(X'X)
    init=J(1,cols(X),0)
    S=optimize_init()
    optimize_init_evaluator(S, &i_crit())
    optimize_init_which(S,"min")
    optimize_init_evaluatortype(S,"d0")
    optimize_init_params(S,init)
    p=optimize(S)

    And I receive

    initial values not feasible
    r(1400);

    Please help me.

    Thank you in regards,

  • #2
    The problem probably lies somewhere in your i_crit() function. Also, a d0 evaluator might not be appropriate if you are doing GMM; q0 might be more appropriate.
    https://twitter.com/Kripfganz

    Comment

    Working...
    X