- Posts: 401
- Thank you received: 32
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
How do I set up a quota for BMI ranges?
- blocka
-
Topic Author
- Offline
- Platinum Member
-
Less
More
3 years 4 months ago #198462
by blocka
How do I set up a quota for BMI ranges? was created by blocka
In my survey, I calculate the participants BMI and save that value to an equation question called BMI.
I want to set up a quota to restrict participants to a set of event distributed ranges:
• Obesity 1: BMI 30-34.9 (33%)
• Obesity 2: BMI 35-39.9 (33%)
• Obesity 3: BMI > 40 (33%)
Assuming I have a pool of 90 participants, this means I'd like to set up a quota to limit 30 participants within each range.
So I set up my first quota: BMI 30 to 34.9
I can then select my question BMI
I'm then prompted for: New answer for quota 'BMI 30 to 34.9' Set equation value
What should I enter for the equation value? I guessed at {BMI >= 30 and BMI <= 34.9}
But when I save the quota, the equation is truncated to {BMI >= 30
Can someone provide guidance on how to set up a quota to support my criteria?
I want to set up a quota to restrict participants to a set of event distributed ranges:
• Obesity 1: BMI 30-34.9 (33%)
• Obesity 2: BMI 35-39.9 (33%)
• Obesity 3: BMI > 40 (33%)
Assuming I have a pool of 90 participants, this means I'd like to set up a quota to limit 30 participants within each range.
So I set up my first quota: BMI 30 to 34.9
I can then select my question BMI
I'm then prompted for: New answer for quota 'BMI 30 to 34.9' Set equation value
What should I enter for the equation value? I guessed at {BMI >= 30 and BMI <= 34.9}
But when I save the quota, the equation is truncated to {BMI >= 30
Can someone provide guidance on how to set up a quota to support my criteria?
The topic has been locked.
- blocka
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 401
- Thank you received: 32
3 years 4 months ago #198463
by blocka
Replied by blocka on topic How do I set up a quota for BMI ranges?
I'm hazarding a guess here, but in experimenting, I think what I need to do is set up 3 hidden equation questions:
Obesity1 with equation: {if ((BMI ge 30 && BMI le 34.9), "1","0")}
Obesity2 with equation: {if ((BMI ge 35 && BMI le 39.9), "1","0")}
Obesity3 with equation: {if ((BMI > 40), "1","0")}[/li]
And then a quota for each, like:
Am I on the right track?
Obesity1 with equation: {if ((BMI ge 30 && BMI le 34.9), "1","0")}
Obesity2 with equation: {if ((BMI ge 35 && BMI le 39.9), "1","0")}
Obesity3 with equation: {if ((BMI > 40), "1","0")}[/li]
And then a quota for each, like:
Am I on the right track?
The topic has been locked.
- Joffm
-
- Offline
- LimeSurvey Community Team
-
Less
More
- Posts: 11751
- Thank you received: 3635
3 years 4 months ago #198465
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic How do I set up a quota for BMI ranges?
I my opinion you only need one equation question:
{if (BMI ge 30 && BMI le 34.9, 1,if (BMI ge 35 && BMI le 39.9, 2,3))}
or shorter:
{if (BMI ge 40 ,3,if (BMI ge 35, 2,if (BMI ge 30, 1,0)))}
Now you may set a quota on each of the three values 1,2 and 3.
What about the people with BMI <30 (they will get a value of 0 in the equation)?
Joffm
{if (BMI ge 30 && BMI le 34.9, 1,if (BMI ge 35 && BMI le 39.9, 2,3))}
or shorter:
{if (BMI ge 40 ,3,if (BMI ge 35, 2,if (BMI ge 30, 1,0)))}
Now you may set a quota on each of the three values 1,2 and 3.
What about the people with BMI <30 (they will get a value of 0 in the equation)?
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
- blocka
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 401
- Thank you received: 32
3 years 4 months ago - 3 years 4 months ago #198590
by blocka
Replied by blocka on topic How do I set up a quota for BMI ranges?
Last edit: 3 years 4 months ago by blocka.
The topic has been locked.
- tpartner
-
- Offline
- LimeSurvey Community Team
-
Less
More
- Posts: 10344
- Thank you received: 3583
3 years 4 months ago #198598
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic How do I set up a quota for BMI ranges?
I think you'll need separate quotas - a single quota will add all of those answers so you will only get a total of 300.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: DenisChenu
The topic has been locked.