Introduction
This article describes how go from a MaxDiff preference shares table:
To a donut plot visualization of the preference shares:
Requirements
- A document containing MaxDiff respondent-level preference share variables.
Please note these steps require a Displayr license.
Method
With a little code, you can also extract the Total column from the latent class analysis (or any of the columns, for that matter), so that you can get them in to your plot.
Having set up the latent class analysis you can:
- Select your latent class analysis.
- Select Anything > Calculation > Custom Code.
- Paste the code below into the R CODE section.
- Click on your latent class output, select General > GENERAL, and copy the Name if it is different to latent.class.analysis.
- Go back to your new output, and paste in the name in place of latent.class.analysis.
- Change the number at the end of the first line to refer to the number of the column you want to plot.
- Click Calculate.
The code for extracting the column of preference shares is:
1
2
|
pref.shares = latent.class.analysis$class.preference.shares[, 6] pref.shares = sort (pref.shares, decreasing = TRUE ) * 100
|
Here, latent.class.analysis$class.preference.shares[, 6] simply refers to the 6th column in the latent class analysis output table. For the output with 5 classes, this simply refers to the Total column. If you want to chart the shares for a particular class, you could simply change 6 for the number of the class you want to chart.
To make the donut chart:
- Select Visualization > Donut Chart.
- Choose the pref.shares table in the Table menu.
- Click Calculate.
Next
How to Use Hierarchical Bayes for MaxDiff
How to Create MaxDiff Model Ensembles
How to Create a MaxDiff Model Comparison Table
How to Create a MaxDiff Experimental Design
How to Save Classes from a MaxDiff Latent Class Analysis
How to Convert Alchemer MaxDiff Data for Analysis in Displayr