# load the package and attach the data set # perform the regression and assign the result to `dummy_mod` # load the package and attach the data set library(AER) data(CPS1985) # perform the regression and assign the result to `dummy_mod` dummy_mod <- lm(wage ~ gender, data = CPS1985) test_function("library") test_function("data") test_or({ ex() %>% override_solution("attach(CPS1985); dummy_mod <- lm(wage ~ gender)") %>% check_object("dummy_mod") },{ ex() %>% override_solution("dummy_mod <- lm(CPS1985$wage ~ CPS1985$gender)") %>% check_object("dummy_mod") },{ ex() %>% override_solution("dummy_mod <- lm(wage ~ gender, data = CPS1985)") %>% check_object("dummy_mod") } ) success_msg("Well done!")