>Is anyone aware of how SPSS model GENLINMIXED with SUBJECTS=subject_id, 
REPEATED_MEASURES=time, FIXED_EFFECTS=genotype time genotype*time would 
translate to a R formula?

Hello, not sure this helps, but there are various papers that claim to 
provide syntax for both SPSS and R for mixed models, e.g.

http://www.indiana.edu/~statmath/stat/all/hlm/hlm.pdf


Cheers,

Luca


------------------------------------------------------------------
Luca Borger (PhD, MSc, BMus)
Centre d'Etudes Biologiques de Chize
CNRS (U.P.R. 1934) & INRA (USC 1339)
79360 Villiers-en-Bois, France
*****
email: lborger@cebc.cnrs.fr
Skype: luca.borger | Tel: +33 (0)549 099613
http://cnrs.academia.edu/LucaBorger
http://www.researcherid.com/rid/C-6003-2008
http://www.cebc.cnrs.fr/Fidentite/borger/borger.htm
------------------------------------------------------------------
* new book chapter:
Borger & Fryxell (2012) Quantifying individual differences in dispersal 
using the net squared displacement statistics. 
Ch. 17 In: Dispersal Ecology and Evolution. Editors: Clobert J., Baguette 
M., Benton T., Bullock J.
Oxford University Press, Oxford (UK).
-

-----Original Message-----
From: Brad Buran <bburan@galenea.com>
To: Ben Bolker <bbolker@gmail.com>, "r-sig-mixed-models@r-project.org" 
<r-sig-mixed-models@r-project.org>
Date: Thu, 27 Dec 2012 22:31:55 +0000
Subject: Re: [R-sig-ME] linear mixed model with non-monotonic longitudinal 
data

That was very helpful.  It didn't occur to me that it was possible to use 
functions such as poly in the equation.  That said, it seems that none of 
the models (i.e. the ones I mentioned nor the ones you suggested) seem to be 
a good fit for the data based on the residuals.  Since the original model 
was defined in SPSS (using the genlinmixed function), I want to try to 
determine the actual model that SPSS uses (they make you step through a GUI 
to define your model rather than defining an equation like R does).  I 
haven't been able to find any documentation on how the inputs to the 
genlinmixed command are transformed into a model that I could try to create 
in R (so I can check it's validity).

Is anyone aware of how SPSS model GENLINMIXED with SUBJECTS=subject_id, 
REPEATED_MEASURES=time, FIXED_EFFECTS=genotype time genotype*time would 
translate to a R formula?

Thanks!
Brad
________________________________________
From: r-sig-mixed-models-bounces@r-project.org 
[r-sig-mixed-models-bounces@r-project.org] on behalf of Ben Bolker 
[bbolker@gmail.com]
Sent: Thursday, December 27, 2012 10:49 AM
To: r-sig-mixed-models@r-project.org
Subject: Re: [R-sig-ME] linear mixed model with non-monotonic longitudinal   
   data

Brad Buran <bburan@...> writes:

>  I'm attempting to fit a linear mixed model to my dataset.  This
> data is the measure of stimulus-evoked power as a function of time.
> We have 32 subjects from two populations (broken down by genotype).
> The stimulus-evoked power is sampled at a high rate (one data-point
> every 5 msec) and reflects the "longitudinal" or "within-subjects"
> measure in my study.

> Right now I've defined the model as:
>
> power ~ genotype * time + (1|subject_id)
>
> I understand that one must also test additional models such as:
>
> power ~ genotype * time + (time|subject_id)
> power ~ genotype * time + (1|subject_id) + (0+time|subject_id)

> However, power is not a linear function of time (i.e. it is
> non-monotonic).  Power rapidly increases over a few hundred
> milliseconds to a peak value then gradually declines afterwards.  In
> this situation, would it be inappropriate to use time for
> determining a slope for the random effect?

> I'm actually not even sure whether a linear mixed model is
> appropriate for this type of data (considering the power response is
> non-monotonic with respect to time).  However, this is how the
> original analysis was set up by a predecessor and I am currently
> trying to determine the validity of this approach.  Thanks, Brad

  Hard to answer completely in general.  The simplest approach
would probably be to make the response a quadratic function of
time; there are a few slightly complicating issues (whether to
use a boneheaded approach such as (genotype * (time + I(time^2))) or
to use poly(time,2) , which constructs orthogonal polynomials
by default, and how to get the time*subject interactions specified
correctly), but it's pretty easy and if it looks like it fits
your data well I might be satisfied with it.
  You could also fit generalized additive mixed
models (see the mgcv and gamm4 packages), again I'm not 100%
sure how to incorporate the time*subject interactions.

  The bottom line is that linear models are actually pretty
flexible for modeling continuous, not necessarily linear,
responses (the assumption is that the model is a linear function
of the parameters, not necessarily that (e.g.) power is
a linear function of time).

  Ben Bolker

_______________________________________________
R-sig-mixed-models@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models

_______________________________________________
R-sig-mixed-models@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models

	[[alternative HTML version deleted]]

