[R-sig-ME] [FORGED] Re: logistic regression on posttest (0, 1) with pretest(0, 1)*Group(Treatment, Ctrl) interaction

Jeff Newmiller jdnewm|| @end|ng |rom dcn@d@v|@@c@@u@
Mon Apr 22 04:02:41 CEST 2019


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) formula 
> syntax, interactions are indicated by a *colon* --- a:b.  The notation "a*b" 
> is a shorthand for
> a + b + a:b.
>
> So pretest*Group is the same as pretest + Group + pretest:Group, whence it 
> 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. Brevity 
> 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 Go...
                                       Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k



More information about the R-sig-mixed-models mailing list