Hello,
I have some trouble with developing feedback for participants for matrix-questions. The problem is that a few of the subquestions within the matrix are inverse (negatively formulated). With the assesment value option I can only determine an assessment value that is the same for all subquestions.
I added a picture of an example.
To create a rational total value for the scale the subquestions have to be rated differently.
For SWK11 And SWK12 people that choose “Strongly disagree” should get 5 point, people with “Disagree” 4 points…
It is the other way around for question SWK13: People that choose “Strongly disagree” should get 1 point, people with “Disagree” 2 points…
I thought an equation like this might solve the Problem (saw something similar for single choice questions):
{sum(SWK11.value,SWK12.value,(6-SWK013.value))}
But it is not working and lime survey response with “undefined variable”.Does someone has an idea how to solve this problem? Maybee it is not XY.value for matrix-questions?
I am extremely thankful for help!
The assement mode is an ancient and very simple way of creating scores. It also doesn't store the values in the database.
Today I wouldn't use the assessment mode anymore and rather create your own assessment via relevance equations.
To keep the number of equations down, you can still use the assessment values for those subquestions of the matrix where the assessment values are "correct" (not negativ).
Code:
{sum(SWK11.value,SWK12.value,(6-SWK013value))}
However, that you get a "undefined variable” with this code, doesn't surprise me much, because I am sure that there is no "SWK013value" variable defined. You are missing a dot between the subquestion code and "value".
The next thing: You are talking about subquestions here. So you need to tell Limesurvey to which question these subquestions belong. So you would need to use something like questioncode_subquestioncode.value.
And in addition to that, I am not sure if you can substract something within sum().
so I would calculate the value for Questioncode_SWK013 in an equation first and then pipe it into the sum.
Help us to help you!
Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
Thx for your quick message.
i corrected the dot in the request.massage. In the original equation there was no dot missing, so this was not the source of the problem.
Regarding the other suggestions, thank you for hint that i have to add the name of the question bevor code of the subquestion. Now it works
And, why do you code "A1", "A2", ... instead of 5,4,3,...?
With these numeric codes you easy calculate your score {sum(Q1_SWK11.NAOK,Q1_SWK12.NAOK,(6-Q1_SWK13.NAOK))}
And if you name your subquestions better,
"normal" like: "N11","N12",...
"reverse" like "R13", "R14",...
You can generalize the calculation to this always working calculation (no matter how many "normal" or "reverse" items) {sum(sum(that.Q1.sq_N.NAOK),(6*count(that.Q1.sq_R.NAOK)),(-1*sum(that.Q1.sq_R.NAOK)))}
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless