Announcement

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

  • Issue with teffects IPWRA-

    I am hoping someone can help with this, I am using the following code with a hospital administrative dataset with rare events:
    teffects ipwra (readmission alter sex i.charlindex i.imddecile) (ind alter sex i.charlindex i.imddecile i.n_hrg3, probit) , atet

    and I keep getting the following result:

    missing values encountered in analytic gradient
    gmm estimation failed

    The covariates are coded in a manner whereby there aren't missing values, so I am not sure what STATA means by "missing values encountered in analytic gradient"?

  • #2
    The posts at

    https://www.statalist.org/forums/for...gradient-r-416

    describe a similar problem and suggests a possible source:

    At the initial parameter values, the gradient is small and so the optimization routine makes a large step. This lets the exponential function evaluate to missing, because it only has support -8e+307 to 709 in Stata.
    Perhaps the discussion in
    Code:
    help gmm##optimization_options
    will give you a few ideas of things to try.

    Comment


    • #3
      HI William, thanks for replying, and very helpful to see the optimization options.I must admit I am a bit lost reviewing the help file. Do you have any possibly suggestions for any specifications of optimize (), which may help me overcome this issue?

      Comment


      • #4
        Actually, my answer in post #2 was confused. While the error message you received referred to gmm, which supports the optimize options, apparently gmm was invoked by the teffects ipwra command which supports the maximize options. So to be honest, I don't know what to suggest.

        On reflection, I think this might be a question best directed to Stata Technical Services through

        https://www.stata.com/support/tech-support/

        My own feeling on this is - if the diagnosis quoted in #2 is in fact relevant in this case - that Stata should be detecting the problem and re-trying with a smaller step. The alternative is to start from somewhere closer to the optimum.

        And on further reflection, if sex is a categorical variable (as opposed to, say, frequency ) you might do well to indicate that by specifying i.sex rather than allow it to be treated as continuous. That may have an effect on the workings of the optimization code.

        Comment

        Working...
        X