Title: | Datasets from Hosmer, Lemeshow and Sturdivant, "Applied Logistic Regression" (3rd Ed., 2013) |
---|---|
Description: | An unofficial companion to "Applied Logistic Regression" by D.W. Hosmer, S. Lemeshow and R.X. Sturdivant (3rd ed., 2013) containing the dataset used in the book. |
Authors: | Luca Braglia [aut, cre] |
Maintainer: | Luca Braglia <[email protected]> |
License: | GPL-3 |
Version: | 0.9 |
Built: | 2024-11-11 02:58:23 UTC |
Source: | https://github.com/lbraglia/aplore3 |
This package is an unofficial companion to the textbook "Applied Logistic Regression" by D.W. Hosmer, S. Lemeshow and R.X. Sturdivant (3rd ed., 2013).
It includes all the datasets used in the book, both for easy reproducibility and algorithms benchmarking purposes.
Some analysis proposed in the text are reproduced in the examples, in order to provide data testing and code demos at the same time.
The vignette includes all the examples (with graphics too); therefore is organized per-dataset.
Datasets and variables have lower-case name with respect to the original sources. Categorical data were packaged as factor.
Regarding data coding, help pages list the internal/factor representation of the data (eg 1: No, 2: Yes), not the original one (eg 0: No, 1: Yes). This is intended to allow easier/safer recoding based on as.integer, especially for multinomial variables.
Hosmer, D.W., Lemeshow, S. and Sturdivant, R.X. (2013) Applied Logistic Regression, 3rd ed., New York: Wiley
aps dataset.
aps
aps
A data.frame with 508 rows and 11 variables:
Identification Code (1 - 508)
Placement (1: Outpatient, 2: Day Treatment, 3: Intermediate Residential, 4: Residential)
Placement Combined (1: Outpatient or Day Treatment, 2: Intermediate Residential, 3: Residential )
Age at Admission (Years)
Race (1: White, 2: Non-white)
Gender (1: Female, 2: Male)
Neuropsychiatric Disturbance (1: None, 2: Mild, 3: Moderate, 4: Severe)
Emotional Disturbance (1: Not Severe, 2: Severe)
Danger to Others (1: Unlikely, 2: Possible, 3: Probable, 4: Likely)
Elopement Risk (1: No Risk, 2: At Risk)
Length of Hospitalization (Days)
Behavioral Symptoms Score (0 - 9)
State Custody (1: No, 2: Yes)
History of Violence (1: No, 2: Yes)
Hosmer, D.W., Lemeshow, S. and Sturdivant, R.X. (2013) Applied Logistic Regression, 3rd ed., New York: Wiley
head(aps, n = 10) summary(aps) ## Table 8.2 p. 274 library(nnet) modt8.2 <- multinom(place3 ~ viol, data = aps) summary(modt8.2) exp(coef(modt8.2)[, "violYes"]) t(exp(confint(modt8.2)["violYes", ,])) ## To test differences between b_2 and b_1 we need the estimated variance ## covariance matrix for the fitted model (Table 8.3 p. 274). vcov(modt8.2) # 'raw' ## To have exactly the same output as the text we need to rearrange just a ## minimum VarCovM <- vcov(modt8.2)[c(2, 1, 4, 3), c(2, 1, 4, 3)] VarCovM[upper.tri(VarCovM)] <- NA VarCovM ## Testing against null model. modt8.2Null <- multinom(place3 ~ 1, data = aps) anova(modt8.2, modt8.2Null, test = "Chisq")
head(aps, n = 10) summary(aps) ## Table 8.2 p. 274 library(nnet) modt8.2 <- multinom(place3 ~ viol, data = aps) summary(modt8.2) exp(coef(modt8.2)[, "violYes"]) t(exp(confint(modt8.2)["violYes", ,])) ## To test differences between b_2 and b_1 we need the estimated variance ## covariance matrix for the fitted model (Table 8.3 p. 274). vcov(modt8.2) # 'raw' ## To have exactly the same output as the text we need to rearrange just a ## minimum VarCovM <- vcov(modt8.2)[c(2, 1, 4, 3), c(2, 1, 4, 3)] VarCovM[upper.tri(VarCovM)] <- NA VarCovM ## Testing against null model. modt8.2Null <- multinom(place3 ~ 1, data = aps) anova(modt8.2, modt8.2Null, test = "Chisq")
burn_eval_1 dataset.
burn_eval_1
burn_eval_1
A data.frame with 500 rows and 9 variables: the covariate are
the same as those from burn1000
.
Hosmer, D.W., Lemeshow, S. and Sturdivant, R.X. (2013) Applied Logistic Regression, 3rd ed., New York: Wiley
head(burn_eval_1, n = 10) summary(burn_eval_1)
head(burn_eval_1, n = 10) summary(burn_eval_1)
burn_eval_2 dataset.
burn_eval_2
burn_eval_2
A data.frame with 500 rows and 9 variables: the covariate are
the same as those from burn1000
.
Hosmer, D.W., Lemeshow, S. and Sturdivant, R.X. (2013) Applied Logistic Regression, 3rd ed., New York: Wiley
head(burn_eval_2, n = 10) summary(burn_eval_2)
head(burn_eval_2, n = 10) summary(burn_eval_2)
burn1000 dataset.
burn1000
burn1000
A data.frame with 1000 rows and 9 variables:
Identification code (1 - 1000)
Burn facility (1 - 40)
Hospital discharge status (1: Alive, 2: Dead)
Age at admission (Years)
Gender (1: Female, 2: Male)
Race (1: Non-White, 2: White)
Total burn surface area (0 - 100%)
Burn involved inhalation injury (1: No, 2: Yes)
Flame involved in burn injury (1: No, 2: Yes)
Hosmer, D.W., Lemeshow, S. and Sturdivant, R.X. (2013) Applied Logistic Regression, 3rd ed., New York: Wiley
head(burn1000, n = 10) summary(burn1000) ## Table 3.15 p. 80 summary(mod3.15 <- glm(death ~ tbsa + inh_inj + age + gender + flame + race, family = binomial, data = burn1000 ))
head(burn1000, n = 10) summary(burn1000) ## Table 3.15 p. 80 summary(mod3.15 <- glm(death ~ tbsa + inh_inj + age + gender + flame + race, family = binomial, data = burn1000 ))
burn13m dataset.
burn13m
burn13m
A data.frame with 388 rows and 11 variables: the covariate are
the same as those from burn1000
with the addition of
Pair Identification Code (1-119)
Subject Identification Code within pair (1-4)
Hosmer, D.W., Lemeshow, S. and Sturdivant, R.X. (2013) Applied Logistic Regression, 3rd ed., New York: Wiley
head(burn13m, n = 10) summary(burn13m)
head(burn13m, n = 10) summary(burn13m)
chdage dataset.
chdage
chdage
A data.frame with 100 rows and 4 variables:
Identification code (1 - 100)
Age (Years)
Age group (1: 20-39, 2: 30-34, 3: 35-39, 4: 40-44, 5: 45-49, 6: 50-54, 7: 55-59, 8: 60-69)
Presence of CHD (1: No, 2: Yes)
Hosmer, D.W., Lemeshow, S. and Sturdivant, R.X. (2013) Applied Logistic Regression, 3rd ed., New York: Wiley
head(chdage, n = 10) summary(chdage) ## Figure 1.1 p. 5 plot(as.integer(chd)-1 ~ age, pch = 20, main = "Figure 1.1 p. 5", ylab = "Coronary heart disease", xlab = "Age (years)", data = chdage) ## Table 1.2 with(chdage, addmargins(table(agegrp))) with(chdage, addmargins(table(agegrp, chd))) (Means <- with(chdage, tapply(as.integer(chd)-1, list(agegrp), mean))) ## Figure 1.2 p. 6 midPoints <- c(24.5, seq(32, 57, 5), 64.5) plot(midPoints, Means, pch = 20, ylab = "Coronary heart disease (mean)", xlab = "Age (years)", ylim = 0:1, main = "Figure 1.2 p. 6") lines(midPoints, Means) ## Table 1.3 summary( mod1.3 <- glm( chd ~ age, family = binomial, data = chdage )) ## Table 1.4 vcov(mod1.3) ## Computing OddsRatio and confidence intervals for age ... exp(coef(mod1.3))[-1] exp(confint(mod1.3))[-1, ]
head(chdage, n = 10) summary(chdage) ## Figure 1.1 p. 5 plot(as.integer(chd)-1 ~ age, pch = 20, main = "Figure 1.1 p. 5", ylab = "Coronary heart disease", xlab = "Age (years)", data = chdage) ## Table 1.2 with(chdage, addmargins(table(agegrp))) with(chdage, addmargins(table(agegrp, chd))) (Means <- with(chdage, tapply(as.integer(chd)-1, list(agegrp), mean))) ## Figure 1.2 p. 6 midPoints <- c(24.5, seq(32, 57, 5), 64.5) plot(midPoints, Means, pch = 20, ylab = "Coronary heart disease (mean)", xlab = "Age (years)", ylim = 0:1, main = "Figure 1.2 p. 6") lines(midPoints, Means) ## Table 1.3 summary( mod1.3 <- glm( chd ~ age, family = binomial, data = chdage )) ## Table 1.4 vcov(mod1.3) ## Computing OddsRatio and confidence intervals for age ... exp(coef(mod1.3))[-1] exp(confint(mod1.3))[-1, ]
glow_bonemed dataset.
glow_bonemed
glow_bonemed
A data.frame with 500 rows and 18 variables: the covariate are
the same as those from glow500
with the addition of
Bone medications at enrollment (1: No, 2: Yes)
Bone medications at follow-up (1: No, 2: Yes)
Bone medications both at enrollment and follow-up (1: No, 2: Yes)
Hosmer, D.W., Lemeshow, S. and Sturdivant, R.X. (2013) Applied Logistic Regression, 3rd ed., New York: Wiley
head(glow_bonemed, n = 10) summary(glow_bonemed)
head(glow_bonemed, n = 10) summary(glow_bonemed)
glow_mis_comp dataset.
glow_mis_comp
glow_mis_comp
A data.frame with 500 rows and 10 variables: the covariate are
the same as those from glow500
, without bmi
,
premeno
, armassist
, smoke
and fracscore
.
Hosmer, D.W., Lemeshow, S. and Sturdivant, R.X. (2013) Applied Logistic Regression, 3rd ed., New York: Wiley
head(glow_mis_comp, n = 10) summary(glow_mis_comp)
head(glow_mis_comp, n = 10) summary(glow_mis_comp)
glow_mis_wmissing dataset.
glow_mis_wmissing
glow_mis_wmissing
A data.frame with 500 rows and 10 variables: the covariate are
the same as those from glow500
, without bmi
,
premeno
, armassist
, smoke
and fracscore
.
Hosmer, D.W., Lemeshow, S. and Sturdivant, R.X. (2013) Applied Logistic Regression, 3rd ed., New York: Wiley
head(glow_mis_wmissing, n = 10) summary(glow_mis_wmissing)
head(glow_mis_wmissing, n = 10) summary(glow_mis_wmissing)
glow_rand dataset.
glow_rand
glow_rand
A data.frame with 500 rows and 15 variables: the covariate are
the same as those from glow500
.
Hosmer, D.W., Lemeshow, S. and Sturdivant, R.X. (2013) Applied Logistic Regression, 3rd ed., New York: Wiley
head(glow_rand, n = 10) summary(glow_rand)
head(glow_rand, n = 10) summary(glow_rand)
glow11m dataset.
glow11m
glow11m
A data.frame with 238 rows and 16 variables: the covariate are
the same as those from glow500
with the addition of
Pair Identification Code (1-119)
Hosmer, D.W., Lemeshow, S. and Sturdivant, R.X. (2013) Applied Logistic Regression, 3rd ed., New York: Wiley
head(glow11m, n = 10) summary(glow11m) ## Table 7.2 p. 252 library(survival) mod7.2 <- clogit(as.numeric(fracture) ~ height + weight + bmi + priorfrac + premeno + momfrac + armassist + raterisk + strata(pair), data = glow11m) summary(mod7.2)
head(glow11m, n = 10) summary(glow11m) ## Table 7.2 p. 252 library(survival) mod7.2 <- clogit(as.numeric(fracture) ~ height + weight + bmi + priorfrac + premeno + momfrac + armassist + raterisk + strata(pair), data = glow11m) summary(mod7.2)
glow500 dataset.
glow500
glow500
A data.frame with 500 rows and 15 variables:
Identification Code (1 - n)
Study Site (1 - 6)
Physician ID code (128 unique codes)
History of Prior Fracture (1: No, 2: Yes)
Age at Enrollment (Years)
Weight at enrollment (Kilograms)
Height at enrollment (Centimeters)
Body Mass Index (Kg/m^2)
Menopause before age 45 (1: No, 2: Yes)
Mother had hip fracture (1: No, 2: Yes)
Arms are needed to stand from a chair (1: No, 2: Yes)
Former or current smoker (1: No, 2: Yes)
Self-reported risk of fracture (1: Less than others of the same age, 2: Same as others of the same age, 3: Greater than others of the same age)
Fracture Risk Score (Composite Risk Score)
Any fracture in first year (1: No, 2: Yes)
Hosmer, D.W., Lemeshow, S. and Sturdivant, R.X. (2013) Applied Logistic Regression, 3rd ed., New York: Wiley
head(glow500, n = 10) summary(glow500) ## Table 2.2 p. 39 summary(mod2.2 <- glm(fracture ~ age + weight + priorfrac + premeno + raterisk, family = binomial, data = glow500)) ## Table 2.3 p. 40 summary(mod2.3 <- update(mod2.2, . ~ . - weight - premeno)) ## Table 2.4 p. 44 vcov(mod2.3) ## Table 3.6 p. 58 contrasts(glow500$raterisk) ## Contrasts: Table 3.8 and 3.9 p. 60 contrasts(glow500$raterisk) <- matrix(c(-1,-1,1,0,0,1), byrow= TRUE, ncol = 2) summary(mod3.9 <- glm(fracture ~ raterisk, family = binomial, data = glow500)) # cleaning modified dataset ... rm(glow500) ## Table 5.1 pg 160 - Hosmer-Lemeshow test (with vcdExtra package) mod4.16 <- glm(fracture ~ age * priorfrac + height + momfrac * armassist + I(as.integer(raterisk) == 3) , family = binomial, data = glow500) library(vcdExtra) summary(HLtest(mod4.16)) ## Table 5.3 p. 171 - Classification table glow500$pred4.16 <- predict(mod4.16, type = "response") with(glow500, addmargins(table( pred4.16 > 0.5, fracture))) ## Sensitivy, specificity, ROC (using pROC) library(pROC) ## Figure 5.3 p. 177 - ROC curve (using pROC package) print(roc4.16 <- roc(fracture ~ pred4.16, data = glow500)) plot(roc4.16, main = "Figure 5.3 p. 177") ## Table 5.8 p. 175 vars <- c("thresholds","sensitivities","specificities") tab5.8 <- data.frame(roc4.16[vars]) ## Now, for printing/comparison purposes, steps below in order to find ## threshold values most similar to those in the table findIndex <- function(x, y) which.min( (x-y)^2 ) cutPoints <- seq(0.05, 0.75, by = 0.05) tableIndex <- mapply(findIndex, y = cutPoints, MoreArgs = list(x = roc4.16$thresholds)) ## And finally, let's print a reasonable approximation of table 5.8 writeLines("\nTable 5.8 p. 175\n") tab5.8[tableIndex, ] ## Figure 5.1 p. 175 plot(specificities ~ thresholds, xlim = c(0, 1), type = "l", xlab = "Probabilty cutoff", ylab = "Sensitivity/specificity", ylim = c(0, 1), data = tab5.8, main = "Figure 5.1 p. 175") with(tab5.8, lines(thresholds, sensitivities, col = "red")) legend(x = 0.75, y = 0.55, legend = c("Sensitivity", "Specificity"), lty = 1, col = c("red","black")) abline(h = c(0, 1), col = "grey80", lty = "dotted")
head(glow500, n = 10) summary(glow500) ## Table 2.2 p. 39 summary(mod2.2 <- glm(fracture ~ age + weight + priorfrac + premeno + raterisk, family = binomial, data = glow500)) ## Table 2.3 p. 40 summary(mod2.3 <- update(mod2.2, . ~ . - weight - premeno)) ## Table 2.4 p. 44 vcov(mod2.3) ## Table 3.6 p. 58 contrasts(glow500$raterisk) ## Contrasts: Table 3.8 and 3.9 p. 60 contrasts(glow500$raterisk) <- matrix(c(-1,-1,1,0,0,1), byrow= TRUE, ncol = 2) summary(mod3.9 <- glm(fracture ~ raterisk, family = binomial, data = glow500)) # cleaning modified dataset ... rm(glow500) ## Table 5.1 pg 160 - Hosmer-Lemeshow test (with vcdExtra package) mod4.16 <- glm(fracture ~ age * priorfrac + height + momfrac * armassist + I(as.integer(raterisk) == 3) , family = binomial, data = glow500) library(vcdExtra) summary(HLtest(mod4.16)) ## Table 5.3 p. 171 - Classification table glow500$pred4.16 <- predict(mod4.16, type = "response") with(glow500, addmargins(table( pred4.16 > 0.5, fracture))) ## Sensitivy, specificity, ROC (using pROC) library(pROC) ## Figure 5.3 p. 177 - ROC curve (using pROC package) print(roc4.16 <- roc(fracture ~ pred4.16, data = glow500)) plot(roc4.16, main = "Figure 5.3 p. 177") ## Table 5.8 p. 175 vars <- c("thresholds","sensitivities","specificities") tab5.8 <- data.frame(roc4.16[vars]) ## Now, for printing/comparison purposes, steps below in order to find ## threshold values most similar to those in the table findIndex <- function(x, y) which.min( (x-y)^2 ) cutPoints <- seq(0.05, 0.75, by = 0.05) tableIndex <- mapply(findIndex, y = cutPoints, MoreArgs = list(x = roc4.16$thresholds)) ## And finally, let's print a reasonable approximation of table 5.8 writeLines("\nTable 5.8 p. 175\n") tab5.8[tableIndex, ] ## Figure 5.1 p. 175 plot(specificities ~ thresholds, xlim = c(0, 1), type = "l", xlab = "Probabilty cutoff", ylab = "Sensitivity/specificity", ylim = c(0, 1), data = tab5.8, main = "Figure 5.1 p. 175") with(tab5.8, lines(thresholds, sensitivities, col = "red")) legend(x = 0.75, y = 0.55, legend = c("Sensitivity", "Specificity"), lty = 1, col = c("red","black")) abline(h = c(0, 1), col = "grey80", lty = "dotted")
icu dataset.
icu
icu
A data.frame with 200 rows and 21 variables:
Identification code (ID Number)
Vital Status at hospital discharge (1: Lived, 2: Died)
Age (Years)
Gender (1: Male, 2: Female)
Race (1: White, 2: Black, 3: Other)
Service at ICU admission (1: Medical, 2: Surgical)
Cancer part of present problem (1: No, 2: Yes)
History of chronic renal failure (1: No, 2: Yes)
Infection probable at ICU admission (1: No, 2: Yes)
CPR prior to ICU admission (1: No, 2: Yes)
Systolic blood pressure at ICU admission (mm Hg)
Heart rate at ICU admission (Beats/min)
Previous admission to an ICU within 6 months (1: No, 2: Yes)
Type of admission (1: Elective, 2: Emergency)
Long bone, multiple, neck, single area, or hip fracture (1: No, 2: Yes)
PO2 from initial blood gases (1: > 60, 2: <= 60)
PH from initial blood gases (1: >= 7.25, 2: < 7.25)
PCO2 from initial blood gases (1: <= 45, 2: > 45)
Bicarbonate from initial blood gases (1: >= 18, 2: < 18)
Creatinine from initial blood gases (1: <= 2.0, 2: > 2.0)
Level of consciousness at ICU admission (1: No coma or deep stupor, 2: Deep stupor, 3: Coma)
Hosmer, D.W., Lemeshow, S. and Sturdivant, R.X. (2013) Applied Logistic Regression, 3rd ed., New York: Wiley
head(icu, n = 10) summary(icu)
head(icu, n = 10) summary(icu)
lowbwt dataset.
lowbwt
lowbwt
A data.frame with 189 rows and 11 variables:
Identification Code
Low birth weight (1: >= 2500, 2: < 2500 g)
Age of mother (Years)
Weight of mother at last menstrual period (Pounds)
Race (1: White, 2: Black, 3: Other)
Smoking status during pregnancy (1: No, 2: Yes)
History of premature labor (1: None, 2: One, 3: Two, etc)
History of hypertension (1: No, 2: Yes)
Presence of Uterine irritability (1: No, 2: Yes)
Number of physician visits during the first trimester (1: None, 2: One, 3: Two, etc)
Recorded birth weight (Grams)
Hosmer, D.W., Lemeshow, S. and Sturdivant, R.X. (2013) Applied Logistic Regression, 3rd ed., New York: Wiley
head(lowbwt, n = 10) summary(lowbwt)
head(lowbwt, n = 10) summary(lowbwt)
myopia dataset.
myopia
myopia
A data.frame with 618 rows and 18 variables:
Subject identifier (1-1503)
Year subject entered the study (Year)
Myopia within the first five years of follow up (1: No, 2: Yes)
Age at first visit (Years)
Gender (1: Male, 2: Female)
Spherical Equivalent Refraction (diopter)
Axial Length (mm)
Anterior Chamber Depth (mm)
Lens Thickness (mm)
Vitreous Chamber Depth (mm)
How many hours per week outside of school the child spent engaging in sports/outdoor activities (Hours per week)
How many hours per week outside of school the child spent reading for pleasure (Hours per week)
How many hours per week outside of school the child spent playing video/computer games or working on the computer (Hours per week)
How many hours per week outside of school the child spent reading or studying for school assignments (Hours per week)
How many hours per week outside of school the child spent watching television (Hours per week)
Composite of near-work activities (Hours per week)
Was the subject's mother myopic? (1: No, 2: Yes)
Was the subject's father myopic? (1: No, 2: Yes)
Hosmer, D.W., Lemeshow, S. and Sturdivant, R.X. (2013) Applied Logistic Regression, 3rd ed., New York: Wiley
head(myopia, n = 10) summary(myopia)
head(myopia, n = 10) summary(myopia)
nhanes dataset.
nhanes
nhanes
A data.frame with 6482 rows and 21 variables:
Identification Code (1 - 6482)
Gender (1: Male, 2: Female)
Age at Screening (Years)
Marital Status (1: Married, 2: Widowed, 3: Divorced, 4: Separated, 5: Never Married, 6: Living Together)
Statistical Weight (4084.478 - 153810.3)
Pseudo-PSU (1, 2)
Pseudo-Stratum (1 - 15)
Total Cholesterol (mg/dL)
HDL-Cholesterol (mg/dL)
Systolic Blood Pressure (mm Hg)
Diastolic Blood Pressure (mm Hg)
Weight (kg)
Standing Height (cm)
Body mass Index (Kg/m^2)
Vigorous Work Activity (1: Yes, 2: No)
Moderate Work Activity (1: Yes, 2: No)
Walk or Bicycle (1: Yes, 2: No)
Vigorous Recreational Activities (1: Yes, 2: No)
Moderate Recreational Activities (1: Yes, 2: No)
Minutes of Sedentary Activity per Week (1: Yes, 2: No)
BMI>35 (1: No, 2: Yes)
Hosmer, D.W., Lemeshow, S. and Sturdivant, R.X. (2013) Applied Logistic Regression, 3rd ed., New York: Wiley
head(nhanes, n = 10) summary(nhanes)
head(nhanes, n = 10) summary(nhanes)
polypharm dataset.
polypharm
polypharm
A data.frame with 3500 rows and 14 variables:
Subject ID (1 - 500)
Outcome; taking drugs from more than three different classes (1: No, 2: Yes)
Number of outpatient Mental Health Visits (1: none, 2: one to five, 3: six to fourteen, 4: greater than 14)
Number of inpatient Mental Health Visits (1: none, 2: one, 3: more than one)
Year (2002 to 2008)
Group (1: Covered Families and Children - CFC, 2: Aged, Blind or Disabled - ABD, 3: Foster Care - FOS)
Location (1: Urban, 2: Rural)
Comorbidity (1: No, 2: Yes)
Any primary diagnosis (bipolar, depression, etc.) (1: No, 2: Yes)
Number of primary diagnosis (1: none, 2: one, 3: more than one)
Gender (1: Female, 2: Male)
Race (1: White, 2: Black, 3: Other)
Ethnic category (1: Non-Hispanic, 2: Hispanic)
Age (Years and months, two decimal places)
Hosmer, D.W., Lemeshow, S. and Sturdivant, R.X. (2013) Applied Logistic Regression, 3rd ed., New York: Wiley
head(polypharm, n = 10) summary(polypharm)
head(polypharm, n = 10) summary(polypharm)
scale_example dataset.
scale_example
scale_example
A data.frame with 500 rows and 2 variables:
a dicotomic variable (say 1: No, 2: Yes)
a numeric variable
Hosmer, D.W., Lemeshow, S. and Sturdivant, R.X. (2013) Applied Logistic Regression, 3rd ed., New York: Wiley
head(scale_example, n = 10) summary(scale_example)
head(scale_example, n = 10) summary(scale_example)