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

Drop unused factor levels in categorical variables #23

Open
aalfons opened this issue Nov 22, 2021 · 1 comment
Open

Drop unused factor levels in categorical variables #23

aalfons opened this issue Nov 22, 2021 · 1 comment
Assignees

Comments

@aalfons
Copy link
Owner

aalfons commented Nov 22, 2021

Unused factor levels in categorical (independent or control) variables should be dropped. Argument drop.unused.levels in function model.frame() controls this and should be set to TRUE.

@aalfons aalfons self-assigned this Nov 22, 2021
@aalfons
Copy link
Owner Author

aalfons commented Nov 22, 2021

Likely this needs to be fixed in the default method of fit_mediation(), where non-numeric x variables and covariates are converted using model.matrix().

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

No branches or pull requests

1 participant