[R-sig-ME] [FORGED] Re: logistic regression on posttest (0, 1) with pretest(0, 1)*Group(Treatment, Ctrl) interaction
b|mono@om @end|ng |rom gm@||@com
Mon Apr 29 12:19:50 CEST 2019
coming back to the topic (I was busy lately).
The interpretation is always a bit of a problem in regressions with
categorical interactions. There are two ways to deal with this, one would
be to prefer effect coding (search for contrast sum coding online) over
dummy coding. In short, with effect coding, you model the deviation of each
group from a grand mean. With dummy coding, you start with the intercept
parameter and then add up the design cells to have the actual mean estimate
of it... I actually do not like both, because first I have no idea how to
ideally tell this bro, and also... there is a second and much much easier
## if this is your model: mod2 <- brm(posttest ~ pretest*Group +...)
Et voila :)
This gives you the posterior marginal estimates from the model for your
interaction, predicting the cell specific response probability, including
highest density intervals (or Bayesian credible intervals). The option
type="response" gives you the predicted probability of post =1; if you
delete this option, the marginal estimates will be given on the log scale.
In short, this tells you whether something is better remembered post, if it
was already known pre (or not), depending on the group.
You can get also the marginal main effects like this, using:
Which would tell you whether something is better remembered post, if it was
already known pre. Likewise for group.
And if you want to simply get the summary statistics instead of the plot,
Am Mo., 22. Apr. 2019 um 03:59 Uhr schrieb Jeff Newmiller <
jdnewmil using dcn.davis.ca.us>:
> There is no "formula" syntax other than it has to have at least one
> tilde... there is "lm" formula syntax, and "lme" formula syntax, and "nls"
> formula syntax, etc... and other model builders are not obligated to
> adhere to the "lm" interpretation of formulas.
> I don't see why using * alone in an lm formula should be avoided, but
> perhaps John's advice could be reframed as "watch out for the specific
> syntax used by your model building function... it may not be the same as
> that used by lm".
> On Mon, 22 Apr 2019, Rolf Turner wrote:
> > On 22/04/19 6:01 AM, Sorkin, John wrote:
> >> Souheyla,
> >> It is both difficult and dangerous to add a comment to a thread that
> >> one has not followed, and in doing so possibly making an
> >> inappropriate suggestion. Please forgive what may be an not fully
> >> informed thought.
> >> The model you suggest, posttest ~ pretest*Group (ignoring random
> >> effects) is unusual. In a model that contains an interaction, I
> >> would expect to see, in addition to the interaction, all main effects
> >> included in the interaction, i.e. posttest ~
> >> group+pretest+pretest*Group.
> > As Souheyla has already indicated, in the R (and previously S/Splus)
> > syntax, interactions are indicated by a *colon* --- a:b. The notation
> > is a shorthand for
> > a + b + a:b.
> > So pretest*Group is the same as pretest + Group + pretest:Group, whence
> > contains the main effects.
> > I disagree with the advice that you gave Souheyla in a follow-up email.
> > The construction pretest*Group is preferable, being compact and tidy.
> > is a virtue.
> > cheers,
> > Rolf
> > --
> > Honorary Research Fellow
> > Department of Statistics
> > University of Auckland
> > Phone: +64-9-373-7599 ext. 88276
> > _______________________________________________
> > R-sig-mixed-models using r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
> Jeff Newmiller The ..... ..... Go Live...
> DCN:<jdnewmil using dcn.davis.ca.us> Basics: ##.#. ##.#. Live
> Live: OO#.. Dead: OO#.. Playing
> Research Engineer (Solar/Batteries O.O#. #.O#. with
> /Software/Embedded Controllers) .OO#. .OO#. rocks...1k
> R-sig-mixed-models using r-project.org mailing list
[[alternative HTML version deleted]]
More information about the R-sig-mixed-models