MexicanLabor.RdData from the National Survey of Household Income and Expenditures for 1977, Secretaria de Programacion y Presupuesto, Mexico.
data("MexicanLabor")A data frame containing 16 observations on 6 variables.
integer. Number of women older than 12 years.
integer. Number of women in labor force.
factor with levels "rural"/"urban".
factor with levels "<= 24" and "> 24" (in years).
factor with levels "low"/"high"
(household income less or more than $2626.8).
factor with levels "primary" (primary school or less)
and "further" (more than primary school).
The data were first analyzed by Guerrero and Johnson (1982) as an example of a highly asymmetric data set, i.e., the observed proportions are rather low.
Guerrero V, Johnson R (1982). “Use of the Box-Cox Transformation with Binary Response Models.” Biometrika, 69, 309–314.
## data
data("MexicanLabor", package = "glmx")
## visualizations
plot(I(laborforce/total) ~ interaction(income, age), data = MexicanLabor)
plot(I(laborforce/total) ~ interaction(schooling, locality), data = MexicanLabor)
## simple logit model
m <- glm(cbind(laborforce, total - laborforce) ~ ., data = MexicanLabor, family = binomial)
m
#>
#> Call: glm(formula = cbind(laborforce, total - laborforce) ~ ., family = binomial,
#> data = MexicanLabor)
#>
#> Coefficients:
#> (Intercept) localityurban age> 24 incomehigh
#> -2.58575 0.38931 0.29212 -0.01521
#> schoolingfurther
#> 0.54814
#>
#> Degrees of Freedom: 15 Total (i.e. Null); 11 Residual
#> Null Deviance: 73.89
#> Residual Deviance: 15.96 AIC: 95.61