Raw data in Linear Mixed-Effects Model - SPSS error message

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Raw data in Linear Mixed-Effects Model - SPSS error message

Paul Sanford-2
There are two fixed factors in my LMM: the between-subjects factor of Group
and the within-subjects factor of Task. There is a single random factor of
Participant nested within Group. I put the Participant factor in the
Subjects box and the Task factor in the Repeated box on the initial prompt.
My MIXED command is below.

I am getting the "levels of the repeated effect are not different for each
observation within a repeated subject" error message when trying to run my
analysis.

The info I've found on resolving this is geared towards situations in which
there are single measurements per condition (participant averages). The
issue seems to be that I have raw data from individual trials (RTs) and,
thus, multiple measurements per Participant X Group X Task condition - each
participant has about 50 trials per Task. See image below for snippet of
trials from a single participant.

Any suggestions? Do I need to recode the data itself, or perhaps insert some
special syntax?



MIXED Time_sec BY Participant Group Task
/CRITERIA=CIN(95) MXITER(100) MXSTEP(10) SCORING(1) SINGULAR(0.000000000001)
HCONVERGE(0,
ABSOLUTE) LCONVERGE(0, ABSOLUTE) PCONVERGE(0.000001, ABSOLUTE)
/FIXED=Group Task Group*Task | SSTYPE(3)
/METHOD=REML
/PRINT=DESCRIPTIVES SOLUTION TESTCOV
/RANDOM=Participant(Group) | SUBJECT(Participant) COVTYPE(VC)
/REPEATED=Task | SUBJECT(Participant) COVTYPE(DIAG)

<http://spssx-discussion.1045642.n5.nabble.com/file/t341618/LMM_data_example.png>



--
Sent from: http://spssx-discussion.1045642.n5.nabble.com/

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Raw data in Linear Mixed-Effects Model - SPSS error message

Bruce Weaver
Administrator
For those who are interested, please note that some discussion of this topic
has already occurred in this ResearchGate thread:

https://www.researchgate.net/post/Using_raw_data_in_Linear_Mixed-Effects_Models-error_message



Paul Sanford-2 wrote

> There are two fixed factors in my LMM: the between-subjects factor of
> Group
> and the within-subjects factor of Task. There is a single random factor of
> Participant nested within Group. I put the Participant factor in the
> Subjects box and the Task factor in the Repeated box on the initial
> prompt.
> My MIXED command is below.
>
> I am getting the "levels of the repeated effect are not different for each
> observation within a repeated subject" error message when trying to run my
> analysis.
>
> The info I've found on resolving this is geared towards situations in
> which
> there are single measurements per condition (participant averages). The
> issue seems to be that I have raw data from individual trials (RTs) and,
> thus, multiple measurements per Participant X Group X Task condition -
> each
> participant has about 50 trials per Task. See image below for snippet of
> trials from a single participant.
>
> Any suggestions? Do I need to recode the data itself, or perhaps insert
> some
> special syntax?
>
>
>
> MIXED Time_sec BY Participant Group Task
> /CRITERIA=CIN(95) MXITER(100) MXSTEP(10) SCORING(1)
> SINGULAR(0.000000000001)
> HCONVERGE(0,
> ABSOLUTE) LCONVERGE(0, ABSOLUTE) PCONVERGE(0.000001, ABSOLUTE)
> /FIXED=Group Task Group*Task | SSTYPE(3)
> /METHOD=REML
> /PRINT=DESCRIPTIVES SOLUTION TESTCOV
> /RANDOM=Participant(Group) | SUBJECT(Participant) COVTYPE(VC)
> /REPEATED=Task | SUBJECT(Participant) COVTYPE(DIAG)
>
> &lt;http://spssx-discussion.1045642.n5.nabble.com/file/t341618/LMM_data_example.png&gt; 
>
>
>
> --
> Sent from: http://spssx-discussion.1045642.n5.nabble.com/
>
> =====================
> To manage your subscription to SPSSX-L, send a message to

> LISTSERV@.UGA

>  (not to SPSSX-L), with no body text except the
> command. To leave the list, send the command
> SIGNOFF SPSSX-L
> For a list of commands to manage subscriptions, send the command
> INFO REFCARD





-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.

--
Sent from: http://spssx-discussion.1045642.n5.nabble.com/

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.
Reply | Threaded
Open this post in threaded view
|

Re: Raw data in Linear Mixed-Effects Model - SPSS error message

Bruce Weaver
Administrator
In reply to this post by Paul Sanford-2
The participant numbers are not visible in the image you uploaded.  Does the
following code generate something that resembles your dataset?  It creates a
file where Group is a between-Ss factor but Task is a within-Ss factor.  

* Generate some fake data.
INPUT PROGRAM .
LOOP Group = 1 to 2.
LOOP Participant=1 to 10.
 LOOP Task = 1 to 2.
  LOOP Trial = 1 to 5.
   COMPUTE Time_sec=RV.UNIFORM(0.01,0.99) + Participant/10.
   END CASE.
  LEAVE Group.
  LEAVE Participant.
   LEAVE Task.
  END LOOP.
 END LOOP.
END LOOP.
END LOOP.
END FILE.
END INPUT PROGRAM .
EXECUTE.
FORMATS Group to Trial (F5.0).
COMPUTE Participant = Group*100 + Participant.
MEANS Time_sec by Group by Task.

If I run your original code on this dataset, I get the same warning you did.
But if I estimate a random intercept model with Participant (or
Participant*Task) as the cluster variable, I get some output.  

* Paul's original syntax.
MIXED Time_sec BY Participant Group Task
/FIXED=Group Task Group*Task | SSTYPE(3)
/METHOD=REML
/PRINT=DESCRIPTIVES SOLUTION TESTCOV
/RANDOM=Participant(Group) | SUBJECT(Participant) COVTYPE(VC)
/REPEATED=Task | SUBJECT(Participant) COVTYPE(DIAG)
.

* Now remove Participant as factor in the model, and estimate a
* random-intercept model with Particicipant as the cluster variable.
MIXED Time_sec BY Group Task
 /FIXED=Group Task Group*Task | SSTYPE(3)
 /METHOD=REML
 /PRINT=SOLUTION TESTCOV
 /RANDOM=Intercept | SUBJECT(Participant)
.

* Perhaps the cluster variable for the random intercepts should be
Participant*Task.
MIXED Time_sec BY Group Task
 /FIXED=Group Task Group*Task | SSTYPE(3)
 /METHOD=REML
 /PRINT=SOLUTION TESTCOV
 /RANDOM=Intercept | SUBJECT(Participant*Task)
.

HTH.



Paul Sanford-2 wrote

> There are two fixed factors in my LMM: the between-subjects factor of
> Group
> and the within-subjects factor of Task. There is a single random factor of
> Participant nested within Group. I put the Participant factor in the
> Subjects box and the Task factor in the Repeated box on the initial
> prompt.
> My MIXED command is below.
>
> I am getting the "levels of the repeated effect are not different for each
> observation within a repeated subject" error message when trying to run my
> analysis.
>
> The info I've found on resolving this is geared towards situations in
> which
> there are single measurements per condition (participant averages). The
> issue seems to be that I have raw data from individual trials (RTs) and,
> thus, multiple measurements per Participant X Group X Task condition -
> each
> participant has about 50 trials per Task. See image below for snippet of
> trials from a single participant.
>
> Any suggestions? Do I need to recode the data itself, or perhaps insert
> some
> special syntax?
>
>
>
> MIXED Time_sec BY Participant Group Task
> /CRITERIA=CIN(95) MXITER(100) MXSTEP(10) SCORING(1)
> SINGULAR(0.000000000001)
> HCONVERGE(0,
> ABSOLUTE) LCONVERGE(0, ABSOLUTE) PCONVERGE(0.000001, ABSOLUTE)
> /FIXED=Group Task Group*Task | SSTYPE(3)
> /METHOD=REML
> /PRINT=DESCRIPTIVES SOLUTION TESTCOV
> /RANDOM=Participant(Group) | SUBJECT(Participant) COVTYPE(VC)
> /REPEATED=Task | SUBJECT(Participant) COVTYPE(DIAG)
>
> &lt;http://spssx-discussion.1045642.n5.nabble.com/file/t341618/LMM_data_example.png&gt; 
>
>
>
> --
> Sent from: http://spssx-discussion.1045642.n5.nabble.com/
>
> =====================
> To manage your subscription to SPSSX-L, send a message to

> LISTSERV@.UGA

>  (not to SPSSX-L), with no body text except the
> command. To leave the list, send the command
> SIGNOFF SPSSX-L
> For a list of commands to manage subscriptions, send the command
> INFO REFCARD





-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.

--
Sent from: http://spssx-discussion.1045642.n5.nabble.com/

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.
Reply | Threaded
Open this post in threaded view
|

Re: Raw data in Linear Mixed-Effects Model - SPSS error message

Paul Sanford-2
Bruce,

Thanks for your reply! I'm going to try this out sometime soon and report
back the results.

All trials shown in my uploaded image are for the same participant, so they
had the same PID.

Paul



--
Sent from: http://spssx-discussion.1045642.n5.nabble.com/

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD