Nested dataset (3 Levels)

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

Nested dataset (3 Levels)

Oliver
Hi everyone,

I have a question regarding the organization of a dataset for multilevel
modeling. Here's a brief/simplified overview of the study design. Each
participant provided 3 diary ratings per day of mood (independent variable)
and tobacco craving (outcome) for 14 consecutive days. Every day, 1 diary
report was provided in the morning, 1 in the atfernoon, and 1 in the evening
(total = 3/day). In the past, I've only assembled datasets for multilevel
modeling that involved 1 assessment per day, so I have questions regarding
1) how to assemble the dataset and 2) about the syntax to examine the
association between mood and tobacco craving.

#1. Question regarding the dataset. Attached is a printscreen of the dataset
that I've assembled (showing only the first participant). "ID" corresponds
to the participant, "Wave_Day" corresponds the diary day (ranging from
1-14), "Wave_DayMoment" (ranging from 1-3) corresponds to the specific
moment during the day (i.e., morning, afternoon, evening) when diary reports
were made, and "Wave_Overall" correspond to the order of diary reports, for
each participant, across all days and moments when diary reports were made.
Finally, "DiaryMood" and "DiaryCrav" correspond diary reports for my IV and
outcome, respectively. My question is the following: Is this generally
speaking the right way to structure this dataset, which involves now 3
levels (i.e., Wave_DayMoment --> nested in Wave_Day --> nested in ID) ?

#2.1. Question regarding syntax: Let's say that I'm interested in examining
the effect of mood on tobacco craving in this sample. Let's assume that I'm
not interested in the specific moment of the day when diaries were made. In
other words, only interested in the association between mood and tobacco
craving across all Wave_Days and Wave_DayMoments. Would the syntax below be
adequate ? Is the random intercept line properly specified ?

MIXED Diary_Crav WITH Diary_Mood
/PRINT=SOLUTION TESTCOV
/METHOD=ML
/FIXED= Diary_Mood
/RANDOM INTERCEPT | SUBJECT(ID) COVTYPE (ID)
/REPEATED=Wave_Overall | SUBJECT(ID) COVTYPE(AR1) .

Thanks in advance for your assistance.
O.

<http://spssx-discussion.1045642.n5.nabble.com/file/t340718/Dataset_structure.jpg>




--
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: Nested dataset (3 Levels)

Ryan Black
Hi Oliver,

You have doubly repeated measures (multiple measurements on each day with multiple days). This is good timing. Doubly repeated covariance structures are available in the MIXED procedure starting in SPSS v. 26.


See page 9.

Feel free to write back with questions / comments. 

Ryan 

Sent from my iPhone

On May 17, 2020, at 12:25 PM, Oliver <[hidden email]> wrote:

Hi everyone,

I have a question regarding the organization of a dataset for multilevel
modeling. Here's a brief/simplified overview of the study design. Each
participant provided 3 diary ratings per day of mood (independent variable)
and tobacco craving (outcome) for 14 consecutive days. Every day, 1 diary
report was provided in the morning, 1 in the atfernoon, and 1 in the evening
(total = 3/day). In the past, I've only assembled datasets for multilevel
modeling that involved 1 assessment per day, so I have questions regarding
1) how to assemble the dataset and 2) about the syntax to examine the
association between mood and tobacco craving.

#1. Question regarding the dataset. Attached is a printscreen of the dataset
that I've assembled (showing only the first participant). "ID" corresponds
to the participant, "Wave_Day" corresponds the diary day (ranging from
1-14), "Wave_DayMoment" (ranging from 1-3) corresponds to the specific
moment during the day (i.e., morning, afternoon, evening) when diary reports
were made, and "Wave_Overall" correspond to the order of diary reports, for
each participant, across all days and moments when diary reports were made.
Finally, "DiaryMood" and "DiaryCrav" correspond diary reports for my IV and
outcome, respectively. My question is the following: Is this generally
speaking the right way to structure this dataset, which involves now 3
levels (i.e., Wave_DayMoment --> nested in Wave_Day --> nested in ID) ?

#2.1. Question regarding syntax: Let's say that I'm interested in examining
the effect of mood on tobacco craving in this sample. Let's assume that I'm
not interested in the specific moment of the day when diaries were made. In
other words, only interested in the association between mood and tobacco
craving across all Wave_Days and Wave_DayMoments. Would the syntax below be
adequate ? Is the random intercept line properly specified ?

MIXED Diary_Crav WITH Diary_Mood
/PRINT=SOLUTION TESTCOV
/METHOD=ML
/FIXED= Diary_Mood
/RANDOM INTERCEPT | SUBJECT(ID) COVTYPE (ID)
/REPEATED=Wave_Overall | SUBJECT(ID) COVTYPE(AR1) .

Thanks in advance for your assistance.
O.

<http://spssx-discussion.1045642.n5.nabble.com/file/t340718/Dataset_structure.jpg>




--
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
===================== 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: Nested dataset (3 Levels)

Oliver
Hi Ryan,

Thanks for getting back to me.

I just found this SPSS syntax for 3-Level multilevel models through the UCLA
website. It seems like their example, year (Lev1) are nested within children
(cid), which are nested within schools (school). As you can see, they
specified two random intercepts. I tried with SPSS 24 and it worked, so
that's great news. In my case, given that my Lev1 observations are nested
within days, which are nested within IDs, I guess specifying random
intercepts for "days" and "Id" would be appropriate based on the UCLA
syntax.

mixed math with year
 /fixed = year  
 /print = solution
 /random = intercept  | subject(school)
 /random = intercept | subject(school*cid).




--
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: Nested dataset (3 Levels)

Ryan Black
In reply to this post by Oliver
Hi Oliver,

The random effects design you suggested may not adequately capture the type of within-subject correlation structure induced by your repeated measures design.

I would be inclined to try a Kronecker covariance type (eg, UN_AR1, UN_UN).

Best,

Ryan

Sent from my iPhone

> On May 20, 2020, at 1:41 PM, Oliver <[hidden email]> wrote:
>
> Hi Ryan,
>
> Thanks for getting back to me.
>
> I just found this SPSS syntax for 3-Level multilevel models through the UCLA
> website. It seems like their example, year (Lev1) are nested within children
> (cid), which are nested within schools (school). As you can see, they
> specified two random intercepts. I tried with SPSS 24 and it worked, so
> that's great news. In my case, given that my Lev1 observations are nested
> within days, which are nested within IDs, I guess specifying random
> intercepts for "days" and "Id" would be appropriate based on the UCLA
> syntax.
>
> mixed math with year
> /fixed = year  
> /print = solution
> /random = intercept  | subject(school)
> /random = intercept | subject(school*cid).
>
>
>
>
> --
> 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

=====================
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: Nested dataset (3 Levels)

Maguin, Eugene
I'd like to barge in, unpolitely, and ask what is the advantage(s) of a repeated measures random intercept model over a three level mixed model.
Gene Maguin

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Ryan Black
Sent: Wednesday, May 20, 2020 8:10 PM
To: [hidden email]
Subject: Re: Nested dataset (3 Levels)

Hi Oliver,

The random effects design you suggested may not adequately capture the type of within-subject correlation structure induced by your repeated measures design.

I would be inclined to try a Kronecker covariance type (eg, UN_AR1, UN_UN).

Best,

Ryan

Sent from my iPhone

> On May 20, 2020, at 1:41 PM, Oliver <[hidden email]> wrote:
>
> Hi Ryan,
>
> Thanks for getting back to me.
>
> I just found this SPSS syntax for 3-Level multilevel models through
> the UCLA website. It seems like their example, year (Lev1) are nested
> within children (cid), which are nested within schools (school). As
> you can see, they specified two random intercepts. I tried with SPSS
> 24 and it worked, so that's great news. In my case, given that my Lev1
> observations are nested within days, which are nested within IDs, I
> guess specifying random intercepts for "days" and "Id" would be
> appropriate based on the UCLA syntax.
>
> mixed math with year
> /fixed = year
> /print = solution
> /random = intercept  | subject(school) /random = intercept |
> subject(school*cid).
>
>
>
>
> --
> 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

=====================
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

=====================
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: Nested dataset (3 Levels)

Ryan Black
Hi Gene,

Random intercept terms assume a constant correlation across measurements on the same "subject." (i.e. compound symmetry). This usually makes sense when you have non-temporal data. OTOH, if you have repeated measures over a period of time, it's fairly common to observe a decay in correlations as measurements become more distant in time (e.g., corr(t1,t2) > corr(t1,t3)).

As a reminder, the following two models are equivalent:

MIXED y BY time
  /FIXED=time | SSTYPE(3)
  /METHOD=REML
  /RANDOM=INTERCEPT | SUBJECT(person) COVTYPE(VC).

MIXED y BY time
  /FIXED=time | SSTYPE(3)
  /METHOD=REML
  /REPEATED=time | SUBJECT(person) COVTYPE(CS).

Both assume compound symmetry. 

But in a study where individuals are measured over an extended period of time, there is a chance a CS structure will not hold. 

This extends to designs with two repeated measures (aka within-subjects) factors (e.g., multiple measurements on a given day and multiple days). 

Which covariance structure should we specify for the first factor (multiple measurements taken on the same day)? Unstructured (UN) perhaps? Which covariance structure should we specify for the second factor (multiple days)? First-order autoregressive (AR1) perhaps?

The Kronecker product option allows one to flexibly model both covariance structures simultaneously (e.g., UN_AR1). Note that likelihood ratio tests could be employed with nested models to help determine the appropriate structure. 

HTH,

Ryan

On Thu, May 21, 2020 at 10:19 AM Maguin, Eugene <[hidden email]> wrote:
I'd like to barge in, unpolitely, and ask what is the advantage(s) of a repeated measures random intercept model over a three level mixed model.
Gene Maguin

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Ryan Black
Sent: Wednesday, May 20, 2020 8:10 PM
To: [hidden email]
Subject: Re: Nested dataset (3 Levels)

Hi Oliver,

The random effects design you suggested may not adequately capture the type of within-subject correlation structure induced by your repeated measures design.

I would be inclined to try a Kronecker covariance type (eg, UN_AR1, UN_UN).

Best,

Ryan

Sent from my iPhone

> On May 20, 2020, at 1:41 PM, Oliver <[hidden email]> wrote:
>
> Hi Ryan,
>
> Thanks for getting back to me.
>
> I just found this SPSS syntax for 3-Level multilevel models through
> the UCLA website. It seems like their example, year (Lev1) are nested
> within children (cid), which are nested within schools (school). As
> you can see, they specified two random intercepts. I tried with SPSS
> 24 and it worked, so that's great news. In my case, given that my Lev1
> observations are nested within days, which are nested within IDs, I
> guess specifying random intercepts for "days" and "Id" would be
> appropriate based on the UCLA syntax.
>
> mixed math with year
> /fixed = year
> /print = solution
> /random = intercept  | subject(school) /random = intercept |
> subject(school*cid).
>
>
>
>
> --
> 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

=====================
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
===================== 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: Nested dataset (3 Levels)

Ryan Black
Hi Gene,

There are two additional points worth making:

The covariance structure of the Kronecker option requires that the first factor conform to a multivariate response (unstructured covariance structure). The second factor assumes to be the repeated measures (ordered) variable, and may conform to an unstructured, first-order autoregressive, or compound symmetric structure. 

If you don’t have access to SPSS 26, there is a way to fit a doubly multivariate repeated measures design in MIXED:


But as you can see, it has its limitations. 

Ryan 

Sent from my iPhone

On May 21, 2020, at 2:41 PM, Ryan Black <[hidden email]> wrote:


Hi Gene,

Random intercept terms assume a constant correlation across measurements on the same "subject." (i.e. compound symmetry). This usually makes sense when you have non-temporal data. OTOH, if you have repeated measures over a period of time, it's fairly common to observe a decay in correlations as measurements become more distant in time (e.g., corr(t1,t2) > corr(t1,t3)).

As a reminder, the following two models are equivalent:

MIXED y BY time
  /FIXED=time | SSTYPE(3)
  /METHOD=REML
  /RANDOM=INTERCEPT | SUBJECT(person) COVTYPE(VC).

MIXED y BY time
  /FIXED=time | SSTYPE(3)
  /METHOD=REML
  /REPEATED=time | SUBJECT(person) COVTYPE(CS).

Both assume compound symmetry. 

But in a study where individuals are measured over an extended period of time, there is a chance a CS structure will not hold. 

This extends to designs with two repeated measures (aka within-subjects) factors (e.g., multiple measurements on a given day and multiple days). 

Which covariance structure should we specify for the first factor (multiple measurements taken on the same day)? Unstructured (UN) perhaps? Which covariance structure should we specify for the second factor (multiple days)? First-order autoregressive (AR1) perhaps?

The Kronecker product option allows one to flexibly model both covariance structures simultaneously (e.g., UN_AR1). Note that likelihood ratio tests could be employed with nested models to help determine the appropriate structure. 

HTH,

Ryan

On Thu, May 21, 2020 at 10:19 AM Maguin, Eugene <[hidden email]> wrote:
I'd like to barge in, unpolitely, and ask what is the advantage(s) of a repeated measures random intercept model over a three level mixed model.
Gene Maguin

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Ryan Black
Sent: Wednesday, May 20, 2020 8:10 PM
To: [hidden email]
Subject: Re: Nested dataset (3 Levels)

Hi Oliver,

The random effects design you suggested may not adequately capture the type of within-subject correlation structure induced by your repeated measures design.

I would be inclined to try a Kronecker covariance type (eg, UN_AR1, UN_UN).

Best,

Ryan

Sent from my iPhone

> On May 20, 2020, at 1:41 PM, Oliver <[hidden email]> wrote:
>
> Hi Ryan,
>
> Thanks for getting back to me.
>
> I just found this SPSS syntax for 3-Level multilevel models through
> the UCLA website. It seems like their example, year (Lev1) are nested
> within children (cid), which are nested within schools (school). As
> you can see, they specified two random intercepts. I tried with SPSS
> 24 and it worked, so that's great news. In my case, given that my Lev1
> observations are nested within days, which are nested within IDs, I
> guess specifying random intercepts for "days" and "Id" would be
> appropriate based on the UCLA syntax.
>
> mixed math with year
> /fixed = year
> /print = solution
> /random = intercept  | subject(school) /random = intercept |
> subject(school*cid).
>
>
>
>
> --
> 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

=====================
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
===================== 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: Nested dataset (3 Levels)

Bruce Weaver
Administrator
In reply to this post by Ryan Black
Hi Ryan.  I don't understand why you are calling this a "doubly repeated
measures" design.  My understanding of that term is that there would have to
be two outcome variables, as in the example shown here (see section 4 Data
Example):

  https://link.springer.com/chapter/10.1007/978-3-319-20600-4_11

Oliver has only one outcome variable (tobacco craving), so I would have said
that he has a two-factor repeated measures design (day x time of day), not a
doubly repeated measures design.  

I don't think this affects your advice about trying the newly available
covariance structures (UN_AR1, UN_CS, or UN_UN), as I find no mention of
"doubly repeated measures" in that document you pointed to.

Thanks for clarifying.  

Cheers,
Bruce
 


Ryan Black wrote

> Hi Oliver,
>
> You have doubly repeated measures (multiple measurements on each day with
> multiple days). This is good timing. Doubly repeated covariance structures
> are available in the MIXED procedure starting in SPSS v. 26.
>
> https://www.ibm.com/downloads/cas/RJBNRBVB
>
> See page 9.
>
> Feel free to write back with questions / comments.
>
> Ryan
>
> Sent from my iPhone
>
>> On May 17, 2020, at 12:25 PM, Oliver &lt;

> momartel.bwh.harvard@

> &gt; wrote:
>>
>> Hi everyone,
>>
>> I have a question regarding the organization of a dataset for multilevel
>> modeling. Here's a brief/simplified overview of the study design. Each
>> participant provided 3 diary ratings per day of mood (independent
>> variable)
>> and tobacco craving (outcome) for 14 consecutive days. Every day, 1 diary
>> report was provided in the morning, 1 in the atfernoon, and 1 in the
>> evening
>> (total = 3/day). In the past, I've only assembled datasets for multilevel
>> modeling that involved 1 assessment per day, so I have questions
>> regarding
>> 1) how to assemble the dataset and 2) about the syntax to examine the
>> association between mood and tobacco craving.
>>
>> #1. Question regarding the dataset. Attached is a printscreen of the
>> dataset
>> that I've assembled (showing only the first participant). "ID"
>> corresponds
>> to the participant, "Wave_Day" corresponds the diary day (ranging from
>> 1-14), "Wave_DayMoment" (ranging from 1-3) corresponds to the specific
>> moment during the day (i.e., morning, afternoon, evening) when diary
>> reports
>> were made, and "Wave_Overall" correspond to the order of diary reports,
>> for
>> each participant, across all days and moments when diary reports were
>> made.
>> Finally, "DiaryMood" and "DiaryCrav" correspond diary reports for my IV
>> and
>> outcome, respectively. My question is the following: Is this generally
>> speaking the right way to structure this dataset, which involves now 3
>> levels (i.e., Wave_DayMoment --> nested in Wave_Day --> nested in ID) ?
>>
>> #2.1. Question regarding syntax: Let's say that I'm interested in
>> examining
>> the effect of mood on tobacco craving in this sample. Let's assume that
>> I'm
>> not interested in the specific moment of the day when diaries were made.
>> In
>> other words, only interested in the association between mood and tobacco
>> craving across all Wave_Days and Wave_DayMoments. Would the syntax below
>> be
>> adequate ? Is the random intercept line properly specified ?
>>
>> MIXED Diary_Crav WITH Diary_Mood
>> /PRINT=SOLUTION TESTCOV
>> /METHOD=ML
>> /FIXED= Diary_Mood
>> /RANDOM INTERCEPT | SUBJECT(ID) COVTYPE (ID)
>> /REPEATED=Wave_Overall | SUBJECT(ID) COVTYPE(AR1) .
>>
>> Thanks in advance for your assistance.
>> O.
>>
>> &lt;http://spssx-discussion.1045642.n5.nabble.com/file/t340718/Dataset_structure.jpg&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
>
> =====================
> 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: Nested dataset (3 Levels)

Kirill Orlov
SPSS Help (for Repeated-measures GLM) defines doubly multivariate repeated measures model is when you have more than one response features measured in parallel. If these features are comparable unit (such as left and right arm strength) then Multivariate Tests table still have a sense.

"Measures. If subjects were tested on more than one measure at each time, define the measures. For example, the pulse and respiration rate could be measured on each subject every day for a week. These measures do not exist as variables in the data file but are defined here. A model with more than one measure is sometimes called a doubly multivariate repeated measures model."

This not the same as "more than one RM-factor" (e.g. weakly measures and year of the measures).


23.05.2020 18:59, Bruce Weaver пишет:
Hi Ryan.  I don't understand why you are calling this a "doubly repeated
measures" design.  My understanding of that term is that there would have to
be two outcome variables, as in the example shown here (see section 4 Data
Example):

  https://link.springer.com/chapter/10.1007/978-3-319-20600-4_11

Oliver has only one outcome variable (tobacco craving), so I would have said
that he has a two-factor repeated measures design (day x time of day), not a
doubly repeated measures design.  

I don't think this affects your advice about trying the newly available
covariance structures (UN_AR1, UN_CS, or UN_UN), as I find no mention of
"doubly repeated measures" in that document you pointed to.

Thanks for clarifying.   

Cheers,
Bruce
 


Ryan Black wrote
Hi Oliver,

You have doubly repeated measures (multiple measurements on each day with
multiple days). This is good timing. Doubly repeated covariance structures
are available in the MIXED procedure starting in SPSS v. 26.

https://www.ibm.com/downloads/cas/RJBNRBVB

See page 9.

Feel free to write back with questions / comments. 

Ryan 

Sent from my iPhone

On May 17, 2020, at 12:25 PM, Oliver &lt;

      
momartel.bwh.harvard@

      
&gt; wrote:
Hi everyone,

I have a question regarding the organization of a dataset for multilevel
modeling. Here's a brief/simplified overview of the study design. Each
participant provided 3 diary ratings per day of mood (independent
variable)
and tobacco craving (outcome) for 14 consecutive days. Every day, 1 diary
report was provided in the morning, 1 in the atfernoon, and 1 in the
evening
(total = 3/day). In the past, I've only assembled datasets for multilevel
modeling that involved 1 assessment per day, so I have questions
regarding
1) how to assemble the dataset and 2) about the syntax to examine the
association between mood and tobacco craving. 

#1. Question regarding the dataset. Attached is a printscreen of the
dataset
that I've assembled (showing only the first participant). "ID"
corresponds
to the participant, "Wave_Day" corresponds the diary day (ranging from
1-14), "Wave_DayMoment" (ranging from 1-3) corresponds to the specific
moment during the day (i.e., morning, afternoon, evening) when diary
reports
were made, and "Wave_Overall" correspond to the order of diary reports,
for
each participant, across all days and moments when diary reports were
made.
Finally, "DiaryMood" and "DiaryCrav" correspond diary reports for my IV
and
outcome, respectively. My question is the following: Is this generally
speaking the right way to structure this dataset, which involves now 3
levels (i.e., Wave_DayMoment --> nested in Wave_Day --> nested in ID) ?

#2.1. Question regarding syntax: Let's say that I'm interested in
examining
the effect of mood on tobacco craving in this sample. Let's assume that
I'm
not interested in the specific moment of the day when diaries were made.
In
other words, only interested in the association between mood and tobacco
craving across all Wave_Days and Wave_DayMoments. Would the syntax below
be
adequate ? Is the random intercept line properly specified ?

MIXED Diary_Crav WITH Diary_Mood
/PRINT=SOLUTION TESTCOV
/METHOD=ML
/FIXED= Diary_Mood
/RANDOM INTERCEPT | SUBJECT(ID) COVTYPE (ID) 
/REPEATED=Wave_Overall | SUBJECT(ID) COVTYPE(AR1) .

Thanks in advance for your assistance.
O.

&lt;http://spssx-discussion.1045642.n5.nabble.com/file/t340718/Dataset_structure.jpg&gt; 




--
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
=====================
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
[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


===================== 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: Nested dataset (3 Levels)

Ryan Black
In reply to this post by Oliver
Hi Bruce,

If the issue you take is with me calling it doubly repeated when the first repeated measures factor is not a true multivariate response, I’m fine with referring to it as two repeated measures factors.

Let’s get to the heart of the issue...

As stated in SPSS GENLINMIXED documentation:

The Kronecker product of two matrices can handle doubly repeated-measure data in which there are two repeated effects; one of them indicating the multivariate observation of target, and the other the time or the order of the data measured.”


Digging deeper, the first factor is assumed to follow an unstructured matrix, consistent with modeling a multivariate response. The second factor can be modeled with one of three possible covariance structures (CS, AR1, UN).

Does that mean that because the documentation uses the term “doubly repeated effects,” we cannot apply Kronecker to designs with two repeated measures factors? 

I would say certainly not. But there are implications. 

For one thing, we do need to understand the first factor will be forced to conform to an unstructured matrix, consistent with a multivariate response. Unstructured covariance type may be inefficient in some situations but likely not wrong.

Assuming the Kronecker type in SPSS is the same as the Kronecker type in SAS, here’s a relevant example on pages 4-6 using the MIXED procedure in SAS:


Note in this example they have a single outcome, respiratory ability. They have two repeated measures factors (drug and hour), with the first factor assigned an unstructured matrix and the second factor assigned a first-order autoregressive structure. 

Confession. I am familiar with use the Kronecker covariance type in SAS MIXED. I really ought to try it out in SPSS MIXED to ensure there aren’t any meaningful differences that would change my perspective. I assume they are similar. 

There are many ways to appropriately capture the covariance matrix in situations in which there are two repeated measures factors. The Kronecker type will not be the most appropriate all the time, though I see applicability. 

Circling back to Oliver’s specific situation, I’d probably assign days (1,...,14) as the first factor and the time during day (morning, afternoon, evening) as the second factor in the speculation of the Kronecker covariance type. I could also see use of a combination of random and repeated statements. But using random effects the way proposed (two random intercept terms) may not capture the covariance induced by repeated measures. But maybe it is. I would explore. 

My 2 cents. :-) 

Ryan 

Sent from my iPhone

On May 23, 2020, at 11:59 AM, Bruce Weaver <[hidden email]> wrote:

Hi Ryan.  I don't understand why you are calling this a "doubly repeated
measures" design.  My understanding of that term is that there would have to
be two outcome variables, as in the example shown here (see section 4 Data
Example):

https://link.springer.com/chapter/10.1007/978-3-319-20600-4_11

Oliver has only one outcome variable (tobacco craving), so I would have said
that he has a two-factor repeated measures design (day x time of day), not a
doubly repeated measures design.  

I don't think this affects your advice about trying the newly available
covariance structures (UN_AR1, UN_CS, or UN_UN), as I find no mention of
"doubly repeated measures" in that document you pointed to.

Thanks for clarifying.   

Cheers,
Bruce



Ryan Black wrote
Hi Oliver,
You have doubly repeated measures (multiple measurements on each day with
multiple days). This is good timing. Doubly repeated covariance structures
are available in the MIXED procedure starting in SPSS v. 26.
https://www.ibm.com/downloads/cas/RJBNRBVB
See page 9.
Feel free to write back with questions / comments.
Ryan
Sent from my iPhone
On May 17, 2020, at 12:25 PM, Oliver &lt;

momartel.bwh.harvard@

&gt; wrote:
Hi everyone,
I have a question regarding the organization of a dataset for multilevel
modeling. Here's a brief/simplified overview of the study design. Each
participant provided 3 diary ratings per day of mood (independent
variable)
and tobacco craving (outcome) for 14 consecutive days. Every day, 1 diary
report was provided in the morning, 1 in the atfernoon, and 1 in the
evening
(total = 3/day). In the past, I've only assembled datasets for multilevel
modeling that involved 1 assessment per day, so I have questions
regarding
1) how to assemble the dataset and 2) about the syntax to examine the
association between mood and tobacco craving.
#1. Question regarding the dataset. Attached is a printscreen of the
dataset
that I've assembled (showing only the first participant). "ID"
corresponds
to the participant, "Wave_Day" corresponds the diary day (ranging from
1-14), "Wave_DayMoment" (ranging from 1-3) corresponds to the specific
moment during the day (i.e., morning, afternoon, evening) when diary
reports
were made, and "Wave_Overall" correspond to the order of diary reports,
for
each participant, across all days and moments when diary reports were
made.
Finally, "DiaryMood" and "DiaryCrav" correspond diary reports for my IV
and
outcome, respectively. My question is the following: Is this generally
speaking the right way to structure this dataset, which involves now 3
levels (i.e., Wave_DayMoment --> nested in Wave_Day --> nested in ID) ?
#2.1. Question regarding syntax: Let's say that I'm interested in
examining
the effect of mood on tobacco craving in this sample. Let's assume that
I'm
not interested in the specific moment of the day when diaries were made.
In
other words, only interested in the association between mood and tobacco
craving across all Wave_Days and Wave_DayMoments. Would the syntax below
be
adequate ? Is the random intercept line properly specified ?
MIXED Diary_Crav WITH Diary_Mood
/PRINT=SOLUTION TESTCOV
/METHOD=ML
/FIXED= Diary_Mood
/RANDOM INTERCEPT | SUBJECT(ID) COVTYPE (ID)
/REPEATED=Wave_Overall | SUBJECT(ID) COVTYPE(AR1) .
Thanks in advance for your assistance.
O.
&lt;http://spssx-discussion.1045642.n5.nabble.com/file/t340718/Dataset_structure.jpg&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
=====================
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
===================== 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: Nested dataset (3 Levels)

Bruce Weaver
Administrator
Hi Ryan.  Yes, that was the issue.  Thanks for clarifying.  
Bruce



Ryan Black wrote
> Hi Bruce,
>
> If the issue you take is with me calling it doubly repeated when the first
> repeated measures factor is not a true multivariate response, I’m fine
> with referring to it as two repeated measures factors.
>
> --- snip the rest ---





-----
--
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.