[R-sig-ME] What is the lmer/nlme equivalent of the REPEATED subcommand in SPSS's MIXED procedure?

Mollie Brooks mollieebrooks at gmail.com
Tue Mar 20 18:19:29 CET 2018


I don’t know anything about spss, but if you basically want lme4 with more correlation structures, you could look at the structures available with glmmTMB. 
https://cran.r-project.org/web/packages/glmmTMB/vignettes/covstruct.html

cheers,
Mollie

> On 20Mar 2018, at 18:11, Ben Pelzer <b.pelzer at maw.ru.nl> wrote:
> 
> Hi Maarten,
> 
> You are right: you need nlme and NOT lme4 to specify particular 
> correlation structures. Also, in nlme you would need gls to make it 
> similar to mixed in spss. The repeated command in spss gives the same 
> results as gls does for any of the covariance structures.
> 
> Regards, Ben.
> 
> 
> On 20/03/2018 17:30, Maarten Jung wrote:
>> Dear Ben, dear Phillip,
>> 
>> comparing [1] with [2] I think the /REPEATED command specifies 
>> the error (co)variance structure of the model. Would you agree with that?
>> If so, AFAIK this is not possible with lmer and thus the answer on 
>> Stack Overflow [3] would be wrong.
>> 
>> [1] 
>> https://stats.idre.ucla.edu/r/examples/alda/r-applied-longitudinal-data-analysis-ch-7/
>> [2] 
>> https://stats.idre.ucla.edu/spss/examples/alda/chapter7/applied-longitudinal-data-analysis-modeling-change-and-event-occurrenceby-judith-d-singer-and-john-b-willett-chapter-7-examining-the-multilevel-model-s-erro/
>> [3] 
>> https://stackoverflow.com/questions/48518514/what-is-the-lmer-nlme-equivalent-of-the-repeated-subcommand-in-spsss-mixed-proc
>> 
>> Regards,
>> Maarten
>> 
>> On Tue, Mar 20, 2018 at 2:10 PM, Ben Pelzer <b.pelzer at maw.ru.nl 
>> <mailto:b.pelzer at maw.ru.nl <mailto:b.pelzer at maw.ru.nl>>> wrote:
>> 
>>    Dear Maarten,
>> 
>>    Take a look at
>> 
>>    https://stats.idre.ucla.edu/r/examples/alda/r-applied-longitudinal-data-analysis-ch-7/ <https://stats.idre.ucla.edu/r/examples/alda/r-applied-longitudinal-data-analysis-ch-7/>
>>    <https://stats.idre.ucla.edu/r/examples/alda/r-applied-longitudinal-data-analysis-ch-7/ <https://stats.idre.ucla.edu/r/examples/alda/r-applied-longitudinal-data-analysis-ch-7/>>
>> 
>>    which shows you a number of covariance structures, among which is
>>    the unstructured matrix, for repeated measures in R with lme. It
>>    refers to chapter 7 of Singer and Willett where they discuss all
>>    these different structures and how to choose among them. Regards,
>> 
>>    Ben.
>> 
>>    On 20-3-2018 9:00, Maarten Jung wrote:
>> 
>>        Dear list,
>>        I came across a SPSS syntax like this
>> 
>>        MIXED value BY factor1
>>             /CRITERIA=CIN(95) MXITER(100) MXSTEP(10) SCORING(1)
>>        SINGULAR(0.000000000001)
>>             HCONVERGE(0, ABSOLUTE) LCONVERGE(0, ABSOLUTE)
>>        PCONVERGE(0.000001,
>>             ABSOLUTE)
>>             /FIXED=factor1 | SSTYPE(3)
>>             /METHOD=REML
>>             /REPEATED=factor1 | SUBJECT(participant) COVTYPE(UN).
>> 
>>        and struggle to find an equivalent lmer/nlme (or R in general)
>>        formulation
>>        for this kind of models.
>>        Does anybody know how to convert the REPEATED subcommand into
>>        R code?
>> 
>>        Please note that I asked the question on Stack Overflow about
>>        two month ago:
>>        https://stackoverflow.com/questions/48518514/what-is-the-lmer-nlme-equivalent-of-the-repeated-subcommand-in-spsss-mixed-proc <https://stackoverflow.com/questions/48518514/what-is-the-lmer-nlme-equivalent-of-the-repeated-subcommand-in-spsss-mixed-proc>
>>        <https://stackoverflow.com/questions/48518514/what-is-the-lmer-nlme-equivalent-of-the-repeated-subcommand-in-spsss-mixed-proc <https://stackoverflow.com/questions/48518514/what-is-the-lmer-nlme-equivalent-of-the-repeated-subcommand-in-spsss-mixed-proc>>
>> 
>>        Best regards,
>>        Maarten
>> 
>>                [[alternative HTML version deleted]]
>> 
>>        _______________________________________________
>>        R-sig-mixed-models at r-project.org <mailto:R-sig-mixed-models at r-project.org>
>>        <mailto:R-sig-mixed-models at r-project.org <mailto:R-sig-mixed-models at r-project.org>> mailing list
>>        https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models <https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models>
>>        <https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models <https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models>>
>> 
>> 
>>    _______________________________________________
>>    R-sig-mixed-models at r-project.org <mailto:R-sig-mixed-models at r-project.org>
>>    <mailto:R-sig-mixed-models at r-project.org <mailto:R-sig-mixed-models at r-project.org>> mailing list
>>    https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models <https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models>
>>    <https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models <https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models>>
>> 
>> 
> 
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-sig-mixed-models at r-project.org <mailto:R-sig-mixed-models at r-project.org> mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models <https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models>

	[[alternative HTML version deleted]]



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