Description Usage Arguments Author(s) References See Also Examples
View source: R/caFactorialDesign.R
Function caFactorialDesign creates full or fractional factorial design. Function can return orthogonal factorial design.
1 | caFactorialDesign(data, type="null", cards=NA, seed=123)
|
data |
experiment whose design consists of two or more factors, each with with 2 or more discrete levels |
type |
type of factorial design (possible values: "full", "fractional", "ca", "aca", "orthogonal"; default value: type="null") |
cards |
number of experimental runs |
seed |
seed settings (default value: seed=123) |
Andrzej Bak andrzej.bak@ue.wroc.pl,
Tomasz Bartlomowicz tomasz.bartlomowicz@ue.wroc.pl
Department of Econometrics and Computer Science, Wroclaw University of Economics, Poland http://keii.ue.wroc.pl/conjoint
Bak A., Bartlomowicz T. (2012), Conjoint analysis method and its implementation in conjoint R package, [In:] Pociecha J., Decker R. (Eds.), Data analysis methods and its applications, C.H.Beck, Warszawa, p.239-248.
Bak A. (2009), Analiza Conjoint [Conjoint Analysis], [In:] Walesiak M., Gatnar E. (Eds.), Statystyczna analiza danych z wykorzystaniem programu R [Statistical Data Analysis using R], Wydawnictwo Naukowe PWN, Warszawa, p. 283-317.
Green P.E., Srinivasan V. (1978), Conjoint Analysis in Consumer Research: Issues and Outlook, "Journal of Consumer Research", September, 5, p. 103-123.
SPSS 6.1 Categories (1994), SPSS Inc., Chicago.
caEncodedDesign
and caRecreatedDesign
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | #Example 1
library(conjoint)
experiment<-expand.grid(
price=c("low","medium","high"),
variety=c("black","green","red"),
kind=c("bags","granulated","leafy"),
aroma=c("yes","no"))
design=caFactorialDesign(data=experiment,type="full")
print(design)
print(cor(caEncodedDesign(design)))
#Example 2
library(conjoint)
experiment<-expand.grid(
price=c("low","medium","high"),
variety=c("black","green","red"),
kind=c("bags","granulated","leafy"),
aroma=c("yes","no"))
design=caFactorialDesign(data=experiment)
print(design)
print(cor(caEncodedDesign(design)))
#Example 3
library(conjoint)
experiment<-expand.grid(
price=c("low","medium","high"),
variety=c("black","green","red"),
kind=c("bags","granulated","leafy"),
aroma=c("yes","no"))
design=caFactorialDesign(data=experiment,type="orthogonal")
print(design)
print(cor(caEncodedDesign(design)))
#Example 4
library(conjoint)
experiment<-expand.grid(
price=c("low","medium","high"),
variety=c("black","green","red"),
kind=c("bags","granulated","leafy"),
aroma=c("yes","no"))
design=caFactorialDesign(data=experiment,type="fractional",cards=16)
print(design)
print(cor(caEncodedDesign(design)))
#Example 5
library(conjoint)
experiment<-expand.grid(
price=c("low","medium","high"),
variety=c("black","green","red"),
kind=c("bags","granulated","leafy"),
aroma=c("yes","no"))
design=caFactorialDesign(data=experiment,type="fractional")
print(design)
print(cor(caEncodedDesign(design)))
#Example 6
library(conjoint)
experiment<-expand.grid(
price=c("low","medium","high"),
variety=c("black","green","red"),
kind=c("bags","granulated","leafy"),
aroma=c("yes","no"))
design=caFactorialDesign(data=experiment,type="ca")
print(design)
print(cor(caEncodedDesign(design)))
#Example 7
library(conjoint)
experiment<-expand.grid(
price=c("low","medium","high"),
variety=c("black","green","red"),
kind=c("bags","granulated","leafy"),
aroma=c("yes","no"))
design=caFactorialDesign(data=experiment,type="aca")
print(design)
print(cor(caEncodedDesign(design)))
|
Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: 'rgl_init' failed, running with rgl.useNULL = TRUE
3: .onUnload failed in unloadNamespace() for 'rgl', details:
call: fun(...)
error: object 'rgl_quit' not found
price variety kind aroma
1 low black bags yes
2 medium black bags yes
3 high black bags yes
4 low green bags yes
5 medium green bags yes
6 high green bags yes
7 low red bags yes
8 medium red bags yes
9 high red bags yes
10 low black granulated yes
11 medium black granulated yes
12 high black granulated yes
13 low green granulated yes
14 medium green granulated yes
15 high green granulated yes
16 low red granulated yes
17 medium red granulated yes
18 high red granulated yes
19 low black leafy yes
20 medium black leafy yes
21 high black leafy yes
22 low green leafy yes
23 medium green leafy yes
24 high green leafy yes
25 low red leafy yes
26 medium red leafy yes
27 high red leafy yes
28 low black bags no
29 medium black bags no
30 high black bags no
31 low green bags no
32 medium green bags no
33 high green bags no
34 low red bags no
35 medium red bags no
36 high red bags no
37 low black granulated no
38 medium black granulated no
39 high black granulated no
40 low green granulated no
41 medium green granulated no
42 high green granulated no
43 low red granulated no
44 medium red granulated no
45 high red granulated no
46 low black leafy no
47 medium black leafy no
48 high black leafy no
49 low green leafy no
50 medium green leafy no
51 high green leafy no
52 low red leafy no
53 medium red leafy no
54 high red leafy no
price variety kind aroma
price 1 0 0 0
variety 0 1 0 0
kind 0 0 1 0
aroma 0 0 0 1
price variety kind aroma
1 low black bags yes
5 medium green bags yes
7 low red bags yes
12 high black granulated yes
17 medium red granulated yes
20 medium black leafy yes
24 high green leafy yes
25 low red leafy yes
29 medium black bags no
36 high red bags no
40 low green granulated no
46 low black leafy no
53 medium red leafy no
price variety kind aroma
price 1.00000000 0 0 -0.04743416
variety 0.00000000 1 0 0.00000000
kind 0.00000000 0 1 0.00000000
aroma -0.04743416 0 0 1.00000000
price variety kind aroma
4 low green bags yes
9 high red bags yes
10 low black granulated yes
17 medium red granulated yes
21 high black leafy yes
23 medium green leafy yes
29 medium black bags no
42 high green granulated no
52 low red leafy no
price variety kind aroma
price 1 0 0 0
variety 0 1 0 0
kind 0 0 1 0
aroma 0 0 0 1
price variety kind aroma
3 high black bags yes
8 medium red bags yes
10 low black granulated yes
15 high green granulated yes
22 low green leafy yes
23 medium green leafy yes
27 high red leafy yes
31 low green bags no
33 high green bags no
35 medium red bags no
39 high black granulated no
41 medium green granulated no
43 low red granulated no
46 low black leafy no
47 medium black leafy no
54 high red leafy no
price variety kind aroma
price 1.00000000 0.09561829 -0.09714286 -0.08571429
variety 0.09561829 1.00000000 -0.09561829 0.00000000
kind -0.09714286 -0.09561829 1.00000000 -0.08571429
aroma -0.08571429 0.00000000 -0.08571429 1.00000000
price variety kind aroma
4 low green bags yes
8 medium red bags yes
15 high green granulated yes
17 medium red granulated yes
21 high black leafy yes
22 low green leafy yes
29 medium black bags no
33 high green bags no
34 low red bags no
37 low black granulated no
41 medium green granulated no
50 medium green leafy no
54 high red leafy no
price variety kind aroma
price 1.000000 0.000000 0.23671604 0.00000000
variety 0.000000 1.000000 -0.11744404 -0.11385501
kind 0.236716 -0.117444 1.00000000 -0.08596024
aroma 0.000000 -0.113855 -0.08596024 1.00000000
price variety kind aroma
3 high black bags yes
5 medium green bags yes
16 low red granulated yes
24 high green leafy yes
31 low green bags no
36 high red bags no
42 high green granulated no
47 medium black leafy no
price variety kind aroma
price 1.00000000 -0.2132007 0.09090909 0
variety -0.21320072 1.0000000 -0.21320072 0
kind 0.09090909 -0.2132007 1.00000000 0
aroma 0.00000000 0.0000000 0.00000000 1
price variety kind aroma
1 low black bags yes
5 medium green bags yes
7 low red bags yes
12 high black granulated yes
17 medium red granulated yes
20 medium black leafy yes
24 high green leafy yes
25 low red leafy yes
29 medium black bags no
36 high red bags no
40 low green granulated no
46 low black leafy no
53 medium red leafy no
price variety kind aroma
price 1.00000000 0 0 -0.04743416
variety 0.00000000 1 0 0.00000000
kind 0.00000000 0 1 0.00000000
aroma -0.04743416 0 0 1.00000000
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.