Skip to content

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

Description

@aporshnev

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

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions