Description Usage Arguments Value Author(s) References See Also Examples
View source: R/implication.index.R
The implication.index.gain
function computes the implication index statistics of Gras (YEAR).
1 2 3 4 5 6 7 8 9 | implication.index.gain(
y,
kidsids,
decision.rule = decision.rule.majority,
h0 = y,
aggregation.rule = aggregation.rule.weighted.mean,
quiet = T,
rquiet = T
)
|
y |
a |
kidsids |
a |
decision.rule |
a |
h0 |
a |
aggregation.rule |
a |
quiet |
a |
rquiet |
a |
A numeric
, the value of the gain.
Emmanuel Rousseaux
FIXME
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 | ritschard.array <- array(
data = c(50,5,5,40,5,8,6,12,10,0,50,6,14,30,2,10,18,2),
dim = c(3,3,2),
dimnames = list(
'civil status' = c('married', "single", 'divorced/widowed'),
'working sector' = c('primary', 'secondary', 'tertiary'),
'sex' = c('man', 'woman')
)
)
ritschard.data <- expand.array(ritschard.array)
ritschard.data
names(ritschard.data)
implication.index.gain(
y = ritschard.data$civil.status,
kidsids = c(rep(1, 141), rep(2, 132)),
h0 = ritschard.data$civil.status
)
implication.index.gain(
y = ritschard.data$civil.status,
kidsids = c(rep(1, 141), rep(2, 132))
)
implication.index.gain(
y = ritschard.data$civil.status,
kidsids = c(rep(1, 141), rep(2, 132)),
aggregation.rule = aggregation.rule.maximum
)
implication.index.gain(
y = ritschard.data$civil.status,
kidsids = c(rep(1, 141), rep(2, 132)),
aggregation.rule = aggregation.rule.minimum
)
implication.index.gain(
y = ritschard.data$civil.status,
kidsids = c(rep(1, 141), rep(2, 132))
)
kidsids.sector <- rep(0, nrow(ritschard.data))
kidsids.sector[ritschard.data$working.sector == 'primary'] <- 1
kidsids.sector[ritschard.data$working.sector == 'secondary'] <- 2
kidsids.sector[ritschard.data$working.sector == 'tertiary'] <- 3
implication.index.gain(
y = ritschard.data$civil.status,
kidsids = kidsids.sector,
h0 = distribution(ritschard.data$civil.status)
)
implication.index.gain(
y = ritschard.data$civil.status,
kidsids = c(rep(1, 141), rep(2, 132)),
h0 = distribution(ritschard.data$civil.status),
decision.rule = decision.rule.married
)
implication.index(
y = ritschard.data$civil.status,
h0 = distribution(ritschard.data$civil.status),
quiet = FALSE
)
implication.index.gain(
y = ritschard.data$civil.status,
kidsids = c(rep(1, 141), rep(2, 132)),
h0 = distribution(ritschard.data$civil.status),
aggregation.rule = aggregation.rule.information.gain
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.