- Posts: 1
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Interlocking quotas/cross quotas/crosswise quotas
- anna9731
- Topic Author
- Offline
- New Member
Less
More
1 month 6 days ago #258920
by anna9731
Interlocking quotas/cross quotas/crosswise quotas was created by anna9731
Please help us help you and fill where relevant:
Your LimeSurvey version: Version 5.6.56+240227
Own server or LimeSurvey hosting: uzh
==================
Hi:) I have been searching all over the forum and saw a lot of helpful posts and answers, unfortunately, i still can't figure out my problem...
I would like to set quotas for following groups:
- language group: German, French and Italian
- sex: F, M
- Age group: a, b, c
which concludes to 18 groups:
DE x M x a
DE x M x b
DE x M x c
IT x M x a
IT x M x b
...
and so forth.
I have read the post(s) by the user Joffm, but i seem to be too unskilled in math to do the full equation with that many variables. If somebody could help me, i would be very grateful!!
thank you,
Anna
Your LimeSurvey version: Version 5.6.56+240227
Own server or LimeSurvey hosting: uzh
==================
Hi:) I have been searching all over the forum and saw a lot of helpful posts and answers, unfortunately, i still can't figure out my problem...
I would like to set quotas for following groups:
- language group: German, French and Italian
- sex: F, M
- Age group: a, b, c
which concludes to 18 groups:
DE x M x a
DE x M x b
DE x M x c
IT x M x a
IT x M x b
...
and so forth.
I have read the post(s) by the user Joffm, but i seem to be too unskilled in math to do the full equation with that many variables. If somebody could help me, i would be very grateful!!
thank you,
Anna
Please Log in to join the conversation.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12944
- Thank you received: 3979
1 month 6 days ago - 1 month 6 days ago #258925
by Joffm
If you code
QCountry
1: German
2. French
3:: Italian
QSex
1: female
2: male
QAge
1: Age1
2: Age 2
3: Age 3
Now you see that there are three options of Age.
Each is combined with one of the Sex options.
1: 1-1
2: 1-2
3: 1-3
4: 2-1
5: 2-2
6: 2-3
Now the formula is obvious:
(QSex-1)*3+QAge
If you only say QSex*3+QAge, it doesn't really matter, but
the result starts at 4
And to add the country is the same
For each country you have six option of Sex x Age
(QCountry-1)*6+(QSex-1)*3+QAge
Try in Excel and you will see.
Joffm
P.S.
I see "uzh".
So it isn't country, it is language.
P.P.S.
Und wenn Du mich schon zitierst, hättest Du auch im deutschen Teil fragen können.
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Interlocking quotas/cross quotas/crosswise quotas
I do not believe this.i seem to be too unskilled in math
If you code
QCountry
1: German
2. French
3:: Italian
QSex
1: female
2: male
QAge
1: Age1
2: Age 2
3: Age 3
Now you see that there are three options of Age.
Each is combined with one of the Sex options.
1: 1-1
2: 1-2
3: 1-3
4: 2-1
5: 2-2
6: 2-3
Now the formula is obvious:
(QSex-1)*3+QAge
If you only say QSex*3+QAge, it doesn't really matter, but
the result starts at 4
And to add the country is the same
For each country you have six option of Sex x Age
(QCountry-1)*6+(QSex-1)*3+QAge
Try in Excel and you will see.
Joffm
P.S.
I see "uzh".
So it isn't country, it is language.
P.P.S.
Und wenn Du mich schon zitierst, hättest Du auch im deutschen Teil fragen können.
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 1 month 6 days ago by Joffm.
Please Log in to join the conversation.
- AnnaLandolt
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
1 month 3 days ago #259010
by AnnaLandolt
Replied by AnnaLandolt on topic Interlocking quotas/cross quotas/crosswise quotas
Wow, thank you so much!!! Joffm höchstpersönlich
Thank you for the explanations as well, now i understand it!
I tested all the combinations. There were three combinations, where it did not work:
DE-M-agecategory 1
DE-M-agecategory 2
DE-M-agecategory 3
All the other combinations worked well and the right formula came out.
I have coded
DE = 1
M = 2
see the attachment below, the formula that was computed were 31, 32, 33 respectively.
I double- and triple checked these combinations. I don't know what to do, maybe you know what the problem might be?
For the agecategory, see the other attachment, but i think this one isn't the problem, because it always computed it correctly....
Thank you for the explanations as well, now i understand it!
I tested all the combinations. There were three combinations, where it did not work:
DE-M-agecategory 1
DE-M-agecategory 2
DE-M-agecategory 3
All the other combinations worked well and the right formula came out.
I have coded
DE = 1
M = 2
see the attachment below, the formula that was computed were 31, 32, 33 respectively.
I double- and triple checked these combinations. I don't know what to do, maybe you know what the problem might be?
For the agecategory, see the other attachment, but i think this one isn't the problem, because it always computed it correctly....
Attachments:
Please Log in to join the conversation.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12944
- Thank you received: 3979
1 month 3 days ago #259011
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Interlocking quotas/cross quotas/crosswise quotas
Hi, Anna,
better you send the lss export. There may be a small typo or so.
Joffm
better you send the lss export. There may be a small typo or so.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Please Log in to join the conversation.
- AnnaLandolt
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
1 month 3 days ago #259013
by AnnaLandolt
Replied by AnnaLandolt on topic Interlocking quotas/cross quotas/crosswise quotas
thank you, here it is:
Attachments:
Please Log in to join the conversation.
- AnnaLandolt
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
1 month 3 days ago #259014
by AnnaLandolt
Replied by AnnaLandolt on topic Interlocking quotas/cross quotas/crosswise quotas
I'm also testing the quotas right now, and it doesn't trigger with the DE-combinations (also x F), so maybe the problem is with the "DE"?
Please Log in to join the conversation.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12944
- Thank you received: 3979
1 month 3 days ago - 1 month 3 days ago #259024
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Interlocking quotas/cross quotas/crosswise quotas
Hi,
1. Your equation "Qagecat" is not correct.
You do an assignment. This is used if you want to assign a value to a different question.
This is sufficient
{if(Qage < 18, 0, if(Qage <= 34, 1, if(Qage <= 54, 2, if(Qage <= 79, 3, 0))))}
2. Your agecat coding.
There are 4 categories (0,1,2,3), not three as in my example.
Now there are 8 ways to combine sex x age and 24 to combine all three
So you have to adapt the formula.
{(Qlanguage-1)*8+(Qsex-1)*4+Qagecat}
You see the factors (red, bold) always represent the number of following options.
This way you get codes from 0 to 23.
Best regards
Joffm
1. Your equation "Qagecat" is not correct.
You do an assignment. This is used if you want to assign a value to a different question.
This is sufficient
{if(Qage < 18, 0, if(Qage <= 34, 1, if(Qage <= 54, 2, if(Qage <= 79, 3, 0))))}
2. Your agecat coding.
There are 4 categories (0,1,2,3), not three as in my example.
Now there are 8 ways to combine sex x age and 24 to combine all three
So you have to adapt the formula.
{(Qlanguage-1)*8+(Qsex-1)*4+Qagecat}
You see the factors (red, bold) always represent the number of following options.
This way you get codes from 0 to 23.
Best regards
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 1 month 3 days ago by Joffm.
Please Log in to join the conversation.