evtree (version 1.0-8)

ContraceptiveChoice: Contraceptive Method Choice

Description

Data of married women who were either not pregnant or do not know if they were at the time of interview. The task is to predict the women's current contraceptive method choice (no use, long-term methods, short-term methods) based on her demographic and socio-economic characteristics.

Usage

data("ContraceptiveChoice")

Arguments

Format

A data frame containing 1,437 observations on 10 variables.

wifes_age

wife's age in years.

wifes_education

ordered factor indicating the wife's education, with levels "low", "medium-low", "medium-high" and "high".

husbands_education

ordered factor indicating the wife's education, with levels "low", "medium-low", "medium-high" and "high".

number_of_children

number of children.

wifes_religion

binary variable indicating the wife's religion, with levels "non-Islam" and "Islam".

wife_now_working

binary variable indicating if the wife is working.

husbands_occupation

ordered factor indicating the husbands occupation, with levels "low", "medium-low", "medium-high" and "high".

standard_of_living_index

standard of living index with levels "low", "medium-low", "medium-high" and "high".

media_exposure

binary variable indicating media exposure, with levels "good" and "not good".

contraceptive_method_used

factor variable indicating the contraceptive method used, with levels "no-use", "long-term" and "short-term".

References

Lim, T.-S., Loh, W.-Y. & Shih, Y.-S. (1999). A Comparison of Prediction Accuracy, Complexity, and Training Time of Thirty-three Old and New Classification Algorithms. Machine Learning, 40(3), 203--228.

Examples

# NOT RUN {
data("ContraceptiveChoice")
summary(ContraceptiveChoice)
# }
# NOT RUN {
suppressWarnings(RNGversion("3.5.0"))
set.seed(1090)
contt <- evtree(contraceptive_method_used ~ . , data = ContraceptiveChoice) 
contt
table(predict(contt), ContraceptiveChoice$contraceptive_method_used)
plot(contt)
# }