Welcome to the LimeSurvey Community Forum

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

having trouble with an equation-type

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 1 month ago #225764 by Joffm
Replied by Joffm on topic having trouble with an equation-type
Sorry, I do not see any issue
 

except the missing classification of the 16 and 17 years old participants
and there were no quotas.

But I am wondering why you use an assignment in the equation.
It is sufficient to use {if(age.NAOK>59,"xxx",if(age.NAOK>47,...
This way the value is stored in a variable with the name of the equation (agegroup)
Your syntax is used when you want to assign something to a different question, e.g. presetting it.

Is it really necessary to have a text as classification.
I think you will use it later in your analysis, e.g. to calculate an ANOVA or other statistical tests.
Wouldn't it be better to use numerical codes.

Or coming back to the assignment, create a (hidden) question of type "list(radio)" called "agegroup"
with the answer options
1 : <18
2: 18-24
3: 25-34
...

and in the equation (called "EQagegroup") you assign the value:
{agegroup=if(age.NAOK > 59, 6, if(age.NAOK > 44, 5, if(age.NAOK > 34, 4, if(age.NAOK > 24, 3, if(age.NAOK > 17, 2,1)))))}

Joffm


 

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

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 1 month ago #225765 by holch
Replied by holch on topic having trouble with an equation-type
I had a look at the first file you sent and there are a couple of things wrong. You allow age 16 and above, but you do not have any age category defined for age 16 and 17. So if you put 16 or 17, nothing will show up.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 1 month ago #225767 by holch
Replied by holch on topic having trouble with an equation-type
off-topic:

Your LimeSurvey version: Versão 3.19.1+191009


In times of data protection laws like GDPR and in your case LGPD you really shouldn't run such an old version of a software that potentially collects personal data. Your installation hasn't been updated since October 2019 and thus has not received any security updates or bug fixes since then.

I highly recommend to update your installation to at least the lastest version of the LS 3.x branch, which today is 3.28.1 (from 29/02/2022).

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The following user(s) said Thank You: gabriela.garcia

Please Log in to join the conversation.

More
2 years 1 month ago - 2 years 1 month ago #225775 by gabriela.garcia
Replied by gabriela.garcia on topic having trouble with an equation-type
Thank you very much, Joffm.

In these new 'agegroup' and 'EQagegroup', should I keep the relevance equation as 1 or should I asign the code to it?

Also, only in the test my peer sent you the merging is working well. Although she copied the two questions from the original survey, in the original, the same previous code comes like this:

 
Last edit: 2 years 1 month ago by gabriela.garcia.

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 1 month ago #225776 by holch
Replied by holch on topic having trouble with an equation-type
Do not copy images into the editor, it will just give weird code here in the forum.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The following user(s) said Thank You: gabriela.garcia

Please Log in to join the conversation.

More
2 years 1 month ago #225777 by gabriela.garcia
Replied by gabriela.garcia on topic having trouble with an equation-type
I just fixed it

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 1 month ago #225779 by holch
Replied by holch on topic having trouble with an equation-type
Always a good idea to delete the redirect to your panel provider... ;-)

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 1 month ago - 2 years 1 month ago #225780 by holch
Replied by holch on topic having trouble with an equation-type
For me, the information seems to be saved just fine:

 

Tested with the lastest version of LS 3.x
Version 3.28.1+220229

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Last edit: 2 years 1 month ago by holch.

Please Log in to join the conversation.

More
2 years 1 month ago #225781 by gabriela.garcia
Replied by gabriela.garcia on topic having trouble with an equation-type
Thank you for the tips, Holch!

Yes, but only in this copy we created to send here. We imported and exported the original survey, and then deleted the other questions. Still, same age and agegroup question and coding and the agegroup answers come as the code we assign...

We´ve had other surveys with the same questions and length and this is the first time we are experiencing this issue.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 1 month ago #225782 by Joffm
Replied by Joffm on topic having trouble with an equation-type
In both of your files I don't see anything e3xcept that you obviously changed the equation a bit.

@holch already showed our reesults.

Here a sample of my idea.
 

File Attachment:

File Name: limesurvey... (2).lss
File Size:20 KB

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

Please Log in to join the conversation.

More
2 years 1 month ago #225784 by gabriela.garcia
Replied by gabriela.garcia on topic having trouble with an equation-type
Thank you for the sample. 
It works with the new answers. However, I imported the vvfile with previous answers and only a few responded to it, as in the attachment bellow: 

 

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 1 month ago #225796 by holch
Replied by holch on topic having trouble with an equation-type
Well, then something was wrong in the previous question. But as we do not have access to this, we can't tell.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose