In this video, I'd like to walk through an example of how to actually perform the conjoint analysis in R. So we're going to look at some R code in order to perform a conjoint analysis. Is a tongue twister. Okay, let's get started. The package we're going to use is called conjoint. So you're going to need to install that package in your RStudio environment. It's a really simple package that's used for traditional conjoint analysis. Then within the package, here are some useful functions and the primary functions that we'll be using. You can see it starts with a lot of ca, and then there's the model, the utilities, the partial utilities. The partial utilities functions is what I described as part worth in the slides. It's also sometimes known as partial utilities, the factorial design, and the encoded design. So why don't we just jump right in. One of the first thing we have to do is figure out what kind of design we're going to use. As I mentioned in the video about attributes, a full factorial design is one in which all the responses and all the different levels are accounted for, and we have all the combinations available, and that's what's known as a full factorial design. In practice, that's really not realistic because you can have hundreds if not thousands of different combinations. So you might want to do some sort of fractional design or an orthogonal design. This process selects the attributes by limiting the amount of loss information, by minimizing the dependencies between the factors and we saw that with the orthogonal design. As you'll see, R will perform this process for you. So in this example, it's a hypothetical example. We're going to create a survey for liking likeliness of reading a novel, right? What is your propensity to choose or buy a particular novel? So we're going to have some factors involved. We're going to choose three factors, pages, the genre, and the author. For the number of pages, we'll just have three broad levels or three broad categories; less than 500 pages, between 500 and 1000 pages, or over 1000 pages. So another way to think about this is the potential buyer of this book, do they like short books? Do they like medium-length books or long books? Now, it might depend on do they like full saga stories or might be just a question of the weight, the weight of carrying the book around? Do they like fiction or non-fiction? Yes, you can have more categories, but for our example, we're just going to stick with these two. But if you so wish, you can have mystery, cooking, hobbies, etc. Then for author, we just have named authors and anonymous authors. We are going to use this factorial design which helps us look at different ways of leveling the attributes. In this case, we're going to create a full factorial design and it'll be a 12 by 3 matrix with all the possible combinations. So what the ca encoded design function does in R is we have on the left-hand side of the table of the categories, the number of pages; short, medium, long, fiction or non-fiction author-type, known, unknown. Then it just encodes it has numbers, 1,2,3,1,3 to the different categories so you're looking at. This allows the computer to handle things easier for analysis. One thing to keep in mind is that when you're looking at the result or something like that, you're just going to see these attributes coded. So you might want to remember or recall what the translation is. Okay. So responses. We talked about this before a little, but I'll go over it again. The responses are generally responses to a survey questionnaire, which can be obtained in many formats. We can do rankings or ratings of the terms. We can look at in terms of what's the likelihood of you buying this product? Do you like this product or are you inclined to recommend this product to a friend? So these all get to this notion of do you like this product? If so, how much do you like it? For our study, we'll create our own responses randomly using a sample function in R. The responses will be in terms of distinct ratings of all the 12 combinations and due to randomization, you should note that the results might not reflect actual real life results. So here, I've shown you the code in a minute, but the profiles are the different combinations of the product. So profile one would be that first row that factorial design which was less than 500 pages, fiction, and unknown author. Then profile two would be the second combination of attributes. Profile three is the next combination of attributes. Then we've asked 10 people here what they thought in terms of those different types of books. So let's look at the R code.