Announcement

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

  • Error using ice

    I am trying to do multiple imputation on my panel dataset (Early Childhood Longitudinal Study-Kindergarten) using ice and receive the following error: "Error! safeplp5 found on both sides of prediction equation". I receive this error for multiple variables during the dry run. In this particular case, safeplp5 is an ordinal variable indicating how safe parents think their neighborhood is for their children to play in. The responses are: "Not at all safe", "Somewhat safe", and "Very safe". Here is the code I used for the dry run:

    #delimit;
    ice
    gender
    m.race
    ager*
    primpkp1
    weighp
    weigho
    disablp*
    o.inccatw*
    o.hmempp*
    o.hmagep*
    o.momedw*
    m.curmarp*
    m.hfamilp*
    anylngp*
    o.numsibp*
    o.expectp*
    o.readbop*
    o.singsop*
    o.helparp*
    o.choresp*
    o.gamesp*
    o.naturep*
    o.buildp*
    o.sportp*
    o.chreadp*
    o.chlboop*
    o.tellstp*
    o.safeplp*
    pupris*
    flnchs*
    rlnchs*
    minors*
    ,
    saving(parinvolv_mi, replace)

    seed(396) cycle(10) m(5)

    dryrun
    ;

    Any suggestions? Thanks advance for any help.
    Stephanie

  • #2
    I couldn't say where the source of your error lies. But consider using Stata's built-in capabilities for multiple imputation:

    http://www.stata.com/support/faqs/st...s-ice-and-mim/
    http://www.stata.com/stata12/multiple-imputation/
    http://statistics.ats.ucla.edu/stat/...ibrary/ice.htm

    ice is a user-written command by Patrick Royston, available at SSC (you are asked to specify this in the FAQ).
    You should:

    1. Read the FAQ carefully.

    2. "Say exactly what you typed and exactly what Stata typed (or did) in response. N.B. exactly!"

    3. Describe your dataset. Use list to list data when you are doing so. Use input to type in your own dataset fragment that others can experiment with.

    4. Use the advanced editing options to appropriately format quotes, data, code and Stata output. The advanced options can be toggled on/off using the A button in the top right corner of the text editor.

    Comment


    • #3
      Is -safeplp- one variable or more? If more than one, how is -ice- expanding o.safeplp*? There is probably some ambiguity there.
      You could try tabulating all the - safeplp- and looking for problems. Maybe some of them can or should be dropped.

      Comment


      • #4
        Thanks for your responses. Roberto, i will try out Stata's multiple imputation commands although I am more familiar with ice and sorry for not specifying the user-written command.

        Paul, safeplp* refers to the same variable collected across three waves. The variable is structured the same way in all waves with the 3 responses I listed above. When I tabulated them I didn't see any problems. Is there anything specific I should be looking for?
        Thanks again for your replies.

        Comment

        Working...
        X