# Complex Analysis?

5 years 3 months ago #76660
BestUndecided created the topic: Complex Analysis?
I created a whole survey with 18 questions. Each question has four answers associated with an answer type P, G, E or N. I would like to generate results based on which answer type was most selected, followed by which answer type was second most selected as well as what that means to the user.

I find that the assessment can only use total values of the question group or total group (my question type is list radio). The problem with this is that there are about 74,000 combinations.
I found I would have to set the assessment values for 1 for P, 20 for G, 500 for E and 10000 for N in order to differentiate how many times each answer type was selected.
[this is because without 0 overlap, a the assessment can not be sure which answers were selected]

with this set up I wrote a simple code to factor out each variable from largest to smallest using python. The code works and generates the proper responses.

Is there any way to have lime survey run the code over the total assessment value, and place the returned value in the email or concluding screen?

Am I overlooking a simpler way to do this?

any help would be greatly appreciated.

5 years 3 months ago - 5 years 3 months ago #76680 by Steve01
Steve01 replied the topic: Aw: Complex Analysis?
Hello,

perhaps the ExpressionManager, docs.limesurvey.org/Expression+Manager is able to help you with your problem. You can for example sum up how many times a person answered P with an Expression like
`sum(que1.valueNAOK=='P',que2.valueNAOK=='P', ...)`
and save the value in one hidden "Equation" question (so four "Equation" questions each for one answer). You could use these answers to compare the values at the end of the survey, e.g.
`if(sumP.valueNAOK > sumG.valueNAOK && sumP.valueNAOK > sumE.valueNAOK ..., 'You selected P x  times', if((sumG.valueNAOK > sumE.valueNAOK && ...) ... )`

Mit freundlichen Grüßen/Best regards,

Stefan Gohlke
LimeSurvey Team
Last Edit: 5 years 3 months ago by Steve01.

5 years 3 months ago #76691
BestUndecided replied the topic: Aw: Complex Analysis?
Thank you Steve, I appreciate it.

Just wondering, where do I build my survey? I had built one on limequery but now see it is v1.91. Where can I build with v1.92?

5 years 3 months ago #76937 by Steve01
Steve01 replied the topic: Aw: Complex Analysis?
Hello,

sorry, I don't understand your question/problem. There isn't really a change in the gui so you create your survey as you have done in LimeSurvey 1.91+ or prior versions.

Mit freundlichen Grüßen/Best regards,

Stefan Gohlke
LimeSurvey Team

5 years 3 months ago #76941
BestUndecided replied the topic: Aw: Complex Analysis?
sorry let me rephrase that.

I had been using LimeSurvey Professional (previously LimeService) to build my surveys on the web. LimeSurvey Professional (previously LimeService) only has version 1.91 available and will not upgrade to v1.92 for another month or so. Is there anywhere I can build a survey on the web with LimeSurvey 1.92 currently?

5 years 3 months ago #76946 by Steve01
Steve01 replied the topic: Aw: Complex Analysis?
Hello,

sorry, I read LimeSurvey and not LimeQuery. At the moment you can use the LimeSurvey Demo at www.limesurvey.org/en/Demo to try it out. Perhaps you can even create your survey and export it but other users might see your survey.

I asked Carsten when LimeSurvey Professional (previously LimeService) will be updated to 1.92, he told me it is scheduled in the beginning of April.

Mit freundlichen Grüßen/Best regards,

Stefan Gohlke
LimeSurvey Team

5 years 2 months ago #77364
BestUndecided replied the topic: Aw: Complex Analysis?
So I finally got Limesurvey 1.92 working on a hosted account. I am trying to create the survey and got confused on your suggestion. Could you clarify?

So you suggested that I would create 4 hidden "equation questions" per visible question and put that code in it. My question is why is this per visible question.

I can understand one hidden question per answer type (P,E,N,G so 4 total) at the end of the survey that would total all the times that answer type was selected in the 18 questions. I can't imagine having to create 72 questions to figure out the sum of 18 questions.

Furthermore, where do I place the code which sums the answer, in the question or an answer choice?

Can I just add a code to each answer which will add 1 to a variable like
`if "THIS ANSWER IS SELECTED" {ptotal = ptotal+ 1}" //i'm not sure how I would really do this`

How would I use these totals to affect my assessment? I have 33 possible assessments based on the two most popular answer types.

5 years 2 months ago #77474
BestUndecided replied the topic: Aw: Complex Analysis?
Ok so now I understand what you meant in your first reply.

`sum(Q1.codeNAOK=='Q1P',Q2.codeNAOK=='Q2P', ...)`
to four hidden equation questions, testing for P, N, E, and G.

Now I have the total number of each response.

How do I make an answer default based on this information?

The reason I need an answer to default based on this information is each answer will have an assessment value and I can assign assessment based on this last value.

Thank you for any help. Truly appreciate it.