MIXED model for stepped wedge design

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

MIXED model for stepped wedge design

Kylie

Hi all,

 

Does anyone have any experience with the stepped wedge design? It’s essentially a form of cluster-randomised crossover trial [1].

 

I wish to analyse a continuous outcome with a mixed effects model as described in [1]. It looks to be fairly straight forward but if anyone is familiar with this kind of model, I hoped you could take a look at my MIXED syntax and see if I have it correct. I have:

 

MIXED Outcome BY Group Time Treatment

  /FIXED=Time Treatment | SSTYPE(3)

  /METHOD=REML

  /RANDOM=Group | COVTYPE(ID).

 

I get a ‘Hessian matrix is not positive definite’ warning for the one outcome I’ve looked at so far (I’ve tried increasing the step-halvings and iterations), but I suspect that could be because of the small number of groups (4). Before I go exploring that further I hoped to just confirm that the model I’m starting with above is theoretically correct.

 

Thanks,

Kylie.

 

 

[1] Hussey MA & Hughes JP. Design and analysis of stepped wedge cluster randomized trials. Contemporary Clinical Trials (2007) 28: 182-191.

 

 

Reply | Threaded
Open this post in threaded view
|

How to deal with (compute?) "not applicable" scale item?

tonishi@iupui.edu
I was going to weight-average 18 scale items, and each item has 6 different answers: 

Not important – 1
Slightly important – 2
Moderately important – 3
Very important – 4
Extremely important – 5
Not applicable – 6

In SPSS, how should and could I deal with this "Not applicable" item? Since this item is assigned "6," if I average scale items, the organization that answered "not application" will get higher scores, which is wrong. I was searching the answer in the Help tab in SPSS, but so far couldn't find an answer. 

I am working on an urgent task, so any suggestion would be greatly appreciated. 

Reply | Threaded
Open this post in threaded view
|

Re: How to deal with (compute?) "not applicable" scale item?

Jarrod Teo-2
Hi Tonishi,
 
Have you tried assigning 6 as a missing value in the SPSS?
 
This could be done in the data editor, variable tab under the missing column.

Once 6 is assigned as a missing value, you can confirm this assignment using a frequency on the variable that you are working on. The 6 should be now under the missing classification in a frequency table.
 
Warmest Regards
Dorraj Oet
 

Date: Tue, 18 Dec 2012 05:28:17 +0000
From: [hidden email]
Subject: How to deal with (compute?) "not applicable" scale item?
To: [hidden email]

I was going to weight-average 18 scale items, and each item has 6 different answers: 

Not important �C 1
Slightly important �C 2
Moderately important �C 3
Very important �C 4
Extremely important �C 5
Not applicable �C 6

In SPSS, how should and could I deal with this "Not applicable" item? Since this item is assigned "6," if I average scale items, the organization that answered "not application" will get higher scores, which is wrong. I was searching the answer in the Help tab in SPSS, but so far couldn't find an answer. 

I am working on an urgent task, so any suggestion would be greatly appreciated. 

Reply | Threaded
Open this post in threaded view
|

Re: How to deal with (compute?) "not applicable" scale item?

GauravSrivastava
In reply to this post by tonishi@iupui.edu
Either You can assign 6 as missing value, then you can include or exclude it from your analysis.
you can also re-code it like 0 but it depend on how you are using you data.

Regards,
Gaurav


On Tue, Dec 18, 2012 at 10:58 AM, Onishi, Tamaki <[hidden email]> wrote:
I was going to weight-average 18 scale items, and each item has 6 different answers: 

Not important – 1
Slightly important – 2
Moderately important – 3
Very important – 4
Extremely important – 5
Not applicable – 6

In SPSS, how should and could I deal with this "Not applicable" item? Since this item is assigned "6," if I average scale items, the organization that answered "not application" will get higher scores, which is wrong. I was searching the answer in the Help tab in SPSS, but so far couldn't find an answer. 

I am working on an urgent task, so any suggestion would be greatly appreciated. 


Reply | Threaded
Open this post in threaded view
|

Re: How to deal with (compute?) "not applicable" scale item?

tonishi@iupui.edu
Dorraj and Gaurav,

Thanks so much for your immediate response. I tried and it worked! Now, I can move onto the next step…

Tamaki

From: I Am Gaurav <[hidden email]>
Date: Tuesday, December 18, 2012 12:50 AM
To: Tamaki Onishi <[hidden email]>
Cc: "[hidden email]" <[hidden email]>
Subject: Re: How to deal with (compute?) "not applicable" scale item?

Either You can assign 6 as missing value, then you can include or exclude it from your analysis.
you can also re-code it like 0 but it depend on how you are using you data.

Regards,
Gaurav


On Tue, Dec 18, 2012 at 10:58 AM, Onishi, Tamaki <[hidden email]> wrote:
I was going to weight-average 18 scale items, and each item has 6 different answers: 

Not important – 1
Slightly important – 2
Moderately important – 3
Very important – 4
Extremely important – 5
Not applicable – 6

In SPSS, how should and could I deal with this "Not applicable" item? Since this item is assigned "6," if I average scale items, the organization that answered "not application" will get higher scores, which is wrong. I was searching the answer in the Help tab in SPSS, but so far couldn't find an answer. 

I am working on an urgent task, so any suggestion would be greatly appreciated. 


Reply | Threaded
Open this post in threaded view
|

Re: How to deal with (compute?) "not applicable" scale item?

Jarrod Teo-2
Dear Tamaki,
 
Apologies for spelling your name wrongly.
 
I am glad it worked. There is also another thing that might be useful for your data. If you have the variable Monthly Income in your data and the entry is blank. Please do not put a zero in it and name it as missing.
 
This is because there might really be respondents who do not have monthly income because they are pure commission earners. These people rightfully have a zero in their monthly Income. Those blanks in your monthly income variable could come from respondents who do not have a job.
 
In summary, for Income if it is blank, I will recode them to -99 (Any negative value) then assigned these -99 as missing values so that this will not conflict with respondents who really earn 0 dollars a month (pure commission earners).
 
Also, string variables hinders the percentage calculation in your frequency tables so you will need to recode blank values in string variables to a missing value say (e.g. gender, I might use x as a missing value) and assigned it as missing in SPSS.
 
Warmest Regards
Dorraj 
 

Date: Tue, 18 Dec 2012 06:11:37 +0000
From: [hidden email]
Subject: Re: How to deal with (compute?) "not applicable" scale item?
To: [hidden email]

Dorraj and Gaurav,

Thanks so much for your immediate response. I tried and it worked! Now, I can move onto the next step…

Tamaki

From: I Am Gaurav <[hidden email]>
Date: Tuesday, December 18, 2012 12:50 AM
To: Tamaki Onishi <[hidden email]>
Cc: "[hidden email]" <[hidden email]>
Subject: Re: How to deal with (compute?) "not applicable" scale item?

Either You can assign 6 as missing value, then you can include or exclude it from your analysis.
you can also re-code it like 0 but it depend on how you are using you data.

Regards,
Gaurav


On Tue, Dec 18, 2012 at 10:58 AM, Onishi, Tamaki <[hidden email]> wrote:
I was going to weight-average 18 scale items, and each item has 6 different answers: 

Not important �C 1
Slightly important �C 2
Moderately important �C 3
Very important �C 4
Extremely important �C 5
Not applicable �C 6

In SPSS, how should and could I deal with this "Not applicable" item? Since this item is assigned "6," if I average scale items, the organization that answered "not application" will get higher scores, which is wrong. I was searching the answer in the Help tab in SPSS, but so far couldn't find an answer. 

I am working on an urgent task, so any suggestion would be greatly appreciated. 


Reply | Threaded
Open this post in threaded view
|

Re: How to deal with (compute?) "not applicable" scale item?

John F Hall

Tamaki

 

Notwithstanding previous advice, declare 6 as a missing value: don’t use 0.  If you have a variable for occupation, you can also modify the values of income using an IF statement. 

 

It sounds like you may be a (graduate) student or beginning researcher, psossibly a newbie to SPSS.  If so you might like to look at the SPSS tutorials on my website, which also has links to other useful SPSS resources.  I have taught and/or advised hundreds of such, so if you care to send me (off-list, and in complete confidence) your SPSS *.sav file plus your questionnaire I should be able to give you more specific (and free) help.

 

John F Hall (Mr) [retired academic survey researcher]

 

Email:     [hidden email]

Website: www.surveyresearch.weebly.com

 

 

 

 

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of DorraJ Oet
Sent: 18 December 2012 07:59
To: [hidden email]
Subject: Re: How to deal with (compute?) "not applicable" scale item?

 

Dear Tamaki,
 
Apologies for spelling your name wrongly.
 
I am glad it worked. There is also another thing that might be useful for your data. If you have the variable Monthly Income in your data and the entry is blank. Please do not put a zero in it and name it as missing.
 
This is because there might really be respondents who do not have monthly income because they are pure commission earners. These people rightfully have a zero in their monthly Income. Those blanks in your monthly income variable could come from respondents who do not have a job.
 
In summary, for Income if it is blank, I will recode them to -99 (Any negative value) then assigned these -99 as missing values so that this will not conflict with respondents who really earn 0 dollars a month (pure commission earners).
 
Also, string variables hinders the percentage calculation in your frequency tables so you will need to recode blank values in string variables to a missing value say (e.g. gender, I might use x as a missing value) and assigned it as missing in SPSS.
 
Warmest Regards
Dorraj 
 


Date: Tue, 18 Dec 2012 06:11:37 +0000
From: [hidden email]
Subject: Re: How to deal with (compute?) "not applicable" scale item?
To: [hidden email]

Dorraj and Gaurav,

 

Thanks so much for your immediate response. I tried and it worked! Now, I can move onto the next step…

 

Tamaki

 

From: I Am Gaurav <[hidden email]>
Date: Tuesday, December 18, 2012 12:50 AM
To: Tamaki Onishi <[hidden email]>
Cc: "[hidden email]" <[hidden email]>
Subject: Re: How to deal with (compute?) "not applicable" scale item?

 

Either You can assign 6 as missing value, then you can include or exclude it from your analysis.

you can also re-code it like 0 but it depend on how you are using you data.

 

Regards,

Gaurav

 

On Tue, Dec 18, 2012 at 10:58 AM, Onishi, Tamaki <[hidden email]> wrote:

I was going to weight-average 18 scale items, and each item has 6 different answers: 

 

Not important – 1

Slightly important – 2

Moderately important – 3

Very important – 4

Extremely important – 5

Not applicable – 6

 

In SPSS, how should and could I deal with this "Not applicable" item? Since this item is assigned "6," if I average scale items, the organization that answered "not application" will get higher scores, which is wrong. I was searching the answer in the Help tab in SPSS, but so far couldn't find an answer. 

 

I am working on an urgent task, so any suggestion would be greatly appreciated. 

 

 

Reply | Threaded
Open this post in threaded view
|

Re: How to deal with (compute?) "not applicable" scale item?

David Marso
Administrator
In reply to this post by tonishi@iupui.edu
Next time please begin a NEW TOPIC rather than hijacking someone else's topic.
Next time you do this I will request that the moderator delete your thread!
I was looking forward to whatever wisdom people had to impart re Kylie's Wedge designs question and instead?
---
Onishi, Tamaki wrote
I was going to weight-average 18 scale items, and each item has 6 different answers:

Not important – 1
Slightly important – 2
Moderately important – 3
Very important – 4
Extremely important – 5
Not applicable – 6

In SPSS, how should and could I deal with this "Not applicable" item? Since this item is assigned "6," if I average scale items, the organization that answered "not application" will get higher scores, which is wrong. I was searching the answer in the Help tab in SPSS, but so far couldn't find an answer.

I am working on an urgent task, so any suggestion would be greatly appreciated.
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Automatic reply: How to deal with (compute?) "not applicable" scale item?

Choncek, Chris

I will be out of the office from Dec. 18th through January 1st. I will return to the office on Wednesday, January 2nd.

 

Should you need immediate assistance, you may contact Marcia Druga at [hidden email] between Dec. 18th and Dec. 21st.

 

Our entire office will be closed for the holidays from Dec. 24th through Jan. 1st.

 

Thank you and Happy Holidays!

 

Reply | Threaded
Open this post in threaded view
|

Re: How to deal with (compute?) "not applicable" scale item?

Melissa Ives
In reply to this post by tonishi@iupui.edu

I would set 6 as missing.  There shouldn’t be any answer if an item is not applicable.

Melissa

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Onishi, Tamaki
Sent: Monday, December 17, 2012 11:28 PM
To: [hidden email]
Subject: [SPSSX-L] How to deal with (compute?) "not applicable" scale item?

 

I was going to weight-average 18 scale items, and each item has 6 different answers: 

 

Not important – 1

Slightly important – 2

Moderately important – 3

Very important – 4

Extremely important – 5

Not applicable – 6

 

In SPSS, how should and could I deal with this "Not applicable" item? Since this item is assigned "6," if I average scale items, the organization that answered "not application" will get higher scores, which is wrong. I was searching the answer in the Help tab in SPSS, but so far couldn't find an answer. 

 

I am working on an urgent task, so any suggestion would be greatly appreciated. 

 



PRIVILEGED AND CONFIDENTIAL INFORMATION
This transmittal and any attachments may contain PRIVILEGED AND
CONFIDENTIAL information and is intended only for the use of the
addressee. If you are not the designated recipient, or an employee
or agent authorized to deliver such transmittals to the designated
recipient, you are hereby notified that any dissemination,
copying or publication of this transmittal is strictly prohibited. If
you have received this transmittal in error, please notify us
immediately by replying to the sender and delete this copy from your
system. You may also call us at (309) 827-6026 for assistance.
Reply | Threaded
Open this post in threaded view
|

Re: How to deal with (compute?) "not applicable" scale item?

Art Kendall
In reply to this post by tonishi@iupui.edu
what do you mean by weight- average?

are you getting a mean or a total score from the items?

simply assign 6 to be a missing value
assuming you want to have at least 14 items with valid values do something like this

missing values item01 to item 18 (6).
compute meanscore = mean.14(item01 to item18).

Art Kendall
Social Research Consultants
On 12/18/2012 12:28 AM, Onishi, Tamaki wrote:
I was going to weight-average 18 scale items, and each item has 6 different answers:

Not important – 1
Slightly important – 2
Moderately important – 3
Very important – 4
Extremely important – 5
Not applicable – 6

In SPSS, how should and could I deal with this "Not applicable" item? Since this item is assigned "6," if I average scale items, the organization that answered "not application" will get higher scores, which is wrong. I was searching the answer in the Help tab in SPSS, but so far couldn't find an answer.

I am working on an urgent task, so any suggestion would be greatly appreciated.


===================== 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
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: MIXED model for stepped wedge design

Maguin, Eugene
In reply to this post by Kylie

Kylie,

Call me spectator on this, certainly not a knowledgeable person. I looked at the Hussey et al. article and I have a couple of questions. Do you have clustered data? If you do, shouldn’t there be a Subject(<cluster_id variable>) subcommand? What group refer to?

 

Gene Maguin

 

 

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Kylie Lange
Sent: Monday, December 17, 2012 11:10 PM
To: [hidden email]
Subject: MIXED model for stepped wedge design

 

Hi all,

 

Does anyone have any experience with the stepped wedge design? It’s essentially a form of cluster-randomised crossover trial [1].

 

I wish to analyse a continuous outcome with a mixed effects model as described in [1]. It looks to be fairly straight forward but if anyone is familiar with this kind of model, I hoped you could take a look at my MIXED syntax and see if I have it correct. I have:

 

MIXED Outcome BY Group Time Treatment

  /FIXED=Time Treatment | SSTYPE(3)

  /METHOD=REML

  /RANDOM=Group | COVTYPE(ID).

 

I get a ‘Hessian matrix is not positive definite’ warning for the one outcome I’ve looked at so far (I’ve tried increasing the step-halvings and iterations), but I suspect that could be because of the small number of groups (4). Before I go exploring that further I hoped to just confirm that the model I’m starting with above is theoretically correct.

 

Thanks,

Kylie.

 

 

[1] Hussey MA & Hughes JP. Design and analysis of stepped wedge cluster randomized trials. Contemporary Clinical Trials (2007) 28: 182-191.

 

 

Reply | Threaded
Open this post in threaded view
|

Re: MIXED model for stepped wedge design

Ryan
In reply to this post by Kylie
Interesting, interesting...I haven't thought of cross-over designs in quite some time... Unfortunately, I do not have time to locate and read the cited article. But, let's get this party started anyway. :-)
 
Suppose you have a 2X2 cross-over design. You need to consider the following:
 
1. Sequence ("AB" or "BA")
2. Period ("1" and "2")
3. Treatment ("A" and "B")
 
Construct your dataset as follows:
 
ID seq prd trt y
1  AB   1  A  <#>
1  AB   2  B  <#>
2  BA   1  B  <#>
2  BA   2  A  <#>
.
.
After constructing your dataset as illustrated above, a good starting point would be:
 
MIXED y BY seq prd trt
/FIXED= seq prd trt | SSTYPE(3)
/METHOD=REML
/RANDOM=ID(seq).
 
NOTE: The code above is UNTESTED and written fast. Moreover, sometimes I mix up (no pun intended) the MIXED procedure in SAS with that of SPSS. If for some reason the code will not run, let me know and I'll investigate further. At any rate, if it does run, then it should allow you to test for between-subject variation (carry-over and between-subject residuals) and within-subjects variation (period, treatment, and between-subject residuals). I can't recall right now where I learned this from, but I'm sure you can find similar code all over the net and in stats books.
 
One final point and then I must go. Aside from subjects being nested in a sequence, is there additional nesting you need to incorporate?
 
Ryan
 
On Mon, Dec 17, 2012 at 11:09 PM, Kylie Lange <[hidden email]> wrote:
>
> Hi all,
>
>  
>
> Does anyone have any experience with the stepped wedge design? It’s essentially a form of cluster-randomised crossover trial [1].
>
>  
>
> I wish to analyse a continuous outcome with a mixed effects model as described in [1]. It looks to be fairly straight forward but if anyone is familiar with this kind of model, I hoped you could take a look at my MIXED syntax and see if I have it correct. I have:
>
>  
>
> MIXED Outcome BY Group Time Treatment
>
>   /FIXED=Time Treatment | SSTYPE(3)
>
>   /METHOD=REML
>
>   /RANDOM=Group | COVTYPE(ID).
>
>  
>
> I get a ‘Hessian matrix is not positive definite’ warning for the one outcome I’ve looked at so far (I’ve tried increasing the step-halvings and iterations), but I suspect that could be because of the small number of groups (4). Before I go exploring that further I hoped to just confirm that the model I’m starting with above is theoretically correct.
>
>  
>
> Thanks,
>
> Kylie.
>
>  
>
>  
>
> [1] Hussey MA & Hughes JP. Design and analysis of stepped wedge cluster randomized trials. Contemporary Clinical Trials (2007) 28: 182-191.
>
>  
>
>  
 
 
Reply | Threaded
Open this post in threaded view
|

Re: MIXED model for stepped wedge design

Alex Reutter
FWIW, there is a simple crossover example at: http://pic.dhe.ibm.com/infocenter/spssstat/v21r0m0/topic/com.ibm.spss.statistics.cs/mixed_groc_intro.htm.  It shows a few different ways to model the carryover effects.

Alex
Reply | Threaded
Open this post in threaded view
|

Re: MIXED model for stepped wedge design

Kylie
In reply to this post by Ryan

Thanks to Ryan and Gene for their thoughts.

 

Gene – Apologies, ‘Group’ refers to the cluster. Re the SUBJECT subcommand, I’m not sure. I had thought that including Group as a random effect would allow for a correlation between subjects from the same Group, but if I have something wrong I’m sure it is the RANDOM statement. I’ve tried adding SUBJECT(Group) clauses to the RANDOM statement but get identical results (a residual variance estimate is produced, but the Group estimate is deemed to be redundant, estimated value 0, and produces the Hessian matrix npd message).

 

Ryan –

A key feature of the stepped wedge design is that all clusters (‘Group’s in my syntax below) start under the control condition and crossover to treatment at different times. Once treatment is initiated, subjects/clusters stay on treatment for the remainder of the study. So, unlike a true crossover study there is no sequence factor or carry-over effects etc.

 

Re your suggested syntax, the RANDOM statement is not correctly defined but was your intent to include a random intercept with subjects clustered within groups (akin to Gene’s suggestion)? Ie, /RANDOM=intercept | SUBJECT(Group)? If so, I tried that but get the problem described above to Gene. I’m just not sure if that is because I have the model incorrectly defined or it is a specific symptom of my data (number of groups, low/no variation between groups etc).

 

If this has piqued anyone else’s interest I can provide the referenced paper off-list.

 

Thanks again,

Kylie.

 

 

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of R B
Sent: Wednesday, 19 December 2012 2:20 PM
To: [hidden email]
Subject: Re: MIXED model for stepped wedge design

 

Interesting, interesting...I haven't thought of cross-over designs in quite some time... Unfortunately, I do not have time to locate and read the cited article. But, let's get this party started anyway. :-)

 

Suppose you have a 2X2 cross-over design. You need to consider the following:

 

1. Sequence ("AB" or "BA")

2. Period ("1" and "2")

3. Treatment ("A" and "B")

 

Construct your dataset as follows:

 

ID seq prd trt y
1  AB   1  A  <#>
1  AB   2  B  <#>
2  BA   1  B  <#>
2  BA   2  A  <#>
.
.

After constructing your dataset as illustrated above, a good starting point would be:

 

MIXED y BY seq prd trt
/FIXED= seq prd trt | SSTYPE(3)
/METHOD=REML
/RANDOM=ID(seq).

 

NOTE: The code above is UNTESTED and written fast. Moreover, sometimes I mix up (no pun intended) the MIXED procedure in SAS with that of SPSS. If for some reason the code will not run, let me know and I'll investigate further. At any rate, if it does run, then it should allow you to test for between-subject variation (carry-over and between-subject residuals) and within-subjects variation (period, treatment, and between-subject residuals). I can't recall right now where I learned this from, but I'm sure you can find similar code all over the net and in stats books.

 

One final point and then I must go. Aside from subjects being nested in a sequence, is there additional nesting you need to incorporate?

 

Ryan

 

On Mon, Dec 17, 2012 at 11:09 PM, Kylie Lange <[hidden email]> wrote:

> 

> Hi all,

> 

>  

> 

> Does anyone have any experience with the stepped wedge design? It’s essentially a form of cluster-randomised crossover trial [1].

> 

>  

> 

> I wish to analyse a continuous outcome with a mixed effects model as described in [1]. It looks to be fairly straight forward but if anyone is familiar with this kind of model, I hoped you could take a look at my MIXED syntax and see if I have it correct. I have:

> 

>  

> 

> MIXED Outcome BY Group Time Treatment

> 

>   /FIXED=Time Treatment | SSTYPE(3)

> 

>   /METHOD=REML

> 

>   /RANDOM=Group | COVTYPE(ID).

> 

>  

> 

> I get a ‘Hessian matrix is not positive definite’ warning for the one outcome I’ve looked at so far (I’ve tried increasing the step-halvings and iterations), but I suspect that could be because of the small number of groups (4). Before I go exploring that further I hoped to just confirm that the model I’m starting with above is theoretically correct.

> 

>  

> 

> Thanks,

> 

> Kylie.

> 

>  

> 

>  

> 

> [1] Hussey MA & Hughes JP. Design and analysis of stepped wedge cluster randomized trials. Contemporary Clinical Trials (2007) 28: 182-191.

> 

>  

> 

>  

 

 

Reply | Threaded
Open this post in threaded view
|

Re: MIXED model for stepped wedge design

Ryan
The RANDOM statement I proposed was intended for the model I specified. It's possible that an "=" sign is necessary but I did NOT want to incorporate an explicit intercept as that is unnecessary with the random term provided. 

At any rate, your model is different than expected. No time to investigate further. Would be nice for you [with consultation, if necessary] to provide the solution.

Ryan

On Dec 18, 2012, at 11:17 PM, Kylie Lange <[hidden email]> wrote:

Thanks to Ryan and Gene for their thoughts.

 

Gene – Apologies, ‘Group’ refers to the cluster. Re the SUBJECT subcommand, I’m not sure. I had thought that including Group as a random effect would allow for a correlation between subjects from the same Group, but if I have something wrong I’m sure it is the RANDOM statement. I’ve tried adding SUBJECT(Group) clauses to the RANDOM statement but get identical results (a residual variance estimate is produced, but the Group estimate is deemed to be redundant, estimated value 0, and produces the Hessian matrix npd message).

 

Ryan –

A key feature of the stepped wedge design is that all clusters (‘Group’s in my syntax below) start under the control condition and crossover to treatment at different times. Once treatment is initiated, subjects/clusters stay on treatment for the remainder of the study. So, unlike a true crossover study there is no sequence factor or carry-over effects etc.

 

Re your suggested syntax, the RANDOM statement is not correctly defined but was your intent to include a random intercept with subjects clustered within groups (akin to Gene’s suggestion)? Ie, /RANDOM=intercept | SUBJECT(Group)? If so, I tried that but get the problem described above to Gene. I’m just not sure if that is because I have the model incorrectly defined or it is a specific symptom of my data (number of groups, low/no variation between groups etc).

 

If this has piqued anyone else’s interest I can provide the referenced paper off-list.

 

Thanks again,

Kylie.

 

 

 

From: SPSSX(r) Discussion [[hidden email]] On Behalf Of R B
Sent: Wednesday, 19 December 2012 2:20 PM
To: [hidden email]
Subject: Re: MIXED model for stepped wedge design

 

Interesting, interesting...I haven't thought of cross-over designs in quite some time... Unfortunately, I do not have time to locate and read the cited article. But, let's get this party started anyway. :-)

 

Suppose you have a 2X2 cross-over design. You need to consider the following:

 

1. Sequence ("AB" or "BA")

2. Period ("1" and "2")

3. Treatment ("A" and "B")

 

Construct your dataset as follows:

 

ID seq prd trt y
1  AB   1  A  <#>
1  AB   2  B  <#>
2  BA   1  B  <#>
2  BA   2  A  <#>
.
.

After constructing your dataset as illustrated above, a good starting point would be:

 

MIXED y BY seq prd trt
/FIXED= seq prd trt | SSTYPE(3)
/METHOD=REML
/RANDOM=ID(seq).

 

NOTE: The code above is UNTESTED and written fast. Moreover, sometimes I mix up (no pun intended) the MIXED procedure in SAS with that of SPSS. If for some reason the code will not run, let me know and I'll investigate further. At any rate, if it does run, then it should allow you to test for between-subject variation (carry-over and between-subject residuals) and within-subjects variation (period, treatment, and between-subject residuals). I can't recall right now where I learned this from, but I'm sure you can find similar code all over the net and in stats books.

 

One final point and then I must go. Aside from subjects being nested in a sequence, is there additional nesting you need to incorporate?

 

Ryan

 

On Mon, Dec 17, 2012 at 11:09 PM, Kylie Lange <[hidden email]> wrote:

> 

> Hi all,

> 

>  

> 

> Does anyone have any experience with the stepped wedge design? It’s essentially a form of cluster-randomised crossover trial [1].

> 

>  

> 

> I wish to analyse a continuous outcome with a mixed effects model as described in [1]. It looks to be fairly straight forward but if anyone is familiar with this kind of model, I hoped you could take a look at my MIXED syntax and see if I have it correct. I have:

> 

>  

> 

> MIXED Outcome BY Group Time Treatment

> 

>   /FIXED=Time Treatment | SSTYPE(3)

> 

>   /METHOD=REML

> 

>   /RANDOM=Group | COVTYPE(ID).

> 

>  

> 

> I get a ‘Hessian matrix is not positive definite’ warning for the one outcome I’ve looked at so far (I’ve tried increasing the step-halvings and iterations), but I suspect that could be because of the small number of groups (4). Before I go exploring that further I hoped to just confirm that the model I’m starting with above is theoretically correct.

> 

>  

> 

> Thanks,

> 

> Kylie.

> 

>  

> 

>  

> 

> [1] Hussey MA & Hughes JP. Design and analysis of stepped wedge cluster randomized trials. Contemporary Clinical Trials (2007) 28: 182-191.

> 

>  

> 

>  

 

 

Reply | Threaded
Open this post in threaded view
|

Re: MIXED model for stepped wedge design

Kylie

Sorry Ryan, I completely misread your RANDOM statement. When I saw ID I was immediately thinking of the identity covariance matrix structure. I only now realise that you meant a subject ID. If subject ID is also included in the BY variable list, then yes the syntax is correct. I’ve set that running – it’s been going for an hour or so now and still iterating away. Hopefully will have a result by morning.

 

For anyone who can comment - I know it is possible to express equivalent models with different RANDOM/REPEATED syntax, with different approaches being more numerically efficient. Is there an equivalent formulation of the model below that may be faster?

 

MIXED Outcome BY Group Time treat SubjectID

  /FIXED=Time treat | SSTYPE(3)

  /METHOD=REML

  /RANDOM=SubjectID(Group) | COVTYPE(VC).

 

Thanks,

Kylie.

 

 

From: [hidden email] [mailto:[hidden email]]
Sent: Wednesday, 19 December 2012 3:37 PM
To: Kylie Lange
Cc: [hidden email]
Subject: Re: MIXED model for stepped wedge design

 

The RANDOM statement I proposed was intended for the model I specified. It's possible that an "=" sign is necessary but I did NOT want to incorporate an explicit intercept as that is unnecessary with the random term provided. 

 

At any rate, your model is different than expected. No time to investigate further. Would be nice for you [with consultation, if necessary] to provide the solution.

 

Ryan


On Dec 18, 2012, at 11:17 PM, Kylie Lange <[hidden email]> wrote:

Thanks to Ryan and Gene for their thoughts.

 

Gene – Apologies, ‘Group’ refers to the cluster. Re the SUBJECT subcommand, I’m not sure. I had thought that including Group as a random effect would allow for a correlation between subjects from the same Group, but if I have something wrong I’m sure it is the RANDOM statement. I’ve tried adding SUBJECT(Group) clauses to the RANDOM statement but get identical results (a residual variance estimate is produced, but the Group estimate is deemed to be redundant, estimated value 0, and produces the Hessian matrix npd message).

 

Ryan –

A key feature of the stepped wedge design is that all clusters (‘Group’s in my syntax below) start under the control condition and crossover to treatment at different times. Once treatment is initiated, subjects/clusters stay on treatment for the remainder of the study. So, unlike a true crossover study there is no sequence factor or carry-over effects etc.

 

Re your suggested syntax, the RANDOM statement is not correctly defined but was your intent to include a random intercept with subjects clustered within groups (akin to Gene’s suggestion)? Ie, /RANDOM=intercept | SUBJECT(Group)? If so, I tried that but get the problem described above to Gene. I’m just not sure if that is because I have the model incorrectly defined or it is a specific symptom of my data (number of groups, low/no variation between groups etc).

 

If this has piqued anyone else’s interest I can provide the referenced paper off-list.

 

Thanks again,

Kylie.

 

 

 

From: SPSSX(r) Discussion [[hidden email]] On Behalf Of R B
Sent: Wednesday, 19 December 2012 2:20 PM
To: [hidden email]
Subject: Re: MIXED model for stepped wedge design

 

Interesting, interesting...I haven't thought of cross-over designs in quite some time... Unfortunately, I do not have time to locate and read the cited article. But, let's get this party started anyway. :-)

 

Suppose you have a 2X2 cross-over design. You need to consider the following:

 

1. Sequence ("AB" or "BA")

2. Period ("1" and "2")

3. Treatment ("A" and "B")

 

Construct your dataset as follows:

 

ID seq prd trt y
1  AB   1  A  <#>
1  AB   2  B  <#>
2  BA   1  B  <#>
2  BA   2  A  <#>
.
.

After constructing your dataset as illustrated above, a good starting point would be:

 

MIXED y BY seq prd trt
/FIXED= seq prd trt | SSTYPE(3)
/METHOD=REML
/RANDOM=ID(seq).

 

NOTE: The code above is UNTESTED and written fast. Moreover, sometimes I mix up (no pun intended) the MIXED procedure in SAS with that of SPSS. If for some reason the code will not run, let me know and I'll investigate further. At any rate, if it does run, then it should allow you to test for between-subject variation (carry-over and between-subject residuals) and within-subjects variation (period, treatment, and between-subject residuals). I can't recall right now where I learned this from, but I'm sure you can find similar code all over the net and in stats books.

 

One final point and then I must go. Aside from subjects being nested in a sequence, is there additional nesting you need to incorporate?

 

Ryan

 

On Mon, Dec 17, 2012 at 11:09 PM, Kylie Lange <[hidden email]> wrote:

> Hi all,

>  

> Does anyone have any experience with the stepped wedge design? It’s essentially a form of cluster-randomised crossover trial [1].

>  

> I wish to analyse a continuous outcome with a mixed effects model as described in [1]. It looks to be fairly straight forward but if anyone is familiar with this kind of model, I hoped you could take a look at my MIXED syntax and see if I have it correct. I have:

>  

> MIXED Outcome BY Group Time Treatment

>   /FIXED=Time Treatment | SSTYPE(3)

>   /METHOD=REML

>   /RANDOM=Group | COVTYPE(ID).

>  

> I get a ‘Hessian matrix is not positive definite’ warning for the one outcome I’ve looked at so far (I’ve tried increasing the step-halvings and iterations), but I suspect that could be because of the small number of groups (4). Before I go exploring that further I hoped to just confirm that the model I’m starting with above is theoretically correct.

>  

> Thanks,

> Kylie.

>  

>  

> [1] Hussey MA & Hughes JP. Design and analysis of stepped wedge cluster randomized trials. Contemporary Clinical Trials (2007) 28: 182-191.

>  

>  

 

 

Reply | Threaded
Open this post in threaded view
|

Re: MIXED model for stepped wedge design

Ryan
In reply to this post by Ryan
For the record...With respect to the typical cross-over design I proposed in my initial post, because the subject identification variable "ID" is not processed through "SUBJECT=", then it ["ID"] should be added as a categorical variable as follows:
 
MIXED y BY seq prd trt ID
/FIXED= seq prd trt | SSTYPE(3)
/METHOD=REML
/RANDOM=ID(seq).

Ryan
 
On Tue, Dec 18, 2012 at 10:50 PM, R B <[hidden email]> wrote:
Interesting, interesting...I haven't thought of cross-over designs in quite some time... Unfortunately, I do not have time to locate and read the cited article. But, let's get this party started anyway. :-)
 
Suppose you have a 2X2 cross-over design. You need to consider the following:
 
1. Sequence ("AB" or "BA")
2. Period ("1" and "2")
3. Treatment ("A" and "B")
 
Construct your dataset as follows:
 
ID seq prd trt y
1  AB   1  A  <#>
1  AB   2  B  <#>
2  BA   1  B  <#>
2  BA   2  A  <#>
.
.
After constructing your dataset as illustrated above, a good starting point would be:
 
MIXED y BY seq prd trt
/FIXED= seq prd trt | SSTYPE(3)
/METHOD=REML
/RANDOM=ID(seq).
 
NOTE: The code above is UNTESTED and written fast. Moreover, sometimes I mix up (no pun intended) the MIXED procedure in SAS with that of SPSS. If for some reason the code will not run, let me know and I'll investigate further. At any rate, if it does run, then it should allow you to test for between-subject variation (carry-over and between-subject residuals) and within-subjects variation (period, treatment, and between-subject residuals). I can't recall right now where I learned this from, but I'm sure you can find similar code all over the net and in stats books.
 
One final point and then I must go. Aside from subjects being nested in a sequence, is there additional nesting you need to incorporate?
 
Ryan
 
On Mon, Dec 17, 2012 at 11:09 PM, Kylie Lange <[hidden email]> wrote:
>
> Hi all,
>
>  
>
> Does anyone have any experience with the stepped wedge design? It’s essentially a form of cluster-randomised crossover trial [1].
>
>  
>
> I wish to analyse a continuous outcome with a mixed effects model as described in [1]. It looks to be fairly straight forward but if anyone is familiar with this kind of model, I hoped you could take a look at my MIXED syntax and see if I have it correct. I have:
>
>  
>
> MIXED Outcome BY Group Time Treatment
>
>   /FIXED=Time Treatment | SSTYPE(3)
>
>   /METHOD=REML
>
>   /RANDOM=Group | COVTYPE(ID).
>
>  
>
> I get a ‘Hessian matrix is not positive definite’ warning for the one outcome I’ve looked at so far (I’ve tried increasing the step-halvings and iterations), but I suspect that could be because of the small number of groups (4). Before I go exploring that further I hoped to just confirm that the model I’m starting with above is theoretically correct.
>
>  
>
> Thanks,
>
> Kylie.
>
>  
>
>  
>
> [1] Hussey MA & Hughes JP. Design and analysis of stepped wedge cluster randomized trials. Contemporary Clinical Trials (2007) 28: 182-191.
>
>  
>
>  
 
 

Reply | Threaded
Open this post in threaded view
|

Re: MIXED model for stepped wedge design

Bruce Weaver
Administrator
I think one reason there is so much confusion over analysis of cross-over designs is that there are at least two ways to conceive of the design.  Ryan has shown one way.  

Being an old experimental psych guy (as opposed to a clinical trials in medical research guy), I would conceive of this design as having two factors:  1) Treatment vs Control, and 2) Order.  The model would include main effects of both, and the Treatment x Order interaction.  If my main interest was in Treatment vs Control, I might hope that the Order and Treatment x Order terms are small and non-significant, and that I could base interpretation on the main effect of Treatment.  If the Treatment x Order interaction was large and significant, then I would have to fall back on Treatment vs Control contrasts within each Order group, and wave my hands about why Order is affecting the treatment effect.  (I find this approach much more straightforward than talking about "period" effects, etc.)

Re Kylie's comment that everyone starts in one condition and moves to the other at some point, that should be no problem in a person-time dataset (i.e., one row per time point, multiple rows per person).  There are (non-experimental) examples of that in Singer & Willett's book (Applied Longitudinal Analysis), where people's status on a binary variable (e.g., employed) can toggle back and forth from one record to the next.  None of those examples have everyone start in the same state, with all switching to the other state at varying times; but I can't see why that should cause any problems.  (Easy to say when you've not actually tried it though!)  

HTH.



R B wrote
For the record...With respect to the typical cross-over design I proposed
in my initial post, because the subject identification variable "ID" is not
processed through "SUBJECT=", then it ["ID"] should be added as a
categorical variable as follows:

MIXED y BY seq prd trt ID
/FIXED= seq prd trt | SSTYPE(3)
/METHOD=REML
/RANDOM=ID(seq).

Ryan

On Tue, Dec 18, 2012 at 10:50 PM, R B <[hidden email]> wrote:

> Interesting, interesting...I haven't thought of cross-over designs in
> quite some time... Unfortunately, I do not have time to locate and read the
> cited article. But, let's get this party started anyway. :-)
>
> Suppose you have a 2X2 cross-over design. You need to consider the
> following:
>
> 1. Sequence ("AB" or "BA")
> 2. Period ("1" and "2")
> 3. Treatment ("A" and "B")
>
> Construct your dataset as follows:
>
> ID seq prd trt y
> 1  AB   1  A  <#>
> 1  AB   2  B  <#>
> 2  BA   1  B  <#>
> 2  BA   2  A  <#>
> .
> .
> After constructing your dataset as illustrated above, a good starting
> point would be:
>
> MIXED y BY seq prd trt
> /FIXED= seq prd trt | SSTYPE(3)
> /METHOD=REML
> /RANDOM=ID(seq).
>
> NOTE: The code above is UNTESTED and written fast. Moreover, sometimes I
> mix up (no pun intended) the MIXED procedure in SAS with that of SPSS. If
> for some reason the code will not run, let me know and I'll investigate
> further. At any rate, if it does run, then it should allow you to test for
> between-subject variation (carry-over and between-subject residuals) and
> within-subjects variation (period, treatment, and between-subject
> residuals). I can't recall right now where I learned this from, but I'm
> sure you can find similar code all over the net and in stats books.
>
> One final point and then I must go. Aside from subjects being nested in a
> sequence, is there additional nesting you need to incorporate?
>
> Ryan
>
> On Mon, Dec 17, 2012 at 11:09 PM, Kylie Lange <[hidden email]>
> wrote:
> >
> > Hi all,
> >
> >
> >
> > Does anyone have any experience with the stepped wedge design? It’s
> essentially a form of cluster-randomised crossover trial [1].
> >
> >
> >
> > I wish to analyse a continuous outcome with a mixed effects model as
> described in [1]. It looks to be fairly straight forward but if anyone is
> familiar with this kind of model, I hoped you could take a look at my MIXED
> syntax and see if I have it correct. I have:
> >
> >
> >
> > MIXED Outcome BY Group Time Treatment
> >
> >   /FIXED=Time Treatment | SSTYPE(3)
> >
> >   /METHOD=REML
> >
> >   /RANDOM=Group | COVTYPE(ID).
> >
> >
> >
> > I get a ‘Hessian matrix is not positive definite’ warning for the one
> outcome I’ve looked at so far (I’ve tried increasing the step-halvings and
> iterations), but I suspect that could be because of the small number of
> groups (4). Before I go exploring that further I hoped to just confirm that
> the model I’m starting with above is theoretically correct.
> >
> >
> >
> > Thanks,
> >
> > Kylie.
> >
> >
> >
> >
> >
> > [1] Hussey MA & Hughes JP. Design and analysis of stepped wedge cluster
> randomized trials. Contemporary Clinical Trials (2007) 28: 182-191.
> >
> >
> >
> >
>
>
>
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).
Reply | Threaded
Open this post in threaded view
|

Re: MIXED model for stepped wedge design

Ryan
Where's the confusion? :-)

On Dec 19, 2012, at 5:12 PM, Bruce Weaver <[hidden email]> wrote:

> I think one reason there is so much confusion over analysis of cross-over
> designs is that there are at least two ways to conceive of the design.  Ryan
> has shown one way.
>
> Being an old experimental psych guy (as opposed to a clinical trials in
> medical research guy), I would conceive of this design as having two
> factors:  1) Treatment vs Control, and 2) Order.  The model would include
> main effects of both, and the Treatment x Order interaction.  If my main
> interest was in Treatment vs Control, I might hope that the Order and
> Treatment x Order terms are small and non-significant, and that I could base
> interpretation on the main effect of Treatment.  If the Treatment x Order
> interaction was large and significant, then I would have to fall back on
> Treatment vs Control contrasts within each Order group, and wave my hands
> about why Order is affecting the treatment effect.  (I find this approach
> much more straightforward than talking about "period" effects, etc.)
>
> Re Kylie's comment that everyone starts in one condition and moves to the
> other at some point, that /should/ be no problem in a person-time dataset
> (i.e., one row per time point, multiple rows per person).  There are
> (non-experimental) examples of that in Singer & Willett's book (Applied
> Longitudinal Analysis), where people's status on a binary variable (e.g.,
> employed) can toggle back and forth from one record to the next.  None of
> those examples have everyone start in the same state, with all switching to
> the other state at varying times; but I can't see why that should cause any
> problems.  (Easy to say when you've not actually tried it though!)
>
> HTH.
>
>
>
>
> R B wrote
>> For the record...With respect to the typical cross-over design I proposed
>> in my initial post, because the subject identification variable "ID" is
>> not
>> processed through "SUBJECT=", then it ["ID"] should be added as a
>> categorical variable as follows:
>>
>> MIXED y BY seq prd trt ID
>> /FIXED= seq prd trt | SSTYPE(3)
>> /METHOD=REML
>> /RANDOM=ID(seq).
>>
>> Ryan
>>
>> On Tue, Dec 18, 2012 at 10:50 PM, R B &lt;
>
>> ryan.andrew.black@
>
>> &gt; wrote:
>>
>>> Interesting, interesting...I haven't thought of cross-over designs in
>>> quite some time... Unfortunately, I do not have time to locate and read
>>> the
>>> cited article. But, let's get this party started anyway. :-)
>>>
>>> Suppose you have a 2X2 cross-over design. You need to consider the
>>> following:
>>>
>>> 1. Sequence ("AB" or "BA")
>>> 2. Period ("1" and "2")
>>> 3. Treatment ("A" and "B")
>>>
>>> Construct your dataset as follows:
>>>
>>> ID seq prd trt y
>>> 1  AB   1  A  <#>
>>> 1  AB   2  B  <#>
>>> 2  BA   1  B  <#>
>>> 2  BA   2  A  <#>
>>> .
>>> .
>>> After constructing your dataset as illustrated above, a good starting
>>> point would be:
>>>
>>> MIXED y BY seq prd trt
>>> /FIXED= seq prd trt | SSTYPE(3)
>>> /METHOD=REML
>>> /RANDOM=ID(seq).
>>>
>>> NOTE: The code above is UNTESTED and written fast. Moreover, sometimes I
>>> mix up (no pun intended) the MIXED procedure in SAS with that of SPSS. If
>>> for some reason the code will not run, let me know and I'll investigate
>>> further. At any rate, if it does run, then it should allow you to test
>>> for
>>> between-subject variation (carry-over and between-subject residuals) and
>>> within-subjects variation (period, treatment, and between-subject
>>> residuals). I can't recall right now where I learned this from, but I'm
>>> sure you can find similar code all over the net and in stats books.
>>>
>>> One final point and then I must go. Aside from subjects being nested in a
>>> sequence, is there additional nesting you need to incorporate?
>>>
>>> Ryan
>>>
>>> On Mon, Dec 17, 2012 at 11:09 PM, Kylie Lange &lt;
>
>> kylie.lange@.edu
>
>> &gt;
>>> wrote:
>>>>
>>>> Hi all,
>>>>
>>>>
>>>>
>>>> Does anyone have any experience with the stepped wedge design? It’s
>>> essentially a form of cluster-randomised crossover trial [1].
>>>>
>>>>
>>>>
>>>> I wish to analyse a continuous outcome with a mixed effects model as
>>> described in [1]. It looks to be fairly straight forward but if anyone is
>>> familiar with this kind of model, I hoped you could take a look at my
>>> MIXED
>>> syntax and see if I have it correct. I have:
>>>>
>>>>
>>>>
>>>> MIXED Outcome BY Group Time Treatment
>>>>
>>>>  /FIXED=Time Treatment | SSTYPE(3)
>>>>
>>>>  /METHOD=REML
>>>>
>>>>  /RANDOM=Group | COVTYPE(ID).
>>>>
>>>>
>>>>
>>>> I get a ‘Hessian matrix is not positive definite’ warning for the one
>>> outcome I’ve looked at so far (I’ve tried increasing the step-halvings
>>> and
>>> iterations), but I suspect that could be because of the small number of
>>> groups (4). Before I go exploring that further I hoped to just confirm
>>> that
>>> the model I’m starting with above is theoretically correct.
>>>>
>>>>
>>>>
>>>> Thanks,
>>>>
>>>> Kylie.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> [1] Hussey MA & Hughes JP. Design and analysis of stepped wedge cluster
>>> randomized trials. Contemporary Clinical Trials (2007) 28: 182-191.
>
>
>
>
>
> -----
> --
> 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.
>
> --
> View this message in context: http://spssx-discussion.1045642.n5.nabble.com/MIXED-model-for-stepped-wedge-design-tp5716998p5717056.html
> Sent from the SPSSX Discussion mailing list archive at 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