We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
@dtkaplan, how does this look?
example(mod_effect) ## ## md_ffc> mod1 <- lm(wage ~ age * sex * educ + sector, data = mosaicData::CPS85) ## ## md_ffc> mod_effect(mod1, ~ sex) ## # A tibble: 1 x 6 ## change sex to_sex age educ sector ## <dbl> <fct> <fct> <dbl> <dbl> <fct> ## 1 -1.88 M F 35 12 prof ## ## md_ffc> mod_effect(mod1, ~ sector) ## # A tibble: 1 x 6 ## change sector to_sector age sex educ ## <dbl> <fct> <fct> <dbl> <fct> <dbl> ## 1 -2.23 prof clerical 35 M 12 ## ## md_ffc> mod_effect(mod1, ~ age, sex = "M", educ = c(10, 12, 16), age = c(30, 40)) ## # A tibble: 6 x 7 ## change slope age to_age sex educ sector ## <dbl> <dbl> <dbl> <dbl> <fct> <dbl> <fct> ## 1 1.18 0.118 30 40 M 10 prof ## 2 1.18 0.118 40 50 M 10 prof ## 3 1.38 0.138 30 40 M 12 prof ## 4 1.38 0.138 40 50 M 12 prof ## 5 1.78 0.178 30 40 M 16 prof ## 6 1.78 0.178 40 50 M 16 prof ## ## md_ffc> mod_effect(mod1, ~ age, sex = "F", age = 34, step = 1) ## # A tibble: 1 x 7 ## change slope age to_age sex educ sector ## <dbl> <dbl> <dbl> <dbl> <fct> <dbl> <fct> ## 1 0.0549 0.0549 34 35 F 12 prof ## ## md_ffc> mod_effect(mod1, ~ sex, age = 35, sex = "M", to = "F" ) ## # A tibble: 1 x 6 ## change sex to_sex age educ sector ## <dbl> <fct> <fct> <dbl> <dbl> <fct> ## 1 -1.88 M F 35 12 prof ## ## md_ffc> # For classifiers, the change in *probability* of a level is reported. ## md_ffc> mod2 <- rpart::rpart(sector ~ age + sex + educ + wage, data = mosaicData::CPS85) ## ## md_ffc> mod_effect(mod2, ~ educ) ## # A tibble: 1 x 7 ## change_clerical slope educ to_educ age sex wage ## <dbl> <dbl> <dbl> <dbl> <dbl> <fct> <dbl> ## 1 0 0 12 14 35 M 7.8 ## ## md_ffc> mod_effect(mod2, ~ educ, class_level = "manag") ## # A tibble: 1 x 7 ## change_manag slope educ to_educ age sex wage ## <dbl> <dbl> <dbl> <dbl> <dbl> <fct> <dbl> ## 1 0 0 12 14 35 M 7.8
The text was updated successfully, but these errors were encountered:
I see that sometimes the change column is inheriting a variable name. Do we want that? Should it be there in all cases?
Sorry, something went wrong.
add change column as per #21.
58f04b8
No branches or pull requests
@dtkaplan, how does this look?
The text was updated successfully, but these errors were encountered: