[R-sig-ME] new syntax for lme ?

Gabriel Baud-Bovy baud-bovy.gabriel at hsr.it
Sun Apr 27 23:34:32 CEST 2014


On 27/04/2014 10:54 PM, Ben Bolker wrote:
>    A slightly better way would actually be to redefine the internal
> Lind/Lambda structures; the best way would be for us to implement a
> notation that would allow end-users to do this easily ...
>
>    Ben Bolker
Dear Ben,

I am looking forward a new syntax :-). In this respect, a few months a 
ago I sent
you a reference to an old paper by Nelder that mentioned a way to improve
formulae expressiveness (though he himself did not think that it was 
necessary).
In short, the idea was to indicate explicitly the terms that were marginal
and should be eliminated using a notation like A:B[A].

This notation would not allow a completely flexible specification of the 
covariance
matrix but it would, for example, avoid the inclusion of two intercepts 
when trying
to set correlation between crossed factors to zero as it happens when doing

(1|group) + (A|group)+(B|group)+(A:B|group)

by doing something like that

(1|group) + (A[1]|group)+(B[1]|group)+(A:B[A,B]|group)

I wonder if you got any feedback about this idea. Perhaps, it did not
seem to be worth in light of the fact that a more flexible notation - à 
la lme -
is needed to specify any kind of covariance matrix.

Best,

Gabriel


On 29/01/2014 2:29 PM, Ben Bolker wrote:
>    Extremely interesting indeed, will take some time to digest.  Cc'ing
> to other lme4 authors; hope that's alright.
>
>    sincerely
>      Ben Bolker
No problem about the cc.
Best,
Gabriel

PS.  Unfortunate typos and pasting when mentioning Nelder's paper (correct
reference is at the end of the quote). He obviously did not write on
brushless
motors (:-) ).

> On 14-01-29 07:38 AM, Gabriel Baud-Bovy wrote:
>> Dear Ben,
>>
>> Many people are puzzled by the  structure of the random effects.  As you
>> mentioned in the reply to this post, the problem is that the syntax for
>> random effects in lme4 leads to over-parameterization. The  fundamental
>> problem is each term between parentheses is evaluated independently.
>> For example,  I posted once a question about simplifying the correlation
>> structure (A*B|su) by using  (A|su)+(B|su)+(A:B|su) but that does not work.
>> (more details in my post
>> https://stat.ethz.ch/pipermail/r-sig-mixed-models/2013q4/021063.html)
>>
>> The reason that I am sending you this email is that  I think
>> that it is difficult to come up with satisfying rules for
>> having automatic merging of random effects (for fixed effect the
>> marginality principle is enforced but I don't think that that would
>> always make sense  for random effects).  I think that it would be better
>> to extend lme4 syntax in a way that allow one to specify  them with more
>> flexibility.
>>
>> In particular, I wonder if it is not possible to use a syntax that was
>> proposed by Nelder (1977)  as a response to some discussants
>> who critizied the fact that terms like A:B meant different
>> things when included in a formulae like ~A+A:B and simply ~A:B
>> (see the paper, which also provides a great background
>> on the marginality principle). Let me quote Nelder:
>>
>> "Now it is arguable that the interpretation of β_2 x^2 is different in the
>> two expressions β0 + β1x + β2 x^2 and β0 + β2 x^2 yet we do not
>> distinguish notationally between them. It would of course be perfectly
>> possible to write, for example, A:B A:B[A] A:B[B] A:B[A,B] when the
>> marginal terms eliminated are appended in square brackets. Experience
>> with the notation of the paper, which is compact and unambiguous,
>> suggests that users quickly assimilate it and are not confused by the
>> convention adopted."Nelder J. A. (1977) A Reformulation of Linear Models
>> Journal of the Royal Statistical Society. Series A (General), Vol. 140,
>> pp.48-77
>>
[--sic--]
>>
>> With the same syntax, I could simplify the correlation structure between
>> crossed effects (A*B|group) by doing something like
>>
>> (1|group) + (A[1]|group)+(B[1]|group)+(A:B[A+B]|group)
>>
[--sic--]
>>
>> Best
>>
>> Gabriel
>>
>>
>>
>>
>>
-- 
#----------------------------------------------------------------
Gabriel Baud-Bovy                 email: gabriel.baud-bovy at iit.it
Italian Institute of Technology       tel.: (+39) 010 71781 (822)
via Morego 30, 16163 Genova            mobile: (+39) 348 172 4045
http://www.iit.it/en/rbcs-labs/dti.html
#----------------------------------------------------------------



-- 
---------------------------------------------------------------------
Gabriel Baud-Bovy               tel.: (+39) 02 2643 4839 (office)
UHSR University                       (+39) 02 2643 3429 (laboratory)
via Olgettina, 58                     (+39) 02 2643 4891 (secretary)
20132 Milan, Italy               fax: (+39) 02 2643 4892



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