Profiles {idefix} | R Documentation |
Profiles generation.
Description
Function to generate all possible combinations of attribute levels (i.e. all possible profiles).
Usage
Profiles(lvls, coding, c.lvls = NULL)
Arguments
lvls |
A numeric vector which contains for each attribute the number of levels. |
coding |
Type of coding that needs to be used for each attribute. |
c.lvls |
A list containing numeric vectors with the attribute levels for
each continuous attribute. The default is |
Details
Valid arguments for coding
are C
, D
and E
. When
using C
the attribute will be treated as continuous and no coding will
be applied. All possible levels should then be specified in c.lvls
. If
D
(dummy coding) is used contr.treatment
will be applied
to that attribute. For E
(effect coding) contr.sum
will
be applied.
Value
A numeric matrix which contains all possible profiles.
Examples
# Without continuous attributes
at.lvls <- c(3, 4, 2) # 3 Attributes with respectively 3, 4 and 2 levels.
c.type <- c("E", "E", "E") # All Effect coded.
Profiles(lvls = at.lvls, coding = c.type) # Generate profiles.
# With continuous attributes
at.lvls <- c(3, 4, 2) # 3 attributes with respectively 3, 4 and 2 levels.
# First attribute is dummy coded, second and third are continuous.
c.type <- c("D", "C", "C")
# Levels for continuous attributes, in the same order.
con.lvls <- list(c(4, 6, 8, 10), c(7, 9))
Profiles(lvls = at.lvls, coding = c.type, c.lvls = con.lvls)
[Package idefix version 1.0.3 Index]