SPSS Statistics

SPSS Statistics

Your hub for statistical analysis, data management, and data documentation. Connect, learn, and share with your peers! 

 View Only
  • 1.  Replace all missing values with same value

    Posted Wed October 30, 2024 06:25 PM

    Hi,

    I need to replace all missing values for a variable with the number 50. Is there a way to do this in syntax? The point-and-click options do not include replacing all missing values with the same value. 

    For additional context, this data is coming from a Qualtrics survey item using a "slider". The slider scale has two anchor points with 50% in the middle, and the slider is set to start in the middle. If the respondent agrees with 50% and does not move the slider at all, Qualtrics records this as missing data. But the respondent intended to indicate 50%. 

    Thank you in advance for any assistance!



    ------------------------------
    Abby Mello
    ------------------------------


  • 2.  RE: Replace all missing values with same value

    Posted Wed October 30, 2024 06:36 PM
    Use the "missing" in an IF command.

    --





  • 3.  RE: Replace all missing values with same value

    Posted Thu October 31, 2024 08:43 AM

    If I follow, the only way the variable(s) can be missing is if someone does not move the slider.  Is that correct?  I ask because if there are other ways to get missing data, I would not overwrite the original variables.  But assuming I understood correctly, and assuming there are multiple variables, I think I would use RECODE.

    RECODE varlist (MISSING = 50) (ELSE = COPY).

    Cheers,
    Bruce



    ------------------------------
    Bruce Weaver
    ------------------------------