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
Logic to lookout in a number of previous response variable if No answer is choosen
Re: Logic to lookout in a number of previous response variable if No answer is choosen
Hi Sham,
>Ask if (Q1 : Q30) = 2 or (Q539 : Q560)= 8;
I'll have to let one of the guys answer on why the above compiled, for I'm not sure how CSPro would interpret "Q1 : Q30" and "Q539:Q560".
As to your task, I would make a single alpha variable in your dictionary 30 chars long, and make the 1-30 questions subitems within it. After you've entered all the data, just use the POS function to see if '1' appeared within the main string, and take the desired action. Be sure to define valuesets for the subitems.
Sherrell
>Ask if (Q1 : Q30) = 2 or (Q539 : Q560)= 8;
I'll have to let one of the guys answer on why the above compiled, for I'm not sure how CSPro would interpret "Q1 : Q30" and "Q539:Q560".
As to your task, I would make a single alpha variable in your dictionary 30 chars long, and make the 1-30 questions subitems within it. After you've entered all the data, just use the POS function to see if '1' appeared within the main string, and take the desired action. Be sure to define valuesets for the subitems.
Sherrell
Re: Logic to lookout in a number of previous response variable if No answer is choosen
You could use a roster and min to query whether an activity has been performed. Occurrence labels are used to make the CAPI text dynamic. This application will show the last question if the activity was ever performed, otherwise the question is skipped.
Re: Logic to lookout in a number of previous response variable if No answer is choosen
Hi Sherrell,
Thank you soo much.
It is very helpful.
sham
Thank you soo much.
It is very helpful.
sham