Question about mean replacement using proc standard

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 18
Accepted Solution

Question about mean replacement using proc standard

Hi all,

Is there a way to only replace certain missing values with the mean of a sample using proc standard?  The data I am working with have 3 different types of missing values: 

Missing Value Code

Description

.s

Not applicable, including legitimate skips

.m

Item nonresponse (i.e. refused, don’t know, not ascertained)

.

System missing, including unit nonresponse

I only want to replace missing values that indicate item nonresponse (.m) with the mean of the sample, but I am not sure how to go about it.

Thanks in advance,

Stephanie


Accepted Solutions
Solution
‎04-09-2013 07:36 PM
Super Contributor
Posts: 644

Re: Question about mean replacement using proc standard

Quick and dirty:

Create a flag that has values S M and N to match the missing values

Pass through Proc Standard

Use the S and N flag to restore the correct missing values

Richard

View solution in original post


All Replies
Solution
‎04-09-2013 07:36 PM
Super Contributor
Posts: 644

Re: Question about mean replacement using proc standard

Quick and dirty:

Create a flag that has values S M and N to match the missing values

Pass through Proc Standard

Use the S and N flag to restore the correct missing values

Richard

Occasional Contributor
Posts: 18

Re: Question about mean replacement using proc standard

Thank you for your response, Richard!  My mind was drawing a blank on how to do this.

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 166 views
  • 0 likes
  • 2 in conversation