Announcement

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

  • Error using 'gmm' command: __00000I not found

    Hi all,

    I got this error when using the gmm command with my own moment function:

    error calling twostep_gmm3 at initial values
    __00000I not found

    I saw others having similar problems with "varlist not found", but seems no one has posted about _00000I. I think this might be a variable defined in the gmm program. But I don't know where to find the gmm ado file...

    Does anyone know what possibly went wrong? I checked that the number of equations is correct and there's no typo in the variable names. The following is the code:

    gmm twostep_gmm3, one nequations(4) parameters(a0 ak ap rho) winitial(identity) from(start2) myrhs(rpy2 rk l_p rpy2_1 rk_1 l_p_1 epsilon epsilon_1)

    And my moment generating function:

    program twostep_gmm3
    version 12
    syntax varlist [if], at(name) myrhs(varlist)

    local m1: word 1 of `varlist'
    local m2: word 2 of `varlist'
    local m3: word 3 of `varlist'
    local m4: word 4 of `varlist'

    local rpy2 : word 1 of `myrhs'
    local rk : word 2 of `myrhs'
    local l_p : word 3 of `myrhs'
    local rpy2_1 : word 4 of `myrhs'
    local rk_1 : word 5 of `myrhs'
    local l_p_1 : word 6 of `myrhs'
    local epsilon : word 7 of `myrhs'
    local epsilon_1 : word 8 of `myrhs'

    tempname a0 ak ap rho
    scalar `a0'=`at'[1,1]
    scalar `ak'=`at'[1,2]
    scalar `ap'=`at'[1,3]
    scalar `rho'=`at'[1,4]

    tempvar w w_1 eta rpy2_e_1

    gen double `w'=`rpy2'-`a0'-`ak'*`rk'-`ap'*`l_p'
    gen double `w_1'=`rpy2_1'-`a0'-`ak'*`rk_1'-`ap'*`l_p_1'
    gen double `eta'=`w'-`rho'*`w_1'

    replace `m1'=`rk'*`eta'
    replace `m2'=`l_p_1'*`eta'
    replace `m3'=`w_1'*`eta'
    replace `m4'=`eta'
    end

    Thank you!

  • #2
    Hello Ruoying,

    Try using set trace on before running your program. You can then figure out where your problem arose. Most likely it is a problem with a temporary variable or local that is empty.

    Comment

    Working...
    X