Skip to content

Getting response scale plots for a binomial GAMM #309

Closed Answered by gavinsimpson
yksakana asked this question in Q&A
Discussion options

You must be logged in to vote

Firstly, you are using an out of date version of gratia; I suggest you update before proceeding.

Secondly, your model is incorrectly specified; you are not including the group means for Condition. As you have just two levels for Condition it is perhaps best to do this through a fixed parametric effect such that your model will become:

mod <- mgcv::gam(Move ~ Condition +    # Condition means
    te(Temp, Length, by = Condition) + # tensor product for each level of Condition
    s(Time) +                          # smooth of time
    s(ID, bs = "re"),                  # random subject-level intercepts
  family = binomial(link = "logit"),
  data = data)

I'm not sure it makes a lot of sense t…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@yksakana
Comment options

@gavinsimpson
Comment options

@yksakana
Comment options

Answer selected by yksakana
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants