Learn how to perform a conjoint assessment using R and how to interpret the results.
- [Instructor] It might be helpful in thinking about this type of analysis to first take a look at the data. We actually have three different data files this time around, so let's connect to each one. So I'm going to select line two in the code and run that, line three, and run that, and line four, and run that as well. And let's double-click on the matrix in the environment pane. Now this is the dataset that has six observations running across three variables, so let's go ahead and click on that.
So here's what you can imagine from this sample data. We wanted to find out from users which of these three attributes they were most interested in. Each attribute has multiple layers. So let me give you an example. The photography feature has three layers. One for editing, one for filtering, and one for collage. So in other words, this is what a user could potentially do with the photography functionality on our new social media platform. They can do one of these three pieces of functionality with photography.
And we can see that by clicking on our reference data, this is the one that has the 17 observations and one variable, so we'll open that up, and there they are. The levels we just discussed for photography are there, as well as all of the other functionality that we determined were potential routes for our new social media platform. So now if you double-click on the last of those three data sets, you'll see our survey results.
So that's the one with 500 observations and six variables. So what we did is we asked the survey respondents to rank their level of interest in each chosen feature that made our survey. So that's what each row represents. A survey response from one user is what the columns represent. So the different combinations that we tested for, you can see that there were six combinations in all. So in other words, we tested for six different routes for our social media platform to determine the best combination of features.
Let's go ahead and X out of our data windows, so we can see our code again. And to assess our data, there is a conjoint package available for R. Now, you may need to install this package in the first place, and if you do, R will provide an error message when you run the line I'm about to run. It will say something like there is no package called conjoint. And if you do, that's okay, just go to step one here if you received that error message. By removing that hashtag there on step one, in front of the line, and just running that.
So that's where it says isntall.packages conjoint, you may need to run that to install it in the first place. I already have the package installed, though, so I'm going to go ahead and run that line. So ultimately, our analysis is going to generate a utility rank. The higher the rank, the more demand we can expect from the market for those specific attributes. So if we wanted to see just one respondent's take, we could do that. We could call the caUtilities function and pass it the parameters that we want it to assess.
So I'm going to do that this way, I'm going to type in caUtilities for the function name, and then I'm going to pass that for the Y, are myConjointData. I'm then going to specify that I only want to look at the first specific row in our data set. And I do that with specifying the number one. And now I'm going to specify, for our X data, X equals myConjointDataProfilesMatrix, and then this function needs a third value for the Z, and that's going to by myConjointDataLevelNames.
So those are the three data files that we looked at at the beginning of our code. And so let's go ahead and run this. And this user is very interested in editing functionality. That's what the graph on our plot shows us. So let's take a look at this real quick. We can see that we have three features that are being assessed for our photography functionality. What this says, what this graph says, is that this particular user ranks the ability to edit photography the highest, they find the most value from that.
In terms of filtering and collage, they rank them pretty much exactly the same, is what it appears here. So this user is very interested in editing functionality and considers filtering and collage on the same level and of lesser value. And if we wanted to just quickly take a look at this first user respondent's data, I could simply write myConjointData, and again specify that we just want to look at the first row, and let's run that.
So here in the console, we see that they listed profile four as their highest-ranking profile. What's important to point out here is what our algorithm does is it weights the value of our different levels in a way that helps us to distill their relative utility. Now, if we wanted to ladder up our analysis, we could do the same command, but pass in the entire data set. What we have plotted now in our plot window is the equivalent to a focus group of one, and it's important to be more statistically relevant than one.
You can learn more about this by reading up on the central limit theorem. The other thing is we have 500 respondents in our data set, so this shouldn't be a problem. I'm going to clear the plot that we generated by clicking on the broom icon in the plot section, yes, clear plots. And I'm going to apply our full data set. So the way I do that is I'm going to call the caUtilities function once more, then go in to pass it our Y data, and that's going to be myConjointData.
All the data, this time. Pass it the X, which is X equals myConjointDataProfilesMatrix, and then the Z, which is going to be myConjointDataLevelNames. And let's go ahead and run that. So now in our plot window, we can see that our first responder must've been a bit of an outlier, as they were most interested in editing functionality for our photo feature.
But the overall group is much more interested in filtering. So here we leveraged our conjoint algorithm to aggregate and distill the relative importance of our potential features for our new social media platform to the market.
In this course, discover how to gain valuable insights from large data sets using specific languages and tools. Follow Chris DallaVilla as he walks through how to use R, Python, and Tableau to perform data modeling and assess performance. As Chris dives into these concepts, he shares specific case studies that come directly from his own work with clients. Plus, he shares three essential—and practical—best practices for data-driven marketing that you can use to bolster your organization's marketing performance.
- Installing R, Python, and Tableau
- Navigating the UI for R, Python, and Tableau
- Using R, Python, and Tableau
- Exploratory analysis
- Performing regression analysis
- Performing a cluster analysis
- Performing a conjoint assessment
- Stakeholder alignment