User:Tomasz.bartlomowicz/Conjoint R

conjoint R – statistical software package for GNU R program. It contains the implementation of the traditional conjoint analysis method. It is written in R programming language as the development (module) of popular statistical software in the form of GNU R program, it also works with programs dedicated to R environment, such as: RStudio and Microsoft R Application Network.

The conjoint R package covers the set of functions facilitating stated preference analysis based on empirical data representing consumers’ assessments of product or service profiles (the so-called total utilities, empirical utilities). Total utilities are subject to decomposition into the so-called part-worths utilities, which in further analysis are used to determine product or service importance, to define a product with optimal features, to separate segments of buyers with similar preferences, etc. The decomposition is carried out based on the linear multiple regression model with dummy variables (lm function from stats R package [R Core Team 2018 ]). The conjoint package allow as follows:
 * estimation of conjoint analysis model parameters (part-worths utilities) in the cross-section of respondents (individual models) and the total sample (aggregated model),
 * estimation of attributes’ importance (features describing profiles of products or services),
 * estimation of the theoretical usefulness of complete product or service profiles,
 * estimation of simulation profiles as market share,
 * segmentation of respondents.

In addition, the package offers functions generating full and fractional (including orthogonal and effective) factorial design, necessary to prepare a proper questionnaire representing the tool for collecting data on respondents’ stated preferences using the conjoint analysis method.

The conjoint package source code is published based on GNU GPL licence rules. Binary versions are available for Windows, Macintosh systems and Unix systems (including Linux as the natural environment for GNU R project).

Requirements
The correct functioning of conjoint package requires installing GNU R basic version and also additional packages (e.g. AlgDesign R package [Wheeler 2015 ] and others), which starting from 3.3.2 version of GNU R are automatically downloaded and installed including the conjoint package. The package can be downloaded and installed from the website of CRAN R repository (https://CRAN.R-project.org/package=conjoint).

History and versions
The first version of conjoint package on CRAN server was available on October 2, 2011. Since then the package has been gradually developed and adapted to current standards, including various hardware platforms. The package can be installed on a computer with a 32-bit or a 64-bit processor. The package functionality is identical in both cases, with the exception of fractional factorial designs. In 32-bit systems it is possible to obtain a different fractional factorial design than in the case of 64-bit systems (it results from the numerical determinants of the machine word length and its impact on the seed of the random number generator, which is used in the procedure of fractional factorial design generation). The presented examples were developed using 64-bit processors working under the control of Windows 10 operating system.

Package functions
The current version of conjoint (1.41) package offers 16 functions, which allow for: model parameters estimation of conjoint analysis and respondents’ segmentation (functions: caModel, caSegmentation), estimation of theoretical part-worths utilities and total utilities in the cross-section of respondents (functions: caPartUtilities, caTotalUtilities), estimation of attributes’ importance and part-worths utilities of attributes’ levels at an aggregated level (functions: caImportance, caUtilities), and also – within the framework of simulation analysis – market share estimations of simulation profiles (functions: caBTL, caLogit, caMaxUtility). The special purpose functions include the function converting the empirical preference data set (caRankToScore function) and the functions which allow obtaining the aggregate results of the selected measurements and simulations (functions: Conjoint, ShowAllSimulations and ShowAllUtilities). In addition, the package offers tools supporting the design of a questionnaire survey, i.e. the construction of appropriate factorial designs, in particular to reduce the complete set of profiles in the form of fractional designs (orthogonal and effective). For this purpose the conjoint R package uses functions of AlgDesign R package [Wheeler 2015 ]. The application of AlgDesign package functions in conjoint package is carried out in the form of functions, which allow generating orthogonal and effective fractional factorial designs and their encoding using artificial variables (functions: caFactorialDesign, caEncodedDesign andcaRecreatedDesign). In order to generate the appropriate factorial (full and fractional) design the data regarding the number of taken into account attributes (variables, features, factors) are sufficient and their levels (realizations, values, observations) as well as the names of attributes and levels. The detailed characteristics of all the available functions is provided in the official documentation of conjoint R package and on other unofficial websites, , , presenting the package application. The table presents the concise description of conjoint R package functions.

Package datasets
In version 1.41 of the conjoint R package there are 9 datasets that allow the presentation of using of the package functions. In each of datasets there are exemplary data describing: respondents' preferences (in the form of a data matrix or data vector), fractional factorial experiment design (in the form of a data matrix) and the names of individual variables' levels (in the form of data vector). In some datasets there is also design representing simulation profiles (in the form of a data matrix) that allows analysis of the market share of (products or services) profiles that were not included in the experiment design. Detailed characteristics of all datasets are available in the official documentation of the conjoint package. The table presents a short description and the content of selected datasets of conjoint R package.

Research construction
Declaration of the research variables (including the relevant variable levels): flavour (chocolate, vanilla, strawberry), price ($1.50, $2.00, $2.50), container (cone, cup) and topping (yes, no):

Determining fractional, orthogonal factorial design with variable names and their levels for the needs of questionnaire construction:

Encoding variable levels of the fractional design:

Verification (using covariance and correlation matrix) of the fractional design quality:

Data loading
Loading from external files: data on empirical preferences, research design, variable names and their levels

Data files in comma-separated values (.csv format) to be downloaded: ice_preferences.csv, ice_profiles.csv, ice_levels.csv

Change of data format about preferences from rank ordering (so-called ranking) into importance assessments (so-called rating):

Measurement of preferences on an individual level (for selected respondents)
Conjoint analysis model estimation for the 1-st respondent:

Determining relative importance of variables (attributes) for the 1-st respondent:

Measurement of preferences on an aggregated level (in the cross-section of respondents)
Measurement of part-worths utilities:

Measurement of total utilities:

Summary of the most important preference measurement results using the Conjoint function:

Research construction
Declaration of the research variables (including the relevant variable levels): purpose (cognitive, vacation, health, business), form (organized, own), season (summer, winter), accommodation (1-2-3 star hotel, 4-5 star hotel, guesthouse, hostel):

Determining fractional factorial design with variable names and their levels for the needs of questionnaire construction:

Encoding variable levels of the fractional design:

Data loading
Loading from external files: data on empirical preferences, research design, variable names, their levels and simulation profiles

Data files in comma-separated values (.csv format) to be downloaded: journey_preferences.csv, journey_profiles.csv, journej_levels.csv, journey_simulations.csv

Measurement of preferences (on an individual and aggregated level)
Measurement of part-worths utilities (in the cross-section of respondents):

Measurement of total utilities (in the cross-section of respondents):

Determining the relative importance of features (for the respondent No.306):

Summary of the most important preference measurement results using the Conjoint function (for the respondent No. 306):

Summary of the most important preference measurement results using the Conjoint function (in the cross-section of respondents):

Segmentation of respondents
Segmentation using k-means method - the default division into 2 segments:

Segmentation using k-means method – division into 3 segments:

Visualization of the division into 3 segments:

Market share analysis of simulation profiles
Market share analysis of simulation profiles using maximum utility model, BTL probability model (Bradley-Terry-Luce Model) and logit model: