Lighthouse Studio

MaxDiff Functions

MaxDiff Functions are only applicable in studies containing MaxDiff exercises.  The functions below are useful when advanced researchers want to customize the format for their MaxDiff questions.

 

Sawtooth Script:

Description:

BanditMaxDiff (ExerciseName, Items, Thompson)

List function for BanditMaxDiff. More info.

MaxDiffDesignLabel

(ExerciseName_Question#, Position#)

Returns the item text for the specified MaxDiff question for the specified Position#.  This function is used when researchers want to customize the format of their MaxDiff questions.

MaxDiffDesignValue

(ExerciseName_Question#, Position#)

Returns the item value for the specified MaxDiff question for the specified Position#.  This function is used when researchers want to customize the format of their MaxDiff questions.

MaxDiffRankAttLabel(ExerciseName, Rank#)

 

Returns the list item label for the item with the rank specified. So a rank of 1 would return the list item label with the highest maxdiff logit score. More info.

MaxDiffRankAttValue(ExerciseName, Rank#)

 

 

Returns the list item value for the item with the rank specified. So a rank of 1 would return the list item value with the highest maxdiff logit score. More info.

MaxDiffRLH(ExerciseName)

Returns the RLH (Root Likelihood) fit statistic for the logit estimation. More info.

MaxDiffRSQ(ExerciseName)

Returns the RSQ (Pseudo R-Squared) fit statistic for the logit estimation. More info.

MaxDiffScore(ExerciseName, ItemIndex)

Returns the maxdiff logit score for the ItemIndex of the list associated with ExerciseName. More info.

MaxDiffCurrentSet()

Returns the index number for the ith MaxDiff set (question) in the exercise.  For the first set it will return a 1, the second one a 2, etc.  Must be used inside of the MaxDiff question. This function is different than other Sawtooth Script.  See Location Specific Functions.

MaxDiffTotalSets()

Returns the total number of MaxDiff sets (questions) in the current exercise.  Must be used inside of a MaxDiff question. This function is different than other Sawtooth Script.  See Location Specific Functions.

MaxDiffVersion ()

Returns the design version number and question name.  This function is useful when creating paper-and-pencil interviews involving multiple versions.  (Example: D-1, T-MXDIFF_1).  Only available within a MaxDiff task. This function is different than other Sawtooth Script.  See Location Specific Functions.

 

For additional flexibility in Sawtooth Scripting, see the Unverified Perl documentation.

 

 

Created with Help & Manual 8 and styled with Premium Pack Version 4 © by EC Software