Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

How to setup Cross Quota / Nested quota

More
3 years 1 month ago #230354 by CX-HUB
LimeSurvey Cloud
Versão 5.3.24
Fruity Theme ( fruity)
==================
Hello eveyone,
Can anyone help me on how to setup cross quota, based on 2 discrete variables:

Var 1
Value A
Value B
...
Value H
Value I

Var 2
Value A
Value B
...
Value R
Value S

My goal is to ser a quota for:
VAR1.A X VAR2.A
VAR1.A X VAR2.B
...
VAR1.A X VAR2.S

///

VAR1.B X VAR2.A
VAR1.B X VAR2.B
...
VAR1.B X VAR2.S

///

...153 quotas in total.

Thanks in advance!

Please Log in to join the conversation.

More
3 years 1 month ago #230364 by Joffm
Add both answer options to your quota.
 

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: CX-HUB

Please Log in to join the conversation.

More
3 years 1 month ago #230365 by CX-HUB
Thank you for your assistance, Joffm.

Please Log in to join the conversation.

More
3 years 1 month ago - 3 years 1 month ago #230371 by CX-HUB
Hey @Joffm,
I've 153 quotas to input manually.
There is any way or any strategy to automate this process by uploading a .csv or txr .file with all quotas designed?
Something similar to the Quick CSV Report about quotas' progress but this time as system input.
Thank you.
Last edit: 3 years 1 month ago by CX-HUB.

Please Log in to join the conversation.

More
3 years 1 month ago #230376 by tpartner
There is no bulk import for quotas - it is very unusual to have more than 2 or 3.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
3 years 1 month ago #230377 by Joffm

I've 153 quotas to input manually.

You CAN do something.
I never did this, but you may give it a try.
Export the survey as *.txt with one of your quotas.
Open in Excel or OpenOffice (TAB-separated) and see how the quota is defined (class "QTAx"). Then you may copy and adapt it as many times as you need and import the file again.

BUT: 
Do you really need this amount of quotas?
What for?
Do you have to pay for completed surveys and want to avoid unnecessary responses?

Otherwise I do not see a real reason for that in your scenario.
Store all responses and after you exported your data, remove the overquota.

OR: Enter manually.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

More
3 years 1 month ago - 3 years 1 month ago #230380 by CX-HUB
Thanks Joffm.

There is definetly a way of doing this by the method you're suggesting.

It seems that info from quotas are not written in the .txt file IF they have no answers added (at least I can't find them). Like this one, 155, I can't find it / them:

 

But those that have added answers can be found in the .txt file. Like this 102:

 

A.
There is a reference to the quota at the end of the file (n set to 9). Those reference numbers 123 / 131 seem to have no direct relationship with any other detail in the .txt file.

 

B.
In the .txt file, quotas appear allocated to a QTAM class (all my quotas are nested quotas) at the beginning of the file.

In my case of nested quotas, it seems the system saves the two references at different locations: [example for quota 124] the code @ var1

 

and the code @ var2

 

However, I can't bridge with these 2 reference points (at B.) with the information about the quota at the end of the file (A.)

Okay! This was not conclusive, but it's a good starting point for the next time I will deal with this issue. I'm in a rush and my design is a bit messy at the moment because I'm redesigning quotas instead of doing this from scratch. Next time I will start with one quota -> download the txt -> add another quota -> download txt again -> explore variations -> implement quotas through this method.

Thanks and feel free to drop any additional inputs.
Last edit: 3 years 1 month ago by CX-HUB.

Please Log in to join the conversation.

More
3 years 1 month ago #230382 by CX-HUB
@tpartner
"it is very unusual to have more than 2 or 3. "

@Joffm
"BUT:
Do you really need this amount of quotas?
What for?"

Let's say that you've this sample plan:


How do you guarantee that you'll reach the right amount of sample for each point, without specifying one by one as a quota?

Thanks for your inputs.

Please Log in to join the conversation.

More
3 years 1 month ago #230385 by Joffm
A quota does not guarantee that you get 10 or 40 responses of certain combinations.
They only limit. You won't get more.
So what do you win if you screen out respondents with a combination that is full?

In any case you have to wait until all combinations are filled with your desired amount of responses.

Now it is easy to remove the overquota.
You may set a quota on the "forbidden" combinations.

But as you use version 5.x. there might ne a way by using the plugin "statFunctions".
count the sum of each combination, compare with the actual combination of the respondent in an equation and screen out if necessary.

This way you only need one quota.
And the equation you can generate easily in Excel or a text editor.

Tomorrow I'll show something.

Joffm

 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: CX-HUB

Please Log in to join the conversation.

More
3 years 1 month ago #230387 by CX-HUB
That limit is also relevant to me. It doesn't increase cost when I use it on tel. interviewing. I do control the screening stage through the contact list I've available. Not 100% accurate, for sure.

Always learning, mate! This project in specific can have this kind of mechanic, but I've another one, 100% online, where I'm spending my response balance on screenings that gives no value back. I look forward to seeing your suggestions for tomorrow. It sounds promising.

I've read shortly about the plugin "statFunctions". But still had no time to incorporate it in my practice. Thx!

Please Log in to join the conversation.

More
3 years 1 month ago #230390 by Joffm

It doesn't increase cost when I use it on tel. interviewing

So, lack of information. 
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

More
3 years 1 month ago #230391 by CX-HUB
Also. But it's more a problem of systems integration.

Like all things is life, we've to take it one step at a time. Rome wasn't built in a day

Please Log in to join the conversation.

More
3 years 1 month ago #230414 by Joffm
Yes, but if we had known that it is something like CATI, we would have seen a reason for your quota.

Okay, as promised, the easy solution.

1. Create a (hidden) question of type "equation" where you calculate a combined value of your two questions. (eqHidden)
To calculate you have to use numerical codes.
Now the equation is {(Q1-1)* _number of codes of Q2_ + Q2}
In a scenario with 4 answer option of Q1 and 3 answer options of Q2 -> {(Q1-1)*3+Q2}
You get a unique code of your 13 conmbinations.

2. Create a (hidden) question of type "list(radio)" with two answer options: (QQuota)
0 : Fine
1 : Quota Full

3. Create a (hidden) question of type "equation" where you set the value of the "list(radio)" with a nested IF-statement.
You see: If the value if greater or equal to your goal QQuota is set to 1, otherwise to 0.

This equation will be a long one, but it is easily to create in Excel or OpenOffice.

With this quota limits
 

(here linefeeds for clarification)
Code:
{QQuota=
if(eqHidden==1 and statCountIf(eqHidden.sgqa, 1) ge 3,1,
  if(QHidden==2 and statCountIf(QHidden.sgqa, 2) ge 1,1,
    if(QHidden==3 and statCountIf(QHidden.sgqa, 3) ge 3,1,
      if(QHidden==4 and statCountIf(QHidden.sgqa, 4) ge 4,1,
        if(QHidden==5,1,  /* This combination is always screened out */
          if(QHidden==6 and statCountIf(QHidden.sgqa, 6) ge 1,1,
            if(QHidden==7 and statCountIf(QHidden.sgqa, 7) ge 3,1,
              if(QHidden==8 and statCountIf(QHidden.sgqa, 8) ge 2,1,
                if(QHidden==9,1, /* This combination is always screened out */
                  if(QHidden==10 and statCountIf(QHidden.sgqa, 10) ge 5,1,
                    if(QHidden==11 and statCountIf(QHidden.sgqa, 11) ge 3,1,
                      if(QHidden==12 and statCountIf(QHidden.sgqa, 12) ge 1,1,0)
                    )
                  )
                )
              )
            )
          )
        )
      )
    )
  )
)
}
Adapt the values to your needs.

Now question "QQuota" is either "0" or "1" and you can set ONE quota on it -> screen out, if "1"


Joffm

And are you sure, you are using version 5.3.24. ?
The LimeSurvey hosted version 5.3.25. looks like this.
 

But this does not affect anything.

 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: CX-HUB

Please Log in to join the conversation.

More
3 years 1 month ago #230427 by CX-HUB
You're really a Community master, Joffm! Super thanks for providing this detail!
I definetly will give it a go on my next project.

And yes - sorry - I'm using ver 5.3.25.

Keep up the good work!

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose