Title Conjoint analsis package Package conjoint August 15, 2013 Conjoint is a simple package that implements a conjoint analsis method to measure the preferences. Version 1.39 Date 2012-08-08 Imports AlgDesign, clustersim Author Tomasz Bartlomowicz <tomasz.bartlomowicz@ue.wroc.pl> Maintainer License GPL (>= 2) URL www.r-project.org, Repositor CRAN Date/Publication 2012-08-18 05:40:59 R topics documented: cabtl............................................ 2 caencodeddesign...................................... 3 cafactorialdesign...................................... 4 caimportance........................................ 6 calogit........................................... 7 camautilit........................................ 8 camodel........................................... 9 capartutilities........................................ 10 casegmentation....................................... 11 catotalutilities....................................... 12 cautilities.......................................... 13 Conjoint........................................... 14 czekolada.......................................... 15 herbata............................................ 16 plt............................................. 17 ShowAllSimulations.................................... 17 ShowAllUtilities...................................... 18 tea.............................................. 19 1
2 cabtl Inde 21 cabtl Function cabtl estimates participation (market share) of simulation profiles Function cabtl estimates participation of simulation profiles using probabilistic model BTL (Bradle- Terr-Luce). Function returns vector of percentage participations. The sum of participation should be 100%. cabtl(sm,, ) sm matri of simulation profiles matri of preferences See Also calogit and camautilit simutil<-cabtl(hsimp,hpref,hprof) print("percentage participation of profiles: ", quote=false) print(simutil) #Eample 2
caencodeddesign 3 simutil<-cabtl(csimp,cpref,cprof) print("percentage participation of profiles:", quote=false) print(simutil) caencodeddesign Function caencodeddesign encodes full or fractional factorial design Function caencodeddesign encodes full or fractional factorial design. Function converts design of eperiment to. caencodeddesign(design) design design of eperiment returned b cafactorialdesign function See Also cafactorialdesign eperiment<-epand.grid( price<-c("low","medium","high"), variet<-c("black","green","red"), kind<-c("bags","granulated","leaf"), aroma<-c("es","no")) design<-cafactorialdesign(data=eperiment,tpe="orthogonal")
4 cafactorialdesign print(design) code<-caencodeddesign(design) print(code) print(cor(code)) write.csv2(design,file="orthogonal_factorial_design.csv",row.names=false) write.csv2(code,file="encoded_orthogonal_factorial_design.csv",row.names=false) cafactorialdesign Function cafactorialdesign makes full or fractional factorial design Function cafactorialdesign makes full or fractional factorial design. Function can return orthogonal factorial design. cafactorialdesign(data, tpe="null", cards=na) data tpe cards eperiment whose design consists of two or more factors, each with with 2 or more discrete levels tpe of factorial design (possible values: "full", "fractional", "ca", "aca", "orthogonal"; default value: tpe="null") number of eperimental runs See Also caencodeddesign
cafactorialdesign 5 eperiment<-epand.grid( price<-c("low","medium","high"), variet<-c("black","green","red"), kind<-c("bags","granulated","leaf"), aroma<-c("es","no")) design<-cafactorialdesign(data=eperiment,tpe="full") print(design) print(cor(caencodeddesign(design))) #Eample 2 eperiment<-epand.grid( price<-c("low","medium","high"), variet<-c("black","green","red"), kind<-c("bags","granulated","leaf"), aroma<-c("es","no")) design<-cafactorialdesign(data=eperiment) print(design) print(cor(caencodeddesign(design))) #Eample 3 eperiment<-epand.grid( price<-c("low","medium","high"), variet<-c("black","green","red"), kind<-c("bags","granulated","leaf"), aroma<-c("es","no")) design<-cafactorialdesign(data=eperiment,tpe="fractional",cards=16) print(design) print(cor(caencodeddesign(design))) #Eample 4 eperiment<-epand.grid( price<-c("low","medium","high"), variet<-c("black","green","red"), kind<-c("bags","granulated","leaf"), aroma<-c("es","no")) design<-cafactorialdesign(data=eperiment,tpe="fractional") print(design) print(cor(caencodeddesign(design))) #Eample 5 eperiment<-epand.grid( price<-c("low","medium","high"), variet<-c("black","green","red"), kind<-c("bags","granulated","leaf"), aroma<-c("es","no")) design<-cafactorialdesign(data=eperiment,tpe="ca") print(design) print(cor(caencodeddesign(design)))
6 caimportance #Eample 6 eperiment<-epand.grid( price<-c("low","medium","high"), variet<-c("black","green","red"), kind<-c("bags","granulated","leaf"), aroma<-c("es","no")) design<-cafactorialdesign(data=eperiment,tpe="aca") print(design) print(cor(caencodeddesign(design))) #Eample 7 eperiment<-epand.grid( price<-c("low","medium","high"), variet<-c("black","green","red"), kind<-c("bags","granulated","leaf"), aroma<-c("es","no")) design<-cafactorialdesign(data=eperiment,tpe="orthogonal") print(design) print(cor(caencodeddesign(design))) caimportance Function caimportance calculates importance of attributes Function caimportance calculates importance of all attributes. Function returns vector of percentage attributes importance and corresponding chart (barplot). The sum of importance should be 100%. caimportance(, ) matri of preferences
calogit 7 imp<-caimportance(hpref,hprof) print("importance summar: ", quote=false) print(imp) print(paste("sum: ", sum(imp)), quote=false) imp<-caimportance(cpref,cprof) print("importance summar: ", quote=false) print(imp) print(paste("sum: ", sum(imp)), quote=false) calogit Function calogit estimates participation (market share) of simulation profiles Function calogit estimates participation of simulation profiles using logit model. Function returns vector of percentage participations. The sum of participation should be 100%. calogit(sm,, ) sm matri of simulation profiles matri of preferences
8 camautilit See Also cabtl and camautilit simutil<-calogit(hsimp,hpref,hprof) print("percentage participation of profiles:", quote=false) print(simutil) #Eample 2 simutil<-calogit(csimp,cpref,cprof) print("percentage participation of profiles:", quote=false) print(simutil) camautilit Function camautilit estimates participation (market share) of simulation profiles Function camautilit estimates participation of simulation profiles using model of maimum utilit ("first position"). Function returns vector of percentage participations. The sum of participation should be 100%. camautilit(sm,, ) sm matri of simulation profiles matri of preferences
camodel 9 See Also cabtl and calogit simutil<-camautilit(hsimp,hpref,hprof) print("percentage participation of profiles:", quote=false) print(simutil) #Eample 2 simutil<-camautilit(csimp,cpref,cprof) print("percentage participation of profiles:", quote=false) print(simutil) camodel Function camodel estimates parameters of conjoint analsis model Function camodel estimates parameters of conjoint analsis model. Function camodel returns vector of estimated parameters of traditional conjoint analsis model. camodel(, ) vector of preferences, vector should be like single profil of preferences
10 capartutilities <-as.data.frame(hprof) 1<-as.data.frame(hpref[1:nrow(),1]) model<-camodel(1, ) print(model) #Eample 2 <-as.data.frame(cprof) 1<-as.data.frame(cpref[1:nrow(),1]) model<-camodel(1, ) print(model) capartutilities Function capartutilities calculates matri of individual utilities Function capartutilities calculates matri of individual utilities for respondents. Function returns matri of partial utilities (parameters of regresion) for all artificial variables including parameters for reference levels for respondents (with intercept on first place). capartutilities(,, z) z matri of preferences vector of levels names
casegmentation 11 uslall<-capartutilities(hpref,hprof,hlevn) print(uslall) #Eample 2 uslall<-capartutilities(cpref,cprof,clevn) print(uslall) casegmentation Function casegmentation rates respondents on clusters Function casegmentation rates respondents on 3 or n clusters using k-means method. Function takes n = 3 (3 clusters) when there are onl two attributes used - (matri of preferences) and (). Otherwise function casegmentation rates renspondents on n clusters. casegmentation(,, c) matri of preferences c number of clusters (optional), default value: c=3
12 catotalutilities segments<-casegmentation(hpref,hprof) print(segments) #Eample 2 segments<-casegmentation(hpref,hprof, 4) print(segments) catotalutilities Function catotalutilities calculates matri of theoreticall total utilities Function catotalutilities calculates matri of theoreticall total utilities for respondents. Function returns matri of total utilities for n profiles and all respondents. catotalutilities(, ) matri of preferences
cautilities 13 See Also cautilities Usi<-caTotalUtilities(hpref,hprof) print(usi) Usi<-caTotalUtilities(hpref,hprof) print(usi) cautilities Function cautilities calculates utilities of levels of atrtributes Function cautilities calculates utilities of attribute s levels. Function returns vector of utilities. cautilities(,,z) z matri of preferences matri of levels names
14 Conjoint See Also catotalutilities ul<-cautilities(hpref,hprof,hlevn) print(ul) #Eample 2 ul<-cautilities(cpref,cprof,clevn) print(ul) Conjoint Function Conjoint sums up the main results of conjoint analsis Function Conjoint is a combination of following conjoint pakage s functions: capartutilities, cautilities and caimportance. Therefore it sums up the main results of conjoint analsis. Function Conjoint returns matri of partial utilities for levels of variables for respondents, vector of utilities for attribute s levels and vector of percentage attributes importance with corresponding chart (barplot). The sum of importance should be 100 Conjoint(,, z)
czekolada 15 z matri of preferences matri of levels names See Also caimportance, capartutilities and cautilities Conjoint(hpref,hprof,hlevn) #Eample 2 Conjoint(cpref,cprof,clevn) czekolada Sample data for conjoint analsis. Data collected in the surve conducted b W. Nowak in 2000. cpref cprefm cprof clevn csimp
16 herbata Format cpref Vector of preferences (length 1392). cprefm Matri of preferences (87 respondents and 16 profiles). cprof Matri of profiles (5 attributes and 16 profiles). clevn Character vector of names for the attributes levels. csimp Matri of simulation profiles. print(cprof) print(clevn) print(cprefm) print(csimp) herbata Sample data for conjoint analsis. Format Data collected in the surve conducted b M. Baran in 2007. hpref hprefm hprof hlevn hsimp hpref Vector of preferences (length 1300). hprefm Matri of preferences (100 respondents and 13 profiles). hprof Matri of profiles (4 attributes and 13 profiles). hlevn Character vector of names for the attributes levels. hsimp Matri of simulation profiles. print(hprof) print(hlevn) print(hprefm) print(hsimp)
plt 17 plt Sample data for conjoint analsis. Format Artificial data. data(plt) ppref pprof plevn ppref Matri of preferences (6 respondents and 8 profiles). pprof Matri of profiles (3 attributes and 8 profiles). plevn Character vector of names for the attributes levels. data(plt) print(pprof) print(ppref) print(plevn) ShowAllSimulations Function ShowAllSimulations sums up the main results of conjoint simulations Function ShowAllSimulations is a combination of following conjoint pakage s functions: camautilit, cabtl and calogit. Therefore it sums up the main results of simulation using conjoint analsis method. Function ShowAllSimulations returns three vectors of percentage participations using maimum utilit, BTL and logit models. The sum of importance for ever vector should be 100%. ShowAllSimulations(sm,, ) sm matri of simulation profiles matri of preferences
18 ShowAllUtilities See Also cabtl, calogit and camautilit ShowAllSimulations(hsimp,hpref,hprof) #Eample 2 ShowAllSimulations(csimp,cpref,cprof) ShowAllUtilities Function ShowAllUtilities sums up all results of utilit measures Function ShowAllUtilities is a combination of following conjoint pakage s functions: capartutilities, catotalutilities, cautilities and caimportance. Function ShowAllUtilities returns: matri of partial utilities (basic matri of utilities with the intercept), matri of total utilities for n profiles and all respondents, vector of utilities for attribute s levels and vector of percentage attributes importance, with sum of importance. The sum of importance should be 100%. ShowAllUtilities(,, z) z matri of preferences matri of levles names
tea 19 See Also caimportance, capartutilities, catotalutilities and cautilities ShowAllUtilities(hpref,hprof,hlevn) #Eample 2 ShowAllUtilities(cpref,cprof,clevn) tea Sample data for conjoint analsis. Data collected in the surve conducted b M. Baran in 2007. data(tea) tpref tprefm tprof tlevn tsimp
20 tea Format tpref Vector of preferences (length 1300). tprefm Matri of preferences (100 respondents and 13 profiles). tprof Matri of profiles (4 attributes and 13 profiles). tlevn Character vector of names for the attributes levels. tsimp Matri of simulation profiles. data(tea) print(tprof) print(tlevn) print(tprefm) print(tsimp)
Inde Topic datasets czekolada, 15 herbata, 16 plt, 17 tea, 19 Topic multivariate cabtl, 2 caencodeddesign, 3 cafactorialdesign, 4 caimportance, 6 calogit, 7 camautilit, 8 camodel, 9 capartutilities, 10 casegmentation, 11 catotalutilities, 12 cautilities, 13 Conjoint, 14 ShowAllSimulations, 17 ShowAllUtilities, 18 hprof (herbata), 16 hsimp (herbata), 16 plevn (plt), 17 plt, 17 ppref (plt), 17 pprof (plt), 17 ShowAllSimulations, 17 ShowAllUtilities, 18 tea, 19 tlevn (tea), 19 tpref (tea), 19 tprefm (tea), 19 tprof (tea), 19 tsimp (tea), 19 cabtl, 2, 8, 9, 17, 18 caencodeddesign, 3, 4 cafactorialdesign, 3, 4 caimportance, 6, 14, 15, 18, 19 calogit, 2, 7, 9, 17, 18 camautilit, 2, 8, 8, 17, 18 camodel, 9 capartutilities, 10, 14, 15, 18, 19 casegmentation, 11 catotalutilities, 12, 14, 18, 19 cautilities, 13, 13, 14, 15, 18, 19 clevn (czekolada), 15 Conjoint, 14 cpref (czekolada), 15 cprefm (czekolada), 15 cprof (czekolada), 15 csimp (czekolada), 15 czekolada, 15 herbata, 16 hlevn (herbata), 16 hpref (herbata), 16 hprefm (herbata), 16 21