Logic to lookout in a number of previous response variable if No answer is choosen
Posted: March 12th, 2023, 1:00 am
Hi family,
I have couple of questions(Q1,Q2,Q3...Q30) seeking to know if a particular activity has occurred with an option such as Yes=1 No=2 or DK= 3.
So Q31 asked "Are you sure there is no any activity at all"? if Yes then CAPI should proceed and if NO then logic should take the enumerator back to Q1) asked as a validation if it identifies that all response in Q1 to Q30 recorded either No(2) or DK(3).
In summary:
Q1: Q30 asked is this activity occurred? Yes(1) No(2) DK(8)
Q31: Are you sure from Q1 to Q30 none of the various activities happened?
My challenge now is how do I create a logic in this situation?
where Q31 Is only asked if all responses from Q1 to Q30 is Either No(2) or DK(2)
So at Q31
This was my logic and did not workout
PROC Q31
preproc
Ask if (Q1 : Q30) = 2 or (Q539 : Q560)= 8;
postproc
if $= 2 then
reenter Q1;
endif;
I did not succeed with the above logic
I will appreciate any support from the family here please?
Thank you
I have couple of questions(Q1,Q2,Q3...Q30) seeking to know if a particular activity has occurred with an option such as Yes=1 No=2 or DK= 3.
So Q31 asked "Are you sure there is no any activity at all"? if Yes then CAPI should proceed and if NO then logic should take the enumerator back to Q1) asked as a validation if it identifies that all response in Q1 to Q30 recorded either No(2) or DK(3).
In summary:
Q1: Q30 asked is this activity occurred? Yes(1) No(2) DK(8)
Q31: Are you sure from Q1 to Q30 none of the various activities happened?
My challenge now is how do I create a logic in this situation?
where Q31 Is only asked if all responses from Q1 to Q30 is Either No(2) or DK(2)
So at Q31
This was my logic and did not workout
PROC Q31
preproc
Ask if (Q1 : Q30) = 2 or (Q539 : Q560)= 8;
postproc
if $= 2 then
reenter Q1;
endif;
I did not succeed with the above logic
I will appreciate any support from the family here please?
Thank you