Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:

THEMA: Average counting in a special way

Average counting in a special way 1 Jahr 8 Monate her #89052

  • ezechial
  • ezechials Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 1
  • Karma: 0
Hello!

I'm new in this forum and I did not find an suitable answer for my problem:

Our company has a limesurvay, and I need to do a modification to one of our surveys. We need to count an average from answer in a way that it drops best, worse and a middle answers away ( in this way, we have charts to 4-10, and I need to drop 4, 7, and 10 off from average count) and count the average from the remaining numbers. Is this kind of modification possible and how I do it?

:)
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Aw: Average counting in a special way 1 Jahr 8 Monate her #89148

  • jelo
  • jelos Avatar
  • OFFLINE
  • Platinum Lime
  • Beiträge: 467
  • Dank erhalten: 52
  • Karma: 16
You can change the php code to get these results. But updates would be a problem and
you would need a special installation.

Such operations are more suitable for statistical programs.
Think about using R ( www.r-project.org ) on the Server to create a workflow for results.

Perhaps some day Limesurvey will support R inside the results sections but currently I would change the workflow to an external program which does the reports.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Re: Average counting in a special way 1 Jahr 8 Monate her #89158

  • tpartner
  • tpartners Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 4072
  • Dank erhalten: 748
  • Karma: 341
There may be a cleaner way to do this with Expression Manager but if, for example, you had an array question with:
- question code q1
- 4 sub-questions with codes 1-4
- answer options 4-10

You could use something like the following in an equation question (I put in line-breaks to make it easier to read):
{sum(
	if(q1_1 > 0 && q1_1 != 4 && q1_1 != 7 && q1_1 != 10, q1_1, ''), 
	if(q1_2 > 0 && q1_2 != 4 && q1_2 != 7 && q1_2 != 10, q1_2, ''), 
	if(q1_3 > 0 && q1_3 != 4 && q1_3 != 7 && q1_3 != 10, q1_3, ''), 
	if(q1_4 > 0 && q1_4 != 4 && q1_4 != 7 && q1_4 != 10, q1_4, '')
) / count(
	if(q1_1 > 0 && q1_1 != 4 && q1_1 != 7 && q1_1 != 10, 1, ''), 
	if(q1_2 > 0 && q1_2 != 4 && q1_2 != 7 && q1_2 != 10, 1, ''), 
	if(q1_3 > 0 && q1_3 != 4 && q1_3 != 7 && q1_3 != 10, 1, ''), 
	if(q1_4 > 0 && q1_4 != 4 && q1_4 != 7 && q1_4 != 10, 1, '')
)}
Cheers,
Tony Partner

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

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Moderatoren: ITEd
Ladezeit der Seite: 0.204 Sekunden
Donation Image