ContraceptiveChoice {evtree} | R Documentation |
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")
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"
.
Source
This dataset is a subset of the 1987 National Indonesia Contraceptive Prevalence Survey and was created by Tjen-Sien Lim.
It has been taken from the UCI Repository Of Machine Learning Databases at
http://archive.ics.uci.edu/ml/.
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
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)
## End(Not run)