Back to schedule


Read in the individual data (or a pairwise dataset)

library(tidyr)
library(dplyr)
library(nlme)

acitelli_ind <- read.csv(file.choose(), header=TRUE)

Convert individual data to pairwise.

tempA <- acitelli_ind %>% 
  mutate(genderE = gender, partnum = 1) %>%
  mutate(gender = ifelse(gender == 1, "A", "P")) %>%
  gather(variable, value, self_pos:genderE) %>%
  unite(var_gender, variable, gender) %>%
  spread(var_gender, value)

tempB <- acitelli_ind %>% 
  mutate(genderE = gender, partnum = 2) %>%
  mutate(gender = ifelse(gender == 1, "P", "A")) %>%
  gather(variable, value, self_pos:genderE)%>%
  unite(var_gender, variable, gender) %>%
  spread(var_gender, value)

acitelli_pair <- bind_rows(tempA, tempB) %>%
  arrange(cuplid) %>%
  mutate(gender_A = ifelse(genderE_A == 1, "hus", "wife"), gender_A = as.factor(gender_A)) 
  
rm(tempA, tempB)

Example Data Set: Acitelli

Outcome: [satisfaction_A] Satisfaction Predictor Variables: [other_pos_A, other_pos_P] Positivity of the Perception of the Other (Actor and Partner)
Moderators: [tension_A, tension_P] Perception of Tension in the Relationship (Actor and Partner)

Saturated Model

We first center the moderator and predictor variables:

acitelli_pair <- acitelli_pair %>% 
  mutate(Cother_pos_A = other_pos_A - 4.2635, 
         Cother_pos_P = other_pos_P - 4.2635,
         Ctension_A = tension_A - 2.4307, 
         Ctension_P = tension_P - 2.4307)

We then estimate the two-intercept model:

apim_sat_two <- gls(satisfaction_A ~ gender_A + Cother_pos_A:gender_A + Cother_pos_P:gender_A 
                    + Ctension_A:gender_A + Ctension_P:gender_A 
                    + Ctension_A:Cother_pos_A:gender_A + Ctension_A:Cother_pos_P:gender_A
                    + Ctension_P:Cother_pos_A:gender_A + Ctension_P:Cother_pos_P:gender_A - 1,
                    data = acitelli_pair,
                    correlation = corCompSymm(form=~1|cuplid), 
                    weights = varIdent(form=~1|genderE_A), 
                    na.action = na.omit)

coef(summary(apim_sat_two))
##                                            Value  Std.Error     t-value
## gender_Ahus                           3.66940926 0.02885737 127.1567394
## gender_Awife                          3.66696429 0.03485587 105.2036354
## gender_Ahus:Cother_pos_A              0.28983988 0.05887904   4.9226321
## gender_Awife:Cother_pos_A             0.20352718 0.06610723   3.0787431
## gender_Ahus:Cother_pos_P              0.14286889 0.05473055   2.6104049
## gender_Awife:Cother_pos_P             0.17462257 0.07111806   2.4553899
## gender_Ahus:Ctension_A               -0.22418365 0.04397864  -5.0975577
## gender_Awife:Ctension_A              -0.34238443 0.05021059  -6.8189690
## gender_Ahus:Ctension_P               -0.10924034 0.04156963  -2.6278885
## gender_Awife:Ctension_P              -0.06745029 0.05312035  -1.2697636
## gender_Ahus:Cother_pos_A:Ctension_A   0.25783605 0.08463897   3.0463041
## gender_Awife:Cother_pos_A:Ctension_A  0.12399808 0.08815608   1.4065744
## gender_Ahus:Cother_pos_P:Ctension_A   0.14656728 0.08371921   1.7507007
## gender_Awife:Cother_pos_P:Ctension_A  0.24759066 0.10198237   2.4277790
## gender_Ahus:Cother_pos_A:Ctension_P   0.08996220 0.08443178   1.0655017
## gender_Awife:Cother_pos_A:Ctension_P  0.19316140 0.10112169   1.9101877
## gender_Ahus:Cother_pos_P:Ctension_P   0.09797118 0.07298491   1.3423484
## gender_Awife:Cother_pos_P:Ctension_P -0.07188029 0.10223263  -0.7031052
##                                            p-value
## gender_Ahus                          2.344117e-248
## gender_Awife                         6.095277e-226
## gender_Ahus:Cother_pos_A              1.465796e-06
## gender_Awife:Cother_pos_A             2.286607e-03
## gender_Ahus:Cother_pos_P              9.533936e-03
## gender_Awife:Cother_pos_P             1.468562e-02
## gender_Ahus:Ctension_A                6.369341e-07
## gender_Awife:Ctension_A               5.705319e-11
## gender_Ahus:Ctension_P                9.069008e-03
## gender_Awife:Ctension_P               2.052307e-01
## gender_Ahus:Cother_pos_A:Ctension_A   2.539262e-03
## gender_Awife:Cother_pos_A:Ctension_A  1.606705e-01
## gender_Ahus:Cother_pos_P:Ctension_A   8.110052e-02
## gender_Awife:Cother_pos_P:Ctension_A  1.582663e-02
## gender_Ahus:Cother_pos_A:Ctension_P   2.875735e-01
## gender_Awife:Cother_pos_A:Ctension_P  5.713790e-02
## gender_Ahus:Cother_pos_P:Ctension_P   1.805782e-01
## gender_Awife:Cother_pos_P:Ctension_P  4.825786e-01

Note that the output only presents the random effects. We see that 2 of the 8 moderation effects are statistically significant and 2 are marginally significant. Seven of the eight coefficients are positive. Note that all actor and partner effects for Tension are negative, and all actor and partner effects for Other Positivity are positive.

To more easily interpret the moderation effects, it is beneficial to switch the predictor and the moderator.
So in this case, we make the predictor be Tension and the moderator be Other Positivity. Interpretation of the eight interactions:

other_pos_A with tension_A (Husband): The negative effect that the more tension he sees in the relationship the less satisfied he feels is reduced if he sees her more positively.

other_pos_A with tension_A (Wife): The negative effect that the more tension she sees in the relationship the less satisfied she feels is reduced if she sees him more positively.

other_pos_A with tension_P (Husband): The negative effect that the more tension she sees in the relationship the less satisfied he feels is reduced if he sees her more positively.

other_pos_A with tension_P (Wife): The negative effect that the more tension he sees in the relationship the less satisfied she feels is reduced if she sees him more positively.

other_pos_P with tension_A (Husband): The negative effect that the more tension he sees in the relationship the less satisfied he feels is reduced if she sees him more positively.

other_pos_P with tension_A (Wife): The negative effect that the more tension she sees in the relationship the less satisfied she feels is reduced if he sees her more positively.

other_pos_P with tension_P (Husband): The negative effect that the more tension she sees in the relationship the less satisfied he feels is reduced if she sees him more positively.

other_pos_P with tension_P (Wife): The negative effect that the more tension he sees in the relationship the less satisfied she feels is increased if he sees her more positively.

To test if these moderation effects are significantly different across gender we run the model with gender interactions.

apim_sat_int <- gls(satisfaction_A ~ Ctension_A*Cother_pos_A*genderE_A + Ctension_A*Cother_pos_P*genderE_A
                    + Ctension_P*Cother_pos_A*genderE_A + Ctension_P*Cother_pos_P*genderE_A,
                    data = acitelli_pair,
                    correlation = corCompSymm(form=~1|cuplid), 
                    weights = varIdent(form=~1|genderE_A), 
                    na.action = na.omit)

coef(summary(apim_sat_int))
##                                          Value  Std.Error      t-value
## (Intercept)                        3.668186778 0.02587974 141.73969786
## Ctension_A                        -0.283284039 0.03226381  -8.78024135
## Cother_pos_A                       0.246683530 0.04333935   5.69190599
## genderE_A                          0.001222485 0.01881698   0.06496709
## Cother_pos_P                       0.158745732 0.04395879   3.61123943
## Ctension_P                        -0.088345316 0.03262819  -2.70763744
## Ctension_A:Cother_pos_A            0.190917064 0.06063809   3.14846750
## Ctension_A:genderE_A               0.059100394 0.03444791   1.71564537
## Cother_pos_A:genderE_A             0.043156347 0.04516807   0.95546144
## Ctension_A:Cother_pos_P            0.197078970 0.06466192   3.04783664
## genderE_A:Cother_pos_P            -0.015876840 0.04576276  -0.34693799
## Cother_pos_A:Ctension_P            0.141561804 0.06455553   2.19286875
## genderE_A:Ctension_P              -0.020895028 0.03478942  -0.60061442
## Cother_pos_P:Ctension_P            0.013045443 0.06235177   0.20922330
## Ctension_A:Cother_pos_A:genderE_A  0.066918982 0.06156823   1.08690775
## Ctension_A:genderE_A:Cother_pos_P -0.050511686 0.06725691  -0.75102602
## Cother_pos_A:genderE_A:Ctension_P -0.051599600 0.06715463  -0.76836999
## genderE_A:Cother_pos_P:Ctension_P  0.084925737 0.06325671   1.34255700
##                                         p-value
## (Intercept)                       2.887155e-261
## Ctension_A                         1.700205e-16
## Cother_pos_A                       3.186714e-08
## genderE_A                          9.482469e-01
## Cother_pos_P                       3.614566e-04
## Ctension_P                         7.196236e-03
## Ctension_A:Cother_pos_A            1.820007e-03
## Ctension_A:genderE_A               8.734112e-02
## Cother_pos_A:genderE_A             3.401745e-01
## Ctension_A:Cother_pos_P            2.526771e-03
## genderE_A:Cother_pos_P             7.289004e-01
## Cother_pos_A:Ctension_P            2.914542e-02
## genderE_A:Ctension_P               5.485862e-01
## Cother_pos_P:Ctension_P            8.344272e-01
## Ctension_A:Cother_pos_A:genderE_A  2.780191e-01
## Ctension_A:genderE_A:Cother_pos_P  4.532722e-01
## Cother_pos_A:genderE_A:Ctension_P  4.429196e-01
## genderE_A:Cother_pos_P:Ctension_P  1.805107e-01

Looking at these three-way interactions with gender we find no significant gender differences in the moderation effects:

coef(summary(apim_sat_int))[15:18,]
##                                         Value  Std.Error   t-value
## Ctension_A:Cother_pos_A:genderE_A  0.06691898 0.06156823  1.086908
## Ctension_A:genderE_A:Cother_pos_P -0.05051169 0.06725691 -0.751026
## Cother_pos_A:genderE_A:Ctension_P -0.05159960 0.06715463 -0.768370
## genderE_A:Cother_pos_P:Ctension_P  0.08492574 0.06325671  1.342557
##                                     p-value
## Ctension_A:Cother_pos_A:genderE_A 0.2780191
## Ctension_A:genderE_A:Cother_pos_P 0.4532722
## Cother_pos_A:genderE_A:Ctension_P 0.4429196
## genderE_A:Cother_pos_P:Ctension_P 0.1805107

We see none are statistically significant and no clear pattern, as two are positive and two are negative. When we test for complete indistinguishability, we find \(\chi^2(9) = 14.201\), \(p = .115\). Thus, to simplify things, we estimate a model of complete indistinguishability, i.e., no gender effects.

Indistinguishable Model

apim_mod_in <- gls(satisfaction_A ~ Ctension_A*Cother_pos_A + Ctension_A*Cother_pos_P
                   + Ctension_P*Cother_pos_A + Ctension_P*Cother_pos_P,
                   data = acitelli_pair,
                   correlation = corCompSymm(form=~1|cuplid), 
                   na.action = na.omit)

coef(summary(apim_mod_in))
##                               Value  Std.Error     t-value       p-value
## (Intercept)              3.66219519 0.02521459 145.2410913 1.046469e-270
## Ctension_A              -0.27673060 0.03161413  -8.7533821  1.811835e-16
## Cother_pos_A             0.23543956 0.04305102   5.4688500  9.859982e-08
## Cother_pos_P             0.16605698 0.04305102   3.8572137  1.416447e-04
## Ctension_P              -0.09822890 0.03161413  -3.1071195  2.078501e-03
## Ctension_A:Cother_pos_A  0.18506735 0.05961508   3.1043713  2.097266e-03
## Ctension_A:Cother_pos_P  0.19373113 0.06258840   3.0953199  2.160178e-03
## Cother_pos_A:Ctension_P  0.13293798 0.06258840   2.1240035  3.452490e-02
## Cother_pos_P:Ctension_P  0.03151737 0.05961508   0.5286812  5.974352e-01

Note that all the interaction effects are positive and three of the four are statistically significant.

To interpret the interactions and test for simple slopes, we can use the method of re-centering. To estimate the simple slopes of actor tension at high and low actor OtherPos, for example, we re-estimate the model for those who are 1 standard deviation (sd) above and then 1 sd below the mean on actor other_pos. We then look at the “main effect” of Tension as it will now refer to effect of tension when other_pos is one standard deviation above the mean (high) or one standard deviation below the mean (low).

Note that to have other_pos_A be zero when it is one sd above the mean, we subtract 1 sd from the centered score and add 1 sd for one sd below the mean:

acitelli_pair <- acitelli_pair %>% 
  mutate(High_Cother_pos_A = Cother_pos_A - .4982, 
         High_Cother_pos_P = Cother_pos_P - .4982, 
         Low_Cother_pos_A = Cother_pos_A + .4982, 
         Low_Cother_pos_P = Cother_pos_P + .4982)

We then re-run the model 4 times using these 4 re-centered variables:

apim_opa_high <- gls(satisfaction_A ~ Ctension_A*High_Cother_pos_A + Ctension_A*Cother_pos_P
                     + Ctension_P*High_Cother_pos_A + Ctension_P*Cother_pos_P,
                     data = acitelli_pair,
                     correlation = corCompSymm(form=~1|cuplid), 
                     na.action = na.omit)

coef(summary(apim_opa_high))
##                                    Value  Std.Error     t-value
## (Intercept)                   3.77949118 0.03330751 113.4726434
## Ctension_A                   -0.18453005 0.04643902  -3.9735991
## High_Cother_pos_A             0.23543956 0.04305102   5.4688500
## Cother_pos_P                  0.16605698 0.04305102   3.8572137
## Ctension_P                   -0.03199919 0.04502638  -0.7106765
## Ctension_A:High_Cother_pos_A  0.18506735 0.05961508   3.1043713
## Ctension_A:Cother_pos_P       0.19373113 0.06258840   3.0953199
## High_Cother_pos_A:Ctension_P  0.13293798 0.06258840   2.1240035
## Cother_pos_P:Ctension_P       0.03151737 0.05961508   0.5286812
##                                    p-value
## (Intercept)                  1.802220e-240
## Ctension_A                    8.961352e-05
## High_Cother_pos_A             9.859982e-08
## Cother_pos_P                  1.416447e-04
## Ctension_P                    4.778618e-01
## Ctension_A:High_Cother_pos_A  2.097266e-03
## Ctension_A:Cother_pos_P       2.160178e-03
## High_Cother_pos_A:Ctension_P  3.452490e-02
## Cother_pos_P:Ctension_P       5.974352e-01

When other_pos_A is high there is a significant but small negative effect of actor tension and no significant effect of partner tension on satisfaction.

apim_opa_low <- gls(satisfaction_A ~ Ctension_A*Low_Cother_pos_A + Ctension_A*Cother_pos_P
                    + Ctension_P*Low_Cother_pos_A + Ctension_P*Cother_pos_P,
                    data = acitelli_pair,
                    correlation = corCompSymm(form=~1|cuplid), 
                    na.action = na.omit)

coef(summary(apim_opa_low))
##                                   Value  Std.Error     t-value
## (Intercept)                  3.54489920 0.03289675 107.7583378
## Ctension_A                  -0.36893116 0.04008157  -9.2045082
## Low_Cother_pos_A             0.23543956 0.04305102   5.4688500
## Cother_pos_P                 0.16605698 0.04305102   3.8572137
## Ctension_P                  -0.16445860 0.04377338  -3.7570457
## Ctension_A:Low_Cother_pos_A  0.18506735 0.05961508   3.1043713
## Ctension_A:Cother_pos_P      0.19373113 0.06258840   3.0953199
## Low_Cother_pos_A:Ctension_P  0.13293798 0.06258840   2.1240035
## Cother_pos_P:Ctension_P      0.03151737 0.05961508   0.5286812
##                                   p-value
## (Intercept)                 3.539342e-234
## Ctension_A                   7.384952e-18
## Low_Cother_pos_A             9.859982e-08
## Cother_pos_P                 1.416447e-04
## Ctension_P                   2.082252e-04
## Ctension_A:Low_Cother_pos_A  2.097266e-03
## Ctension_A:Cother_pos_P      2.160178e-03
## Low_Cother_pos_A:Ctension_P  3.452490e-02
## Cother_pos_P:Ctension_P      5.974352e-01

Now we see that when other_pos_A is low there is a larger statistically significant negative effect of actor tension on satisfaction. Likewise, when other_pos_A is low there is a larger and this time significant negative effect of partner tension of satisfaction. What about the moderation by other_pos_P? We re-run the models with our new high and low other_pos_P’s.

apim_opp_high <- gls(satisfaction_A ~ Ctension_A*Cother_pos_A + Ctension_A*High_Cother_pos_P
                     + Ctension_P*Cother_pos_A + Ctension_P*High_Cother_pos_P,
                     data = acitelli_pair,
                     correlation = corCompSymm(form=~1|cuplid), 
                     na.action = na.omit)

coef(summary(apim_opp_high))
##                                    Value  Std.Error     t-value
## (Intercept)                   3.74492478 0.03330751 112.4348473
## Ctension_A                   -0.18021375 0.04502638  -4.0024036
## Cother_pos_A                  0.23543956 0.04305102   5.4688500
## High_Cother_pos_P             0.16605698 0.04305102   3.8572137
## Ctension_P                   -0.08252694 0.04643902  -1.7771034
## Ctension_A:Cother_pos_A       0.18506735 0.05961508   3.1043713
## Ctension_A:High_Cother_pos_P  0.19373113 0.06258840   3.0953199
## Cother_pos_A:Ctension_P       0.13293798 0.06258840   2.1240035
## High_Cother_pos_P:Ctension_P  0.03151737 0.05961508   0.5286812
##                                    p-value
## (Intercept)                  2.376283e-239
## Ctension_A                    7.988014e-05
## Cother_pos_A                  9.859982e-08
## High_Cother_pos_P             1.416447e-04
## Ctension_P                    7.661028e-02
## Ctension_A:Cother_pos_A       2.097266e-03
## Ctension_A:High_Cother_pos_P  2.160178e-03
## Cother_pos_A:Ctension_P       3.452490e-02
## High_Cother_pos_P:Ctension_P  5.974352e-01

As with other_pos_A, when other_pos_P is high there is a small but significant effect of actor tension on satisfaction, and an even smaller marginally significant effect of partner tension on satisfaction.

apim_opp_low <- gls(satisfaction_A ~ Ctension_A*Cother_pos_A + Ctension_A*Low_Cother_pos_P
                    + Ctension_P*Cother_pos_A + Ctension_P*Low_Cother_pos_P,
                    data = acitelli_pair,
                    correlation = corCompSymm(form=~1|cuplid), 
                    na.action = na.omit)

coef(summary(apim_opp_low))
##                                   Value  Std.Error     t-value
## (Intercept)                  3.57946561 0.03289675 108.8090921
## Ctension_A                  -0.37324745 0.04377338  -8.5268131
## Cother_pos_A                 0.23543956 0.04305102   5.4688500
## Low_Cother_pos_P             0.16605698 0.04305102   3.8572137
## Ctension_P                  -0.11393085 0.04008157  -2.8424746
## Ctension_A:Cother_pos_A      0.18506735 0.05961508   3.1043713
## Ctension_A:Low_Cother_pos_P  0.19373113 0.06258840   3.0953199
## Cother_pos_A:Ctension_P      0.13293798 0.06258840   2.1240035
## Low_Cother_pos_P:Ctension_P  0.03151737 0.05961508   0.5286812
##                                   p-value
## (Intercept)                 2.334620e-235
## Ctension_A                   8.740394e-16
## Cother_pos_A                 9.859982e-08
## Low_Cother_pos_P             1.416447e-04
## Ctension_P                   4.797630e-03
## Ctension_A:Cother_pos_A      2.097266e-03
## Ctension_A:Low_Cother_pos_P  2.160178e-03
## Cother_pos_A:Ctension_P      3.452490e-02
## Low_Cother_pos_P:Ctension_P  5.974352e-01

But when other_pos_P is low, there are larger and statistically significant negative effects of actor and partner tension on satisfaction.

It would be nice beneficial to have a figure for the moderation of actor tension by other_pos_A and other_pos_P. Do graph this interaction we need to get the predicted values of satisfaction when other_pos_A is high and tension_A is high, when other_pos_A is high and other_pos_A is low, and so on.

nd1 <- acitelli_pair %>% 
  summarise(Cother_pos_A = sd(Cother_pos_A), Cother_pos_P = 0, Ctension_A = sd(Ctension_A), Ctension_P = 0)
nd2 <- acitelli_pair %>% 
  summarise(Cother_pos_A = sd(Cother_pos_A), Cother_pos_P = 0, Ctension_A = -sd(Ctension_A), Ctension_P = 0)
nd3 <- acitelli_pair %>% 
  summarise(Cother_pos_A = -sd(Cother_pos_A), Cother_pos_P = 0, Ctension_A = sd(Ctension_A), Ctension_P = 0)
nd4 <- acitelli_pair %>% 
  summarise(Cother_pos_A = -sd(Cother_pos_A), Cother_pos_P = 0, Ctension_A = -sd(Ctension_A), Ctension_P = 0)
nd5 <- acitelli_pair %>% 
  summarise(Cother_pos_A = 0, Cother_pos_P = sd(Cother_pos_P), Ctension_A = sd(Ctension_A), Ctension_P = 0)
nd6 <- acitelli_pair %>% 
  summarise(Cother_pos_A = 0, Cother_pos_P = sd(Cother_pos_P), Ctension_A = -sd(Ctension_A), Ctension_P = 0)
nd7 <- acitelli_pair %>% 
  summarise(Cother_pos_A = 0, Cother_pos_P = -sd(Cother_pos_P), Ctension_A = sd(Ctension_A), Ctension_P = 0)
nd8 <- acitelli_pair %>% 
  summarise(Cother_pos_A = 0, Cother_pos_P = -sd(Cother_pos_P), Ctension_A = -sd(Ctension_A), Ctension_P = 0)
            
newdata_act <- bind_rows(nd1, nd2, nd3, nd4, nd5, nd6, nd7, nd8) 

newdata_act <- newdata_act %>%
  mutate(pred = predict(apim_mod_in, newdata_act),
         tension = as.factor(rep(c("high", "low"),4)),
         other_pos = c("actor-high", "actor-high", "actor-low", "actor-low", 
                       "partner-high", "partner-high", "partner-low", "partner-low"))

These 8 predicted means are use to make a graph. The eight means are:

Actor Tension

Low High
Actor OtherPos Low 3.798 3.291
Actor OtherPos High 3.906 3.653
Partner OtherPos Low 3.836 3.323
Partner OtherPos High 3.869 3.621

The line graph made by ggplot2:

#install.packages("ggplot2")
library(ggplot2)

ggplot(newdata_act, aes(tension, pred)) +
  geom_line(aes(group = other_pos, color = other_pos))+
  xlim("low", "high") +
  ylim(3, 4) +
  labs(x = "Actor Tension", y = "Satisfaction") +
  scale_color_discrete("Other Positivity")

Similarly, it would be nice to see the moderation of partner tension by other_pos_A and other_pos_P. We can use a similar set of summarise() statements to get the 8 predicted satisfaction scores we need for this figure.

nd1 <- acitelli_pair %>% 
  summarise(Cother_pos_A = sd(Cother_pos_A), Cother_pos_P = 0, Ctension_P = sd(Ctension_P), Ctension_A = 0)
nd2 <- acitelli_pair %>% 
  summarise(Cother_pos_A = sd(Cother_pos_A), Cother_pos_P = 0, Ctension_P = -sd(Ctension_P), Ctension_A = 0)
nd3 <- acitelli_pair %>% 
  summarise(Cother_pos_A = -sd(Cother_pos_A), Cother_pos_P = 0, Ctension_P = sd(Ctension_P), Ctension_A = 0)
nd4 <- acitelli_pair %>% 
  summarise(Cother_pos_A = -sd(Cother_pos_A), Cother_pos_P = 0, Ctension_P = -sd(Ctension_P), Ctension_A = 0)
nd5 <- acitelli_pair %>% 
  summarise(Cother_pos_A = 0, Cother_pos_P = sd(Cother_pos_P), Ctension_P = sd(Ctension_P), Ctension_A = 0)
nd6 <- acitelli_pair %>% 
  summarise(Cother_pos_A = 0, Cother_pos_P = sd(Cother_pos_P), Ctension_P = -sd(Ctension_P), Ctension_A = 0)
nd7 <- acitelli_pair %>% 
  summarise(Cother_pos_A = 0, Cother_pos_P = -sd(Cother_pos_P), Ctension_P = sd(Ctension_P), Ctension_A = 0)
nd8 <- acitelli_pair %>% 
  summarise(Cother_pos_A = 0, Cother_pos_P = -sd(Cother_pos_P), Ctension_P = -sd(Ctension_P), Ctension_A = 0)
            
newdata_part <- bind_rows(nd1, nd2, nd3, nd4, nd5, nd6, nd7, nd8) 

newdata_part <- newdata_part %>%
  mutate(pred = predict(apim_mod_in, newdata_part),
         tension = as.factor(rep(c("high", "low"),4)),
         other_pos = c("actor-high", "actor-high", "actor-low", "actor-low", 
                       "partner-high", "partner-high", "partner-low", "partner-low"))

Partner Tension

Low High
Actor OtherPos Low 3.658 3.432
Actor OtherPos High 3.802 3.758
Partner OtherPos Low 3.658 3.501
Partner OtherPos High 3.802 3.688
ggplot(newdata_part, aes(tension, pred)) +
  geom_line(aes(group = other_pos, color = other_pos))+
  xlim("low", "high") +
  ylim(3, 4) +
  labs(x = "Partner Tension", y = "Satisfaction") +
  scale_color_discrete("Other Positivity")

It is clear from the figures that the pattern of moderation is relatively the same. An obvious way to simplify this moderation model is to use as the average of OtherPos and Tension, i.e., make them couple variables.

That results in a single set of product terms:

acitelli_pair <- acitelli_pair %>% 
  mutate(AveOPxT = (Cother_pos_A*Ctension_A + Cother_pos_A*Ctension_P 
                    + Cother_pos_P*Ctension_A + Cother_pos_P*Ctension_P)/4)

apim_aveOPxT <- gls(satisfaction_A ~ Cother_pos_A + Cother_pos_P + Ctension_A + Ctension_P
                    + AveOPxT,
                    data = acitelli_pair,
                    correlation = corCompSymm(form=~1|cuplid), 
                    na.action = na.omit)

summary(apim_aveOPxT)
## Generalized least squares fit by REML
##   Model: satisfaction_A ~ Cother_pos_A + Cother_pos_P + Ctension_A + Ctension_P +      AveOPxT 
##   Data: acitelli_pair 
##       AIC      BIC   logLik
##   224.908 254.2671 -104.454
## 
## Correlation Structure: Compound symmetry
##  Formula: ~1 | cuplid 
##  Parameter estimate(s):
##       Rho 
## 0.2914693 
## 
## Coefficients:
##                  Value  Std.Error   t-value p-value
## (Intercept)   3.663914 0.02504843 146.27323   0e+00
## Cother_pos_A  0.241027 0.04289024   5.61963   0e+00
## Cother_pos_P  0.161557 0.04289024   3.76676   2e-04
## Ctension_A   -0.280902 0.03152800  -8.90961   0e+00
## Ctension_P   -0.091353 0.03152800  -2.89753   4e-03
## AveOPxT       0.542309 0.10254116   5.28870   0e+00
## 
##  Correlation: 
##              (Intr) Cth__A Cth__P Ctns_A Ctns_P
## Cother_pos_A 0.011                             
## Cother_pos_P 0.011  0.198                      
## Ctension_A   0.057  0.346  0.234               
## Ctension_P   0.057  0.234  0.346  0.123        
## AveOPxT      0.447  0.024  0.024  0.128  0.128 
## 
## Standardized residuals:
##        Min         Q1        Med         Q3        Max 
## -5.0402814 -0.4304560  0.1280194  0.5642467  2.8679479 
## 
## Residual standard error: 0.3392822 
## Degrees of freedom: 296 total; 290 residual

The effect of the interaction is positive which again means weaker effects of Tension when Other Positivity is high and stronger effect when low. We can also use the deviance difference test to evaluate the effect of using a single interaction effect for the four effects. We find \(\chi^2(3) = 5.014\), \(p = .171\). We can then conclude that this one interaction explains all four interaction effects.


Back to schedule