Restrict statement

32 views
Skip to first unread message

scott.raynaud

unread,
Aug 12, 2015, 9:44:56 AM8/12/15
to IVEware
I have a survey question that was given to all ages from 1997-99.  From 2000-11 it was only given to those aged 1 or greater.  I want to impute values for the entire set, 1997-2011.  How can I write a restrict statement that takes into account this skip pattern?  If I say x(age>=1), then I'll miss some missing values for the period 1997-99.  If I omit the restrict statement, then I'll be imputing values for 2000-11 that were intentionally left blank since they were less than one year of age.

John Van Hoewyk

unread,
Aug 12, 2015, 2:50:36 PM8/12/15
to ive...@googlegroups.com
Scott,

You need to create an indicator variable that takes  in account the conditions you describe. I think this SAS code will work.

S=0;
IF SURVEY <2000 THEN S=1;
IF SURVEY >=2000 AND AGE >=1 THEN S=1;

THEN USE THE FOLLOWING RESTRICT STATEMENT:

RESTRICT X(S=1);


john






On 8/12/2015 9:44 AM, scott.raynaud wrote:
I have a survey question that was given to all ages from 1997-99.  From 2000-11 it was only given to those aged 1 or greater.  I want to impute values for the entire set, 1997-2011.  How can I write a restrict statement that takes into account this skip pattern?  If I say x(age>=1), then I'll miss some missing values for the period 1997-99.  If I omit the restrict statement, then I'll be imputing values for 2000-11 that were intentionally left blank since they were less than one year of age.
--
You received this message because you are subscribed to the Google Groups "IVEware" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iveware+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Trivellore Raghunathan

unread,
Aug 13, 2015, 1:14:02 PM8/13/15
to ive...@googlegroups.com
I think you should include S as a transfer variable as you dont want to use it as a predictor.

Raghu
--
Trivellore Raghunathan (Raghu)
Director, Survey Research Center
Research Professor, Institute for Social Research
Professor, Department of Biostatistics
University of Michigan

Phone: (734)-764-8365
Fax: (734)-763-9831

"A good life is filled with selfless actions full of compassion knowing well that we are all one"

Scott Raynaud

unread,
Aug 13, 2015, 1:15:19 PM8/13/15
to ive...@googlegroups.com

Exactly what I did.  Thanks for the tips.

Reply all
Reply to author
Forward
0 new messages