1
install.packages("wooldridge",repos = "http://cran.us.r-project.org")
##
## The downloaded binary packages are in
## /var/folders/hv/w05sj4p52y70vtt99hhlrxzr0000gn/T//RtmpmFjdkJ/downloaded_packages
library(wooldridge)
data("wage1")
minEdu <- min(wage1$educ)
maxEdu <- max(wage1$educ)
cat("Lowest year of education is:", minEdu,"\n" )
## Lowest year of education is: 0
cat("Highest year of education is:", maxEdu,"\n" )
## Highest year of education is: 18
avgWage <- mean(wage1$wage)
cat("Average Hourly wage is :",avgWage,". It is pretty low. \n" )
## Average Hourly wage is : 5.896103 . It is pretty low.
cpi_1976 <- 56.9
cpi_2023 <- 301.6
wage_2023 <- avgWage * (cpi_2023 / cpi_1976)
cat("In 2023, average hourly wage is about $35.69, and the conversion roughly equates to ", wage_2023," in 2023 for our results in (ii), making it a lot more feasible. \n" )
## In 2023, average hourly wage is about $35.69, and the conversion roughly equates to 31.25245 in 2023 for our results in (ii), making it a lot more feasible.
men <- sum(wage1$female == 0, na.rm = TRUE)
women <- sum(wage1$female == 1, na.rm = TRUE)
cat("There are ", women," women and ", men, " men in this data set.\n" )
## There are 252 women and 274 men in this data set.