Announcement

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

  • estimation sample varies

    Good day, I get following error message

    Code:
    bys id: gen treatment=0 if (expectation==2 & f.gift_received==2) | (l.expectation==2 & gift_received==2) 
    (4,830 missing values generated)
    
    . bys id: replace treatment=1 if (expectation==2 & f.gift_received==1) | (l.expectation==2 & gift_received==1)
    (1,602 real changes made)
    
    . 
    . gen time=survey==2
    
    sort survey id implicate 
    
    . 
    . mi estimate: reg job_hours treatment time i.time#i.treatment, cluster(treatment) robust
    (system variable _mi_id updated due to changed number of obs.)
    (13 m=0 obs. added to m=1 because physically missing)
    (10 m=0 obs. added to m=2 because physically missing)
    (14 m=0 obs. added to m=3 because physically missing)
    (16 m=0 obs. added to m=4 because physically missing)
    (12 m=0 obs. added to m=5 because physically missing)
    
    estimation sample varies between m=1 and m=2; click here for details
    r(459);
    I don't have access to the data right now, so I can't change anything, just trying to figure out what I did wrong. Since the sample varies within the multiple imputation, I obviously did something wrong. Is the error that I need to sort all variables used in the regression?

    The help page gives me this info:

    Code:
    1.  You are fitting a model on a subsample that changes from one imputation to another.  For example, you specified the if expression containing imputed variables.
    
        2.  Variables used by model-specific estimators contain values varying across imputations.  This results in different sets of observations being used for completed-data analysis.
    
        3.  Variables used in the model (specified directly or used indirectly by the estimator) contain missing values in sets of observations that vary among imputations.  Verify that your mi data are proper and, if necessary, use mi update to update them.
    #2 seems the most probable to me. If the values vary across imputations, that would mean I didn't sort properly correct?

    #3 states that certain imputations for the same observation have or don't have values right? I don't think this should be an issue for me. How would I check for this though? I have a pretty big data set, how could I see if this is the case?

  • #2
    push*

    Comment


    • #3
      You didn't get a quick answer. You'll increase your chances of a useful answer by following the FAQ on asking questions. It is hard to diagnose a data problem when we can't access the data.

      I'm sorry but I don't use mi much and can't help you substantively.

      Comment

      Working...
      X