Announcement

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

  • using stset : no; data are mi set <- removing this setting if possible?

    Error:

    Code:
    st survivalt, failure(fail==1)
    no; data are mi set. Use mi stset to set or query these data ...
    r119
    (1)Hello I was trialling my code again on a new dataset I have just cleaned - which were patient outcomes data
    (2) A few days ago as you have recognised from my posts I was asking about -multiple imputation - and was trying to learn on my stata.

    I made a formal decision to first clean my patient outcomes data (1) - merge to my original data which I had been using to run this do file (2) - this never had - mi - stuff on here

    I had been playing around with -mi- but never saved anything,
    perhaps I may have -set- some settings from what I gather?

    How do I remove this please? so I can just run st survivalt

    The reason being, I haven't learnt multiple imputation fully and would like to apply once I have learnt it

    I have no recollection which variable I used with miset or perhaps was trialling
    Last edited by Rose Matthews; 16 Oct 2023, 11:32.

  • #2
    Try

    Code:
    mi extract 0

    Comment


    • #3
      hmm this doesn't work

      I've also tried this

      Code:
      mi unset 
      
      _mi_m not found 
      
      mi set
      
      data mi set mlong, M=0 
      last mi update 16oct2023 15:44:53, approximately 6 hours ago
      Click image for larger version

Name:	Screenshot 2023-10-16 at 21.25.58.png
Views:	1
Size:	51.2 KB
ID:	1730491

      Last edited by Rose Matthews; 16 Oct 2023, 15:05.

      Comment


      • #4
        Hello, after lots of trying, I managed to solve it - but I still have one question - see bold below

        I tried the following:

        Code:
        mi extract 0
        no;dataset in memory has changes since last saved
        
        mi unset
        _mi_m not found
        
        mi set
        
        char list
        Output from char list:
        data[_mi_marker]: _mi_ds_1

        Which apparently means Stata still thinks it's -MI- set

        Then I tried:

        Code:
        char _dta[_mi_marker]
        
        stset survival, failure(xx)
        //this worked
        Now, I don't know if I need to run char _dta[_mi_marker] everytime I run my do file ? Can anyone help in this regard?

        I' haven't performed any imputations as seen in screen shot
        Attached Files
        Last edited by Rose Matthews; 16 Oct 2023, 15:17.

        Comment


        • #5
          Characteristics (char) get stored with the dataset. If you remove all _mi* characteristics before you save the dataset, you do not need to remove them again.

          Comment

          Working...
          X