Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong definition of dummy in chapter 13.3 #45

Open
JueBi opened this issue Jan 7, 2025 · 0 comments
Open

Wrong definition of dummy in chapter 13.3 #45

JueBi opened this issue Jan 7, 2025 · 0 comments

Comments

@JueBi
Copy link

JueBi commented Jan 7, 2025

In chapter 13.3 is the definition of the dummy variable "race" not correct.

# generate subset with kindergarten data
STARK <- STAR %>% 
      transmute(gender,
                ethnicity,
                stark,
                readk,
                mathk,
                lunchk,
                experiencek,
                schoolidk) %>% 
      mutate(black = ifelse(ethnicity == "afam", 1, 0),
             race = ifelse(ethnicity == "afam" | ethnicity == "cauc", 1, 0),
             boy = ifelse(gender == "male", 1, 0))

In the ifelse() statement, the values 0 and 1 should be switched, according to the definition in the textbook.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant