Quick Qualtrics Tricks #3 : Scale results calculation

There are time when you’re running a Quatrics survey and would like to calculate the results during survey run on the fly and present this back to the user. Even if it’s not as straight forward there is an advanced way to do this with Qualtrics.

The most basic way to do this it to use Qualtrics feature of "Scoring" where you can give each response in each question a score and request that Qualtrics to present the user score at the end of the section or the survey. This is obviously mainly intended for tests where you want to present the user with feedback at the end.

If you have a simple scale it is possible to score the responses in a similar way and present a scale summary. You could also use that result with piped codes and embedded if you want a more elaborate feedback using another advanced Qualtrics feature called "Math Operations".

But one of my scenarios went beyond all that. For calculating the SVS Schwartz (Personal) Values Scale this is what I needed (taken from the draft manual 2009):

Scale Use Correction

Individuals and cultural groups differ in their use of the response scale. When treating value priorities either as independent or as dependent variables, it is necessary to correct for scale use. In such analyses, scale use differences often distort findings and lead to incorrect conclusions.

A. Compute each individual’s total score on all value items and divide by the total number of items. I call this the MRAT (Mean RATing for the particular individual).

B1. Center scores of each of the items for an individual around that individual’s MRAT. Then compute scores for the 10 values by taking the means of the centered items.

So, to be able to calculate something as complex as that to be able to be able to show – for example – Openness to Change (topen), we need something more elaborate using a Javascript code.

James from Qualtrics support helped me out with the following :

in JavaScript within Qualtrics you will have to do something like this:

First you will need to add in a separate embedded data field into your survey flow for each of the values that you want included in your reports.

For example if I want "topen" and "tselfenh" to be included I would need both of them in my survey flow so that they appear like so:

You can add in as many fields as you want and need.

The JavaScript which needs to be near the end after all the questions and on a separate page from the questions whose values it uses. It will be similar to the code below: Qualtrics.SurveyEngine.addOnload(function() { var t3 = ${q://QID3/ChoiceTextEntryValue} ; //This is piped text from the question you are pulling the data from you can get this code from the rich text editor by using the pipe text feature. var t12 = ${q://QID12/ChoiceTextEntryValue}; //The piped text is different for different types of input (text entry, multiple choice, etc.) and the QID for each question is different var t27 = ${q://QID27/ChoiceTextEntryValue}; //Each of these piped text fields will be unique to your survey. . . . var t58 = ${q://QID7/ChoiceTextEntryValue}; // One line for each variable that comes from a question. //compute tpo = mean(t3,t12,t27). Will be equal to something like: var tpo = (t3+t12+t27)/3; var tac = (t34+t43+t55+t39)/4; … … var tse = (t13+t15+t56+t8+t22)/5; var topen = (tsd+tst)/2; var tselfenh = (the+tac+tpo)/3; .. .. var tconserv = (ttr+tco+tse)/3; //This calculates all the means but does not save them to the survey. //If you want these values to be saved to the survey as embedded data you will need to code below: Qualtrics.SurveyEngine.setEmbeddedData(‘topen’,topen); //This sets the embedded data, ‘topen’, to the value of the second variable, topen. Qualtrics.SurveyEngine.setEmbeddedData(‘tselfenh’, tselfenh); //This also needs to be done individually for each of the embedded data fields that you want saved to the survey. }

The code is not too complicated but the piped text is different for each survey and depends on what type of input you have and which questions you are using. If you need any help implementing it I would be more than happy to do so; all I would need is your user name and the name of the survey.

Perfect.

I can think of many ways to use this functionality, and I’m guessing this approach to Qualtrics isn’t that obvious evento the most advanced Qualtrics users. Essentially, this allowed me to get a person to take the SVS, calculate the SVS and give the participant a feedback right on the spot. Naturally, this also allows me to save those new scale variables.