evaluation in skip forward/screening does not work correctly

126 views
Skip to first unread message

Teresa

unread,
Jun 23, 2021, 7:00:21 AM6/23/21
to formr
Hi,
after a screening survey, I would like to select participants using the skip module. Unfortunately, I do not get it to work correctly. May someone can help.
Example of run:
1. screening SURVEY
2. SKIP FOREWARD to 11 if
  • sumscore of questionnaire (PTQ_1:PTQ_15; see attachment) is <= 33 OR
  • age < 18 OR
  • age > 65 OR
  • participant has no smartphone.
3. further run modules for participants that return FALSE in skip module
...
10. END module for participants that return FALSE in skip module 2
11. END module for participants that return TRUE in skip module 2

You can find some test data of the survey attached.

Here is one example of code I tried in the SKIP FOREWARD module:
study_info_pre_screening_v1$scr_age < 18 ||
study_info_pre_screening_v1$scr_age > 65 ||
study_info_pre_screening_v1$smartphone != 1 ||
sum(study_info_pre_screening_v1$scr_PTQ_1,
                study_info_pre_screening_v1$scr_PTQ_2,
                study_info_pre_screening_v1$scr_PTQ_3,
                study_info_pre_screening_v1$scr_PTQ_4,
                study_info_pre_screening_v1$scr_PTQ_5,
                study_info_pre_screening_v1$scr_PTQ_6,
                study_info_pre_screening_v1$scr_PTQ_7,
                study_info_pre_screening_v1$scr_PTQ_8,
                study_info_pre_screening_v1$scr_PTQ_9,
                study_info_pre_screening_v1$scr_PTQ_10,
                study_info_pre_screening_v1$scr_PTQ_11,
                study_info_pre_screening_v1$scr_PTQ_12,
                study_info_pre_screening_v1$scr_PTQ_13,
                study_info_pre_screening_v1$scr_PTQ_14,
                study_info_pre_screening_v1$scr_PTQ_15) <= 33

I can very much imagine that the whole part where I sum the PTQ is wrong. However, I also tested just the part for age (e.g., study_info_pre_screening_v1$scr_age > 65) and this also did not work although this is similar to the examples of the SKIP MODULE I found here: https://github.com/rubenarslan/formr.org/blob/master/documentation/run_components/filter.json.

Do you have any ideas how to do this correctly?

Thanks!
Teresa

 
study_info_pre_screening_v1.xls

Kai Horstmann

unread,
Jun 23, 2021, 10:36:42 AM6/23/21
to Teresa, formr
Hi Teresa,

what was the response when you tested only age? And are all the variables mandatory, otherwise you would have to make sure that your code handles NA, which it currently does not.

Best wishes,
Kai


--
You received this message because you are subscribed to the Google Groups "formr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to formr+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/formr/2694b871-5659-456c-b86f-816d36e2cc94n%40googlegroups.com.
<study_info_pre_screening_v1.xls>

Teresa

unread,
Jun 24, 2021, 11:01:45 AM6/24/21
to formr
Hi Kai,

thanks for your reply.
Yes, all items are mandatory.
What I now tried and what seemed to work is (I excuse for the horrible and lengthy code ...):

tail(study_info_pre_screening_v1$scr_age,1) < 18 ||
  tail(study_info_pre_screening_v1$scr_age,1) > 65 ||
  tail(study_info_pre_screening_v1$scr_smartphone,1) != 1 ||
  sum(
    tail(study_info_pre_screening_v1$scr_PTQ_1,1),
    tail(study_info_pre_screening_v1$scr_PTQ_2,1),
    tail(study_info_pre_screening_v1$scr_PTQ_3,1),
    tail(study_info_pre_screening_v1$scr_PTQ_4,1),
    tail(study_info_pre_screening_v1$scr_PTQ_5,1),
    tail(study_info_pre_screening_v1$scr_PTQ_6,1),
    tail(study_info_pre_screening_v1$scr_PTQ_7,1),
    tail(study_info_pre_screening_v1$scr_PTQ_8,1),
    tail(study_info_pre_screening_v1$scr_PTQ_9,1),
    tail(study_info_pre_screening_v1$scr_PTQ_10,1),
    tail(study_info_pre_screening_v1$scr_PTQ_11,1),
    tail(study_info_pre_screening_v1$scr_PTQ_12,1),
    tail(study_info_pre_screening_v1$scr_PTQ_13,1),
    tail(study_info_pre_screening_v1$scr_PTQ_14,1),
    tail(study_info_pre_screening_v1$scr_PTQ_15,1)
  ) <= 33

 (If not all variables had been mandatory, I guess I would have had to add na.omit().)

To get this straight: I always have to refer to the last element in the survey? Otherwise it will evaluate the whole survey?
If you see any dangers in the code, I'd be happy if you let me know.

Best
Teresa

Ruben Arslan

unread,
Jun 24, 2021, 11:11:21 AM6/24/21
to Teresa, formr
Hi Teresa, 

if the screening survey isn't repeated (why would it be?) you shouldn't have to use tail.
However, maybe you repeated it during your testing, so now you have several rows for the user you're testing with?
Either way, the tail() won't hurt, though of course it makes for uglier code. And yes, the sum function will sum across rows and columns. rowSums will only sum across columns.

Best,

Ruben


Teresa

unread,
Jun 25, 2021, 5:22:38 AM6/25/21
to formr
Hi Ruben,

ah, I see, that makes sense. I did use the same guinea pigs multiple times...
Thanks for clarifying!

Two other questions that came up:
1. Is it possible to send participants a survey that just includes text (e.g., a note) without a submit button?
2. Is it possible to make a survey accessible multiple times for the same person without skipping backwards or using a private window?

Teresa

Maria Jalynskij

unread,
Aug 13, 2023, 8:29:09 AM8/13/23
to formr

Hello,

I've been facing an issue with the skip module recently. In one survey, I'm using three variables: group_selection, randomizationER, and randomizationSE.


When participants choose answer option 0 for the group_selection variable (multiple choice item), they are correctly directed to a delay 15. However, if they select answers 1 or 2, two calculations are performed on the next page of the same survey. If the result of these calculations is 0, participants are directed to the same delay 15. But if the result is 1 or 2, participants should be directed to another delay 10.

While the skip module works fine when the calculation result is 0, it gets stuck with an 'error_opencpu_r' message when the result is not 0. I've tried different skip logic variations:

A) T2_8_Randomization$randomizationER==0 | T2_8_Randomization$randomizationSE == 0 | T2_8_Randomization$group_selection == 0;

B) T2_8_Randomization$randomizationER != 1 | T2_8_Randomization$randomizationSE != 2 | T2_8_Randomization$group_selection == 0.

Is there something wrong with these codes?  I would greatly appreciate any responses and corrections you could provide. 

Thank you in advance!

Maria

unread,
Aug 15, 2023, 8:39:38 AM8/15/23
to formr
It's solved.

JEMS EBERHARD HORBEL

unread,
Sep 6, 2023, 7:13:28 PM9/6/23
to formr
DIRECT SENDER IS HERE LETS DEAL.

JEMS EBERHARD HORBEL




MT103/202 DIRECT WIRE TRANSFER
PAYPAL TRANSFER
CASHAPP TRANSFER
ZELLE TRANSFER
TRANSFER WISE
WESTERN UNION TRANSFER
BITCOIN FLASHING
BANK ACCOUNT LOADING/FLASHING
IBAN TO IBAN TRANSFER
MONEYGRAM TRANSFER
SLBC PROVIDER
CREDIT CARD TOP UP
SEPA TRANSFER
WIRE TRANSFER
GLOBALPAY INC US


Thanks.



NOTE; ONLY SERIOUS / RELIABLE RECEIVERS CAN CONTACT.

DM ME ON WHATSAPP FOR A SERIOUS DEAL.

+447405129573
Reply all
Reply to author
Forward
0 new messages