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

Contrast labels from one variable can replace other variable levels #316

Open
aporshnev opened this issue Sep 12, 2024 · 0 comments
Open

Comments

@aporshnev
Copy link

In example below if I make a mistake and provide more levels than I would have in model e.g. labels=["m", "f", ""] the output for countrycit variable will be replaced with "" label for birth_sex:

m1TL = let levels = ["m", "f", ""]
form = @formula(
trial_latency ~
1 + age + cor +
birth_sex + countrycit+
(1 | subj))
contrasts = Dict(
:birth_sex => HypothesisCoding(
[
1/2 0 -1/2
0 1/2 -1/2
];
levels,
labels=["m", "f"],), # issue arise if - labels=["m", "f", " " ],),
:countrycit => SeqDiffCoding(),
:age => Center(29), #centered to median
)
fit(MixedModel, form, iat; contrasts)
end

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