Announcement

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

  • Using fvset on multiple imputed data

    Hi!

    I have imputed a dataset using MICE and subsequently using the imputed data to fit a logistic regression. In the regression, I would like to have the most frequent category as base. To do this, I tried:
    Code:
    mi fvset base frequent var1 var2 var3 var4
    After which I get the following error message:

    Code:
                 st_global():  3300  argument out of range
              cpchars_wide():     -  function returned error
                     <istmt>:     -  function returned error
    r(3300);
    The help-box tells me this: "Perhaps you did not type stset. Some commands call stset to
    obtain information about the settings. In that case, that
    command is not appropriate for running directly on mi data. Use
    mi extract to select the data on which you want to run the
    command, which is probably m=0. "

    But I can't figure out if that's the solution for me, since I do need it to be done on all of the datasets for the mi estimate: logistic command to work properly and use the most frequent category as base?

    Grateful for any help, couldn't find another thread with the same dilemma!

  • #2
    please show the result of typing
    Code:
    mi set

    Comment


    • #3
      Here is the output:
      Code:
      . mi set
      data mi set wide, M = 10
      last mi update 05oct2023 10:54:33, 41 days ago

      Comment


      • #4
        I am pretty sure you should not see the error message reported in #1. It is a Mata runtime error and it is probably due to a bug. I am not saying there should not be an error; perhaps there is something wrong with your data. But you should notify Stata tech support with a reproducible example so they can have a look.

        Comment


        • #5
          Thank you, will do that!

          Comment

          Working...
          X