Capping a weight refers to limiting the maximum value that a weight can take. For example, where weights are capped at 5 it means that any weight computed to be greater than 5 is returned as 5.
Requirements
- A weight variable
Method
- In the Data Sources tree, hover between any variables and select + > Custom Code > JavaScript > Numeric.
- Add appropriate entries for Name and Label in the General tab.
-
In the JavaScript editor, paste the following code:
Math.min(maxValue,weightVariable)where weightVariable is the name of the variable that is the current weight, and maxValue is the maximum value that you wish the weight to take (i.e., the cap).
- Check Usable as a weight for the new weight variable in the object inspector.
- Apply the newly created weight to any tables and/or charts to be weighted.
Next
How to Use Frequency Weights in Displayr
How to Make Merged Categories Appear in Targets When Weighting
UPCOMING WEBINAR: 10 Market Research Predictions Over the Next 4 Years