Hi All,
I'm trying simply to run some post-hoc tests using the test subcommand in SPSS to determine how my groups (controls vs patients) differ in their acoustic startle reflexes (ASR) according to picture type (neutral vs unpleasant). I ran a repeated measure mixed model analysis (AR1 covariance), with Trial as the repeated measure (6 levels) and the fixed effects specified as group (2 levels; controls vs patients) and picture type (2 levels; pleasant vs unpleasant). My dependent variable is ASR amplitude. My results showed a significant interaction for group X picture type. I want to test these but I'm having problems creating these contrasts. Can anyone help me build this simple contrasts? A little embarrassed I can't get this figured out, have been at it for almost 2 days... |
Administrator
|
If I follow, it might be easier to get what you want via EMMEANS than via TEST. Here's an example from the FM:
MIXED Y BY A B WITH X /FIXED A B X /EMMEANS TABLES(A*B) WITH(X=0.23) COMPARE(A) ADJ(SIDAK) /EMMEANS TABLES(A*B) WITH(X=MEAN) COMPARE(A) REFCAT(LAST) ADJ(LSD). * In the example, the first EMMEANS subcommand will compute estimated marginal means for all level combinations of A*B by fixing the covariate X at 0.23. Then for each level of B,all pairwise comparisons on A will be performed using SIDAK adjustment. * In the second EMMEANS subcommand, the estimated marginal means will be computed by fixing the covariate X at its mean. Since REFCAT(LAST) is specified, comparison will be made to the last category of factor A using LSD adjustment.
--
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/). |
I will be out of office until Tuesday, January 28, 2012, with limited access to email. I will respond to your email when I return. |
In reply to this post by Bruce Weaver
Bruce: Did you intend to include an interaction term in the /Fixed sub-command?
Ryan On Jan 23, 2013, at 3:45 PM, Bruce Weaver <[hidden email]> wrote: > If I follow, it might be easier to get what you want via EMMEANS than via > TEST. Here's an example from the FM: > > MIXED Y BY A B WITH X > /FIXED A B X > /EMMEANS TABLES(A*B) WITH(X=0.23) COMPARE(A) ADJ(SIDAK) > /EMMEANS TABLES(A*B) WITH(X=MEAN) COMPARE(A) REFCAT(LAST) ADJ(LSD). > > * In the example, the first EMMEANS subcommand will compute estimated > marginal means for > all level combinations of A*B by fixing the covariate X at 0.23. Then for > each level of B,all > pairwise comparisons on A will be performed using SIDAK adjustment. > > * In the second EMMEANS subcommand, the estimated marginal means will be > computed by > fixing the covariate X at its mean. Since REFCAT(LAST) is specified, > comparison will be > made to the last category of factor A using LSD adjustment. > > > > chubcal wrote >> Hi All, >> I'm trying simply to run some post-hoc tests using the test subcommand in >> SPSS to determine how my groups (controls vs patients) differ in their >> acoustic startle reflexes (ASR) according to picture type (neutral vs >> unpleasant). I ran a repeated measure mixed model analysis (AR1 >> covariance), with Trial as the repeated measure (6 levels) and the fixed >> effects specified as group (2 levels; controls vs patients) and picture >> type (2 levels; pleasant vs unpleasant). My dependent variable is ASR >> amplitude. My results showed a significant interaction for group X picture >> type. I want to test these but I'm having problems creating these >> contrasts. Can anyone help me build this simple contrasts? A little >> embarrassed I can't get this figured out, have been at it for almost 2 >> days... > > > > > > ----- > -- > 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/TEST-subcommand-and-repeated-mixed-models-please-help-tp5717615p5717618.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 |
In reply to this post by chubcal
Catherine, You mistakenly emailed me only. To SPSS-L: Please see Catherine's response below my response. This is why it's so important to post code when asking a question initially to the list. I'm not surprised at all to see interactions. Bruce's example did not include interactions--I await to hear his response as to why he did not include at least one interaction term given that he has a EMMEANS based on an interaction term. At any rate, I don't have time to respond right now. Maybe later. Or maybe Bruce would be willing to help you through this issue.
Also, if you search the archives, you should see an example or two where I provide estimates/contrasts using the TEST sub-command including three-way interactions. Ryan
On Thu, Jan 24, 2013 at 9:30 AM, <[hidden email]> wrote: Hi. Thanks Bruce & Ryan for the replies. I'm a little confused. Although |
In reply to this post by chubcal
Thanks Ryan for the info. I did see your previous posts using the TEST
subcommand for a 3-way interaction, this made sense to me but when I tried to tweak the contrast to fit my situation, I came up short. I received an error saying the L matrix could not be estimated. I think the contrast I created was incorrect. I'm a newbie when it comes to creating these contrasts, but your previous posts were very helpful, so thanks again! ===================== 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 |
Administrator
|
In reply to this post by Ryan
Hi Ryan. I didn't pay much attention to the nature of the model. My only intention in posting that example (copied straight from the FM) was to point out the COMPARE option on the /EMMEANS sub-command as a straightforward method for making pair-wise comparisons. ;-)
Cheers! Bruce
--
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/). |
In reply to this post by chubcal
Catherine,
If your 3-way interaction is not significant, then you might consider removing it from the model, due to the usual objective in science to develop the most parsimonious model that best explains the phenomenon. Moreover, inclusion of higher-order terms affects interpretation of the lower-order terms. (If you feel strongly about keeping a non-sig 3-way interaction, please provide your rationale) After removing the 3-way interaction, you should be left with a fixed intercept, three main effects and three two-way interactions. At this point, you can either use the EMMEANS sub-command or the famous (or infamous) TEST sub-command to answer your research question. I'm always in favor of the TEST sub-command because it requires that you understand the coefficient matrix, usually denoted as L. Yes, at first you will end up with non-estimable functions, but over time, this will become much less likely to occur. If you agree about removing the 3-way interaction term, rerun the analysis without it and try to write the TEST statement of interest. If you continue to receive the dreaded non-estimable function message, then write back with the code, including the TEST statement and I'll help you fix it. Ryan On Jan 24, 2013, at 1:09 PM, [hidden email] wrote: > Thanks Ryan for the info. I did see your previous posts using the TEST > subcommand for a 3-way interaction, this made sense to me but when I tried > to tweak the contrast to fit my situation, I came up short. I received an > error saying the L matrix could not be estimated. I think the contrast I > created was incorrect. I'm a newbie when it comes to creating these > contrasts, but your previous posts were very helpful, so thanks again! ===================== 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 |
Ryan,
I removed the 3 way interaction term from my model, and reran the analysis. Now my Diagnosis*Condition interaction is no longer significant (now p = 0.051, before p = 0.042). I haven't run the test command yet, trying first to understand what this means and whether I should keep the 3-way interaction term in the model or not. Any advice? Thanks again. MIXED LOG_ooEMGstartleAmp_microvolts BY Diagnosis Condition Trial /CRITERIA=CIN(95) MXITER(100) MXSTEP(10) SCORING(1) SINGULAR(0.000000000001) HCONVERGE(0, ABSOLUTE) LCONVERGE(0, ABSOLUTE) PCONVERGE(0.000001, ABSOLUTE) /FIXED=Diagnosis Condition Trial Diagnosis*Condition Diagnosis*Trial Condition*Trial | SSTYPE(3) /METHOD=REML /PRINT=DESCRIPTIVES R SOLUTION TESTCOV /REPEATED=Trial | SUBJECT(id) COVTYPE(AR1) /EMMEANS=TABLES(OVERALL) /EMMEANS=TABLES(Diagnosis) COMPARE ADJ(BONFERRONI) /EMMEANS=TABLES(Condition) COMPARE ADJ(BONFERRONI) /EMMEANS=TABLES(Trial) COMPARE ADJ(BONFERRONI) /EMMEANS=TABLES(Diagnosis*Condition) /EMMEANS=TABLES(Diagnosis*Trial) /EMMEANS=TABLES(Condition*Trial) . |
Administrator
|
If you want to see the simple main effects for your product terms, you need to use COMPARE on the EMMEANS lines with product terms too. Something like this:
/EMMEANS=TABLES(Diagnosis*Condition) compare(Condition) adj(LSD) /EMMEANS=TABLES(Diagnosis*Trial) compare(Diagnosis) adj(LSD) /EMMEANS=TABLES(Condition*Trial) compare(Condition) adj(LSD) Re the interaction with p = .051, I would keep it in the model--especially if I had a priori reasons to think there might be an interaction. (This makes me wonder what the p-value was for the 3-way interaction you removed.) HTH.
--
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/). |
Yes, either the three way accounted fro enough variance to increaase the power sufficiently or there may be some suppression going on.
Paul R. Swank, Ph.D., Professor Health Promotions and Behavioral Sciences School of Public Health University of Texas Health Science Center Houston ________________________________________ From: SPSSX(r) Discussion [[hidden email]] On Behalf Of Bruce Weaver [[hidden email]] Sent: Sunday, January 27, 2013 2:43 PM To: [hidden email] Subject: Re: TEST subcommand and repeated mixed models-please help!! If you want to see the simple main effects for your product terms, you need to use COMPARE on the EMMEANS lines with product terms too. Something like this: /EMMEANS=TABLES(Diagnosis*Condition) compare(Condition) adj(LSD) /EMMEANS=TABLES(Diagnosis*Trial) compare(Diagnosis) adj(LSD) /EMMEANS=TABLES(Condition*Trial) compare(Condition) adj(LSD) Re the interaction with p = .051, I would keep it in the model--especially if I had a priori reasons to think there might be an interaction. (This makes me wonder what the p-value was for the 3-way interaction you removed.) HTH. chubcal wrote > Ryan, > I removed the 3 way interaction term from my model, and reran the > analysis. Now my Diagnosis*Condition interaction is no longer significant > (now p = 0.051, before p = 0.042). I haven't run the test command yet, > trying first to understand what this means and whether I should keep the > 3-way interaction term in the model or not. Any advice? Thanks again. > > MIXED LOG_ooEMGstartleAmp_microvolts BY Diagnosis Condition Trial > /CRITERIA=CIN(95) MXITER(100) MXSTEP(10) SCORING(1) > SINGULAR(0.000000000001) HCONVERGE(0, ABSOLUTE) LCONVERGE(0, ABSOLUTE) > PCONVERGE(0.000001, ABSOLUTE) > /FIXED=Diagnosis Condition Trial Diagnosis*Condition Diagnosis*Trial > Condition*Trial | SSTYPE(3) > /METHOD=REML > /PRINT=DESCRIPTIVES R SOLUTION TESTCOV > /REPEATED=Trial | SUBJECT(id) COVTYPE(AR1) > /EMMEANS=TABLES(OVERALL) > /EMMEANS=TABLES(Diagnosis) COMPARE ADJ(BONFERRONI) > /EMMEANS=TABLES(Condition) COMPARE ADJ(BONFERRONI) > /EMMEANS=TABLES(Trial) COMPARE ADJ(BONFERRONI) > /EMMEANS=TABLES(Diagnosis*Condition) > /EMMEANS=TABLES(Diagnosis*Trial) > /EMMEANS=TABLES(Condition*Trial) . ----- -- 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/TEST-subcommand-and-repeated-mixed-models-please-help-tp5717615p5717742.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 |
In reply to this post by chubcal
Catherine,
The 2-way interaction term (e.g., AB) in the presence of the 3-way interaction term speaks to the interactive (some call moderating) effect when the IV not included in that interaction term (e.g., C) is equal to zero, assuming you simply entered the variables in their original form. Whether or not you include the 3-way interaction term should have little to do with whether you find significance at alpha=.05 of a lower order term with or without it. Did you expect a 3-way interaction? Was it significant or near significance? If yes, then you might consider adding it back in. However, if you add it back in and you want to assess the 2-way interaction effect averaged over the IV excluded from the interaction (which might be what you are after) then you will need to do more instead of simply entering in the IVs and interpreting the coefficients in the parameter estimates Table. Ryan Sent from my iPhone On Jan 27, 2013, at 12:02 PM, chubcal <[hidden email]> wrote: > Ryan, > I removed the 3 way interaction term from my model, and reran the analysis. > Now my Diagnosis*Condition interaction is no longer significant (now p = > 0.051, before p = 0.042). I haven't run the test command yet, trying first > to understand what this means and whether I should keep the 3-way > interaction term in the model or not. Any advice? Thanks again. > > MIXED LOG_ooEMGstartleAmp_microvolts BY Diagnosis Condition Trial > /CRITERIA=CIN(95) MXITER(100) MXSTEP(10) SCORING(1) > SINGULAR(0.000000000001) HCONVERGE(0, ABSOLUTE) LCONVERGE(0, ABSOLUTE) > PCONVERGE(0.000001, ABSOLUTE) > /FIXED=Diagnosis Condition Trial Diagnosis*Condition Diagnosis*Trial > Condition*Trial | SSTYPE(3) > /METHOD=REML > /PRINT=DESCRIPTIVES R SOLUTION TESTCOV > /REPEATED=Trial | SUBJECT(id) COVTYPE(AR1) > /EMMEANS=TABLES(OVERALL) > /EMMEANS=TABLES(Diagnosis) COMPARE ADJ(BONFERRONI) > /EMMEANS=TABLES(Condition) COMPARE ADJ(BONFERRONI) > /EMMEANS=TABLES(Trial) COMPARE ADJ(BONFERRONI) > /EMMEANS=TABLES(Diagnosis*Condition) > /EMMEANS=TABLES(Diagnosis*Trial) > /EMMEANS=TABLES(Condition*Trial) . > > > > -- > View this message in context: http://spssx-discussion.1045642.n5.nabble.com/TEST-subcommand-and-repeated-mixed-models-please-help-tp5717615p5717741.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 |
Thanks to all for your replies. I did expect a 3-way interaction, however, it was not significant (not even close, Diagnosis*Condition*Trial, F = .037, p = 0.949). I think I will be keeping it in the model, unless the consensus is to remove it. I'm trying to figure out how to run the TSET subcommand on my Diagnosis*Condition and other interactions, to determine where my differences are. My Diagnosis (Patients vs controls) and Condition (neutral vs. unpleasant pictures) factors both have 2 levels. My Trial factor has 5 levels. Any examples you could provide for the first line of the test subcommand? I have run almost every permutation I can think of, but keep getting errors 'custom hypothesis test not performed because L matrix not estimable'. I have looked over all the examples on the web and in the forum, but can't seem to figure this out. I simply need to perform a set of contrasts, but most interested in whether patients differ from controls in the DV for the condition wherein unpleasant pictures were shown vs neutral picture. I have included my sad attempt of the test subcommand for this contrast below.
MIXED LOG_ooEMGstartleAMP_microvolts BY Diagnosis Condition Trial /FIXED = Diagnosis Condition Diagnosis*Condition Diagnosis*Trial Condition*Trial Diagnosis*Condition*Trial | SSTYPE (3) /METHOD = REML /REPEATED = Trial | Subject (id) covtype (AR1) /TEST = 'Patients vs Controls for unpleasant condition' Diagnosis*Condition 1 0 -1 0. |
If you have random assignment, then leaving the three way in should not cause any problems.
Paul R. Swank, Ph.D., Professor Health Promotions and Behavioral Sciences School of Public Health University of Texas Health Science Center Houston ________________________________________ From: SPSSX(r) Discussion [[hidden email]] On Behalf Of chubcal [[hidden email]] Sent: Monday, January 28, 2013 12:18 PM To: [hidden email] Subject: Re: TEST subcommand and repeated mixed models-please help!! Thanks to all for your replies. I did expect a 3-way interaction, however, it was not significant (not even close, Diagnosis*Condition*Trial, F = .037, p = 0.949). I think I will be keeping it in the model, unless the consensus is to remove it. I'm trying to figure out how to run the TSET subcommand on my Diagnosis*Condition and other interactions, to determine where my differences are. My Diagnosis (Patients vs controls) and Condition (neutral vs. unpleasant pictures) factors both have 2 levels. My Trial factor has 5 levels. Any examples you could provide for the first line of the test subcommand? I have run almost every permutation I can think of, but keep getting errors 'custom hypothesis test not performed because L matrix not estimable'. I have looked over all the examples on the web and in the forum, but can't seem to figure this out. I simply need to perform a set of contrasts, but most interested in whether patients differ from controls in the DV for the condition wherein unpleasant pictures were shown vs neutral picture. I have included my sad attempt of the test subcommand for this contrast below. MIXED LOG_ooEMGstartleAMP_microvolts BY Diagnosis Condition Trial /FIXED = Diagnosis Condition Diagnosis*Condition Diagnosis*Trial Condition*Trial Diagnosis*Condition*Trial | SSTYPE (3) /METHOD = REML /REPEATED = Trial | Subject (id) covtype (AR1) /TEST = 'Patients vs Controls for unpleasant condition' Diagnosis*Condition 1 0 -1 0. -- View this message in context: http://spssx-discussion.1045642.n5.nabble.com/TEST-subcommand-and-repeated-mixed-models-please-help-tp5717615p5717766.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 |
In reply to this post by chubcal
Catherine, I see no rationale in including a three-way interaction term that is contributing nada to the model and is just 'eating up' df. At any rate, your question is around constructing estimable functions using the TEST statement in the presence of a 3-way interaction. In general, I recommend starting by estimating cell means. Let's assume you have the following three factors:
Factor A: 2 levels (a1, a2) Factor B: 2 levels (b1, b2) Factor C: 5 levels (c1, c2, c3, c4, c5) To make life simple, let's treat Factor B (assumed to be coded 0/1, where 0=b1 and 1=b2) as continuous and estimate a few cell means using the TEST sub-command.
MIXED y BY A C WITH B /FIXED = A B C A*B A*C B*C A*B*C | SSTYPE (3) /METHOD = REML /TEST = 'mean|a1,b1,c1' intercept 1 A 1 0 B 0 C 1 0 0 0 0 A*B 0 0 A*C 1 0 0 0 0 0 0 0 0 0 A*B*C 0 0 0 0 0 0 0 0 0 0
/TEST = 'mean|a2,b1,c1' intercept 1 A 0 1 B 0 C 1 0 0 0 0 A*B 0 0 A*C 0 0 0 0 0 1 0 0 0 0 A*B*C 0 0 0 0 0 0 0 0 0 0 /TEST = 'mean|a1,b2,c1' intercept 1 A 1 0 B 1 C 1 0 0 0 0 A*B 1 0 A*C 1 0 0 0 0 0 0 0 0 0 A*B*C 1 0 0 0 0 0 0 0 0 0
/TEST = 'mean|a2,b2,c1' intercept 1 A 0 1 B 1 C 1 0 0 0 0 A*B 0 1 A*C 0 0 0 0 0 1 0 0 0 0 A*B*C 0 0 0 0 0 1 0 0 0 0. Suppose you wanted to construct the contrast: mean|a1,b1,c1 MINUS mean|a2,b1,c1. Subtract the corresponding coefficients of the same effects as follows: /TEST = 'mean diff' intercept 0 A 1 -1 B 0 C 0 0 0 0 0 A*B 0 0 A*C 1 0 0 0 0 -1 0 0 0 0 A*B*C 0 0 0 0 0 0 0 0 0 0 Note that the effects in this SPECIFIC contrast which include AT LEAST ONE IV which is fixed at a specific value across cell means result in all coefficients equal to zero. (In this case, IVs B and C have been held constant.) This, of course makes sense, and indicates that there is really no need to include them. That is, we could simplify the contrast by eliminating effects that have all zero coefficients as follows:
/TEST = 'mean diff' A 1 -1 A*C 1 0 0 0 0 -1 0 0 0 0 Both TEST statements above will yield the same contrast. We could work our way up to construct all sorts of contrasts that reveal the two-way and three-way interaction effects (for those that exist). But, before you get there, you must understand the fundamentals of manipulating the coefficient matrix L AND you must understand what the interactions mean. Take note that I used the word matrix. Linear algebra is a prerequisite.
Sorry, but this is all I can offer right now. It's the beginning of a new semester and busy doesn't begin to describe my life as I'm sure is true for many on this list. HTH
Ryan p.s. Since the code above is untested, it's always possible that I've made an error. Having said that, I double checked my work and therefore would state that it is highly unlikely there is an error, but I am human. :-)
On Mon, Jan 28, 2013 at 1:18 PM, chubcal <[hidden email]> wrote: Thanks to all for your replies. I did expect a 3-way interaction, however, it |
Apologies. My fingers slipped before correcting a silly statement I made--> I made a statement about eliminating terms which was slightly incorrect. I've simplified the point I was making to make it accurate. Simply read this post instead of the previous one...
Catherine, I see no rationale in including a three-way interaction term that is contributing nada to the model and is just 'eating up' df. At any rate, your question is around constructing estimable functions using the TEST statement in the presence of a 3-way interaction. In general, I recommend starting by estimating cell means. Let's assume you have the following three factors:
Factor A: 2 levels (a1, a2) Factor B: 2 levels (b1, b2) Factor C: 5 levels (c1, c2, c3, c4, c5) To make life simple, let's treat Factor B (assumed to be coded 0/1, where 0=b1 and 1=b2) as continuous and estimate a few cell means using the TEST sub-command.
MIXED y BY A C WITH B /FIXED = A B C A*B A*C B*C A*B*C | SSTYPE (3) /METHOD = REML /TEST = 'mean|a1,b1,c1' intercept 1 A 1 0 B 0 C 1 0 0 0 0 A*B 0 0 A*C 1 0 0 0 0 0 0 0 0 0 A*B*C 0 0 0 0 0 0 0 0 0 0
/TEST = 'mean|a2,b1,c1' intercept 1 A 0 1 B 0 C 1 0 0 0 0 A*B 0 0 A*C 0 0 0 0 0 1 0 0 0 0 A*B*C 0 0 0 0 0 0 0 0 0 0 /TEST = 'mean|a1,b2,c1' intercept 1 A 1 0 B 1 C 1 0 0 0 0 A*B 1 0 A*C 1 0 0 0 0 0 0 0 0 0 A*B*C 1 0 0 0 0 0 0 0 0 0
/TEST = 'mean|a2,b2,c1' intercept 1 A 0 1 B 1 C 1 0 0 0 0 A*B 0 1 A*C 0 0 0 0 0 1 0 0 0 0 A*B*C 0 0 0 0 0 1 0 0 0 0. Suppose you wanted to construct the contrast: mean|a1,b1,c1 MINUS mean|a2,b1,c1. Subtract the corresponding coefficients of the same effects as follows: /TEST = 'mean diff' intercept 0 A 1 -1 B 0 C 0 0 0 0 0 A*B 0 0 A*C 1 0 0 0 0 -1 0 0 0 0 A*B*C 0 0 0 0 0 0 0 0 0 0 We could simplify the contrast by eliminating effects that have all zero coefficients as follows:
/TEST = 'mean diff' A 1 -1 A*C 1 0 0 0 0 -1 0 0 0 0 Both TEST statements above will yield the same contrast. We could work our way up to construct all sorts of contrasts that reveal the two-way and three-way interaction effects (for those that exist). But, before you get there, you must understand the fundamentals of manipulating the coefficient matrix L AND you must understand what the interactions mean. Take note that I used the word matrix. Linear algebra is a prerequisite.
Sorry, but this is all I can offer right now. It's the beginning of a new semester and busy doesn't begin to describe my life as I'm sure is true for many on this list. HTH
Ryan p.s. Since the code above is untested, it's always possible that I've made an error. Having said that, I double checked my work and therefore would state that it is highly unlikely there is an error, but I am human. :-) On Mon, Jan 28, 2013 at 11:16 PM, R B <[hidden email]> wrote:
|
Free forum by Nabble | Edit this page |