Login  Register

Re: Three-Way Anova Post Hoc Comparisons

Posted by Ryan on Jan 23, 2011; 3:37pm
URL: http://spssx-discussion.165.s1.nabble.com/Three-Way-Anova-Post-Hoc-Comparisons-tp3336188p3353718.html

I'm just getting around to this thread. One approach would be to
invoke the TEST subcommands in the MIXED procedure. I provide a couple
of examples of contrasts. (Note that I start by generating data)

Ryan
--

*Generate data.
set seed 4836235.

new file.
inp pro.

   comp personID = -99.
   comp gender = -99.
   comp condition = -99.
   comp error = -99.
   comp country1 = -99.
   comp country2 = -99.
   comp residual_variance = 0.05.

leave personID to residual_variance.

      loop personID = 1 to 12000.

      comp gender = rv.bernoulli(0.50).
      comp condition = rv.bernoulli(0.50).

      if (personID <= 4000) country1 = 1.
      if (personID > 4000) country1 = 0.

      if (personID <= 4000) country2 = 0.
      if (personID > 4000 and personID <= 8000) country2 = 1.
      if (personID > 8000) country2 = 0.

      comp error = sqrt(residual_variance)*rv.normal(0,1).

      comp y = 4.0 + 1.0*condition
                          + 1.5*country1
                          + 2.0*country2
                          + 2.5*gender
                          + 3.0*condition*country1
                          + 3.5*condition*country2
                          + 4.0*condition*gender
                          + 4.5*country1*gender
                          + 5.0*country2*gender
                          + 5.5*condition*country1*gender
                          + 6.0*condition*country2*gender
                          + error.

      end case.
    end loop.
end file.
end inp pro.
exe.

*Construct country indicator variable.
if (country1=1) country=1.
if (country2=1) country=2.
if (country1 = 0 and country2 = 0) country = 3.
exe.

*delete irrelevant variables created in simulation.
delete variables error residual_variance country1 country2.

mixed y by condition country with gender
  /fixed=condition country gender
            condition*country
            condition*gender
            country*gender
            condition*country*gender | sstype(3)
  /print=solution lmatrix
   /test 'cond1 vs cond2|cntry=1,gender=1 VS cond1 vs cond2|cntry=2,gender=1'
          condition*country 1 -1 0 -1  1 0
          condition*country*gender  1 -1 0 -1 1 0
  /test 'cond1 vs cond2|cntry=1,gender=0 VS cond1 vs cond2|cntry=2,gender=0'
          condition*country 1 -1 0 -1  1 0
          condition*country*gender  0 0 0 0 0 0.


On Tue, Jan 11, 2011 at 5:19 AM, komakino0 <[hidden email]> wrote:

> In my data I have three  independent variables; intervention (intervention vs
> control group), gender (male vs female) and country (country1, country2,
> country3). I have a three way interaction and I don't know how to conduct
> post hoc analyses. Basicly first I have to create a intervention-control
> difference. Then, I have to do this for gender specific. Afterwards I have
> to create a country specific difference for each gender specific
> intervention-control difference.
> The most advanced post hoc comparison I have seen is 2- way mixed design
> until now. SO I don't know what to do with this 3-way post-hoc. I appreciate
> even a tiny bit of help:) Thank you very much.
>
>
>
> intervention control difference - intervention control difference
>        for males                                          for females
>       @ country -1                                    @ country-2
> --
> View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Three-Way-Anova-Post-Hoc-Comparisons-tp3336188p3336188.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