Skip to content

How to adapt question texts to e.g. the participant's sex and relationship status

Ruben C. Arslan edited this page May 4, 2016 · 2 revisions

How to...

...adapt your survey to given answers

Here's an example item sheet.

If you want your survey to be tailored to the answers given before there are many ways of doing so. In every case, you need some kind of information, which determines what your participants will see.

Example: If you want to adapt the survey to participants gender, ask them what their gender is. For ease of later use, use the "name"s 0 and 1 (instead of any other number) for dichotomous responses (e.g. male/female). If you do so, 0 == false and 1 == true. "Name" of choices can be defined on the choices tab of your sheet.

There are several ways to adapt your survey

  1. For specific adaptions you only want to use once or twice: Write your adaption right where you need it

Example: You want information about the girlfriend/ boyfriend of your participant and you already asked, if the current partner is male or female. Use

Does your `r ifelse(gender_partner, 'boyfriend', 'girlfriend')` love you?

as label of your item. This basic ifelse-function tells formR "if the participant answered the item gender_partner as true, insert boyfriend, if it is not true, insert girlfriend".

This is a direct approach, but it does not look very nice in your sheet and should only be used if you do not use the adaptions very often.

  1. Define variables. Sometimes you will need specific adaptions on several points of your survey. For example, if you want to get information about relationships you will probably write "girlfriend" or "boyfriend" more than once.
  • Add a column called "value" in your sheet and one extra row for every variable you want to define.

  • Use the item type "calculate" and name your item in a meaningful way.

  • The column "value" tells formR what you want to get calculated.

  • Example: Use ifelse-function to define the value ifelse(gender_partner, "boyfriend", "girlfriend"). The function used here is the same as above.

  • insert your variable where you need it.

Insert `r boyfriendgirlfriend` everywhere you want boyfriend or girlfriend (e.g. I like my `r boyfriendgirlfriend`) 

It is a little more work to define a variable, but now you can use it as often as you like and it looks nicer in your sheet. Please note that you need a submit button between your critical item (e.g. Is your partner male or female?) and the variable-items.