Announcement

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

  • The trace plot creation after data imputation

    Hello,

    I struggle with creating trace plots after data imputation.

    Imputation code has the following structure:

    Code:
    mi impute chained variables, add(100) rseed (54321) savetrace(trace1, replace) augment

    Code for generating trace plots:

    Code:
    use trace1,clear
    describe
    
    reshape wide *mean *sd, i(iter) j(m)
    tsset iter
    tsline SES_mean*, name(mice1,replace)legend(off) ytitle("Mean of SES")
    tsline SES_sd*, name(mice2, replace) legend(off) ytitle("SD of SES")
    graph combine mice1 mice2, xcommon cols(1) title(Trace plots of summaries of imputed values)
    Every time when STATA gets to tsline the following error occurs:

    Code:
    too many variables specified
    r(103);
    Describe statistics includes the following information (in case it is relevant for resolving the issue):

    Code:
    Contains data from trace1.dta
      obs:         1,276                          
     vars:            38                         
     size:       193,952 
    
    Data                               long   ->   wide
    -----------------------------------------------------------------------------
    Number of obs.                     1276   ->      11
    Number of variables                  38   ->    4177

    Setting maxvar to 32767 did not help. My STATA version is 13 SE. Is it really the case that too many variables are specified and therefore I can not proceed or is there a solution? Thank you in advance for your answers.
Working...
X