- Posts: 3
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Participants with different weights of votes
- kraucer
- Topic Author
- Offline
- New Member
Less
More
7 years 2 months ago #148280
by kraucer
Participants with different weights of votes was created by kraucer
I am part of an association in which voters have votes with different weights. Example:
Question: Which color do you like?
Voters: John (vote weight = 0.522), Maria (vote weight = 0.600), Heitor (vote weight = 0.700)
Response options: blue and red
John and Mary voted in blue. Heitor voted for red
Expected end result:
Blue: 1.122
Red: 0.700
It is possible?
Question: Which color do you like?
Voters: John (vote weight = 0.522), Maria (vote weight = 0.600), Heitor (vote weight = 0.700)
Response options: blue and red
John and Mary voted in blue. Heitor voted for red
Expected end result:
Blue: 1.122
Red: 0.700
It is possible?
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11658
- Thank you received: 2742
7 years 2 months ago #148282
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Participants with different weights of votes
I think these kind of calculations should be made in the analysis software (Excel, SPSS, etc) and not in the data collection software (e.g. Limesurvey).
That said, it might be possible to find a way to get this. Not 100% sure at the moment though.
Frist step: you can pass on the weight via a custom attribute in the token table.
Then you could calculate at least the value of each vote. The problem that I see is to get the aggregated value of all voters. There is probably a way, but it is too late. I can't think of how to do this. Maybe someone can pick this up tomorrow morning...
That said, it might be possible to find a way to get this. Not 100% sure at the moment though.
Frist step: you can pass on the weight via a custom attribute in the token table.
Then you could calculate at least the value of each vote. The problem that I see is to get the aggregated value of all voters. There is probably a way, but it is too late. I can't think of how to do this. Maybe someone can pick this up tomorrow morning...
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: kraucer
The topic has been locked.
- kraucer
- Topic Author
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
7 years 2 months ago #148283
by kraucer
Replied by kraucer on topic Participants with different weights of votes
First step: you can pass on the weight via a custom attribute in the token table.
Is a good idea... I created a "vote weight" attribute in the list of participants. I would like to calculate there. Do you know which part of the code makes the sum?
Is a good idea... I created a "vote weight" attribute in the list of participants. I would like to calculate there. Do you know which part of the code makes the sum?
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3593
7 years 2 months ago #148297
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 Participants with different weights of votes
Use the Expression Manager assignment operator to set the value of a hidden (by CSS) numeric question.
manual.limesurvey.org/Expression_Manager..._Assignment_Operator
manual.limesurvey.org/Expression_Manager..._Assignment_Operator
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: kraucer
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13643
- Thank you received: 2491
7 years 2 months ago #148303
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Participants with different weights of votes
And after : you can try
framagit.org/SondagePro-LimeSurvey-plugin/getStatInSurvey
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The following user(s) said Thank You: kraucer
The topic has been locked.
- kraucer
- Topic Author
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
7 years 2 months ago #148355
by kraucer
Replied by kraucer on topic Participants with different weights of votes
I need set the value for voter and not for question
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13643
- Thank you received: 2491
7 years 2 months ago #148359
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Participants with different weights of votes
Yes i understand
1. WIth Tony Partner you have "vote weight"
2. With the plugin : you have global result in survey for "vote weight" (but looking at question : unsure you need it).
1. WIth Tony Partner you have "vote weight"
2. With the plugin : you have global result in survey for "vote weight" (but looking at question : unsure you need it).
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.