** This is a course material for PSY6111-01-00. Any questions or comments regarding the material should be addressed to the course instructor, Jeong Eun Cheon (email: cheonje@yonsei.ac.kr) **
Introduction to the Two-Intercept Model & Interaction Model in APIM
The Two-Intercept Model in APIM employs multilevel modeling techniques to address individual differences within dyadic data, such as between a wife and a husband. This model is tailored to assign separate intercepts and slopes to each partner, enabling precise estimations of baseline levels and trends for the outcome variable for each individual. Intercepts, defined as the expected values of the outcome variable when all predictors are zero, often differ significantly between partners due to inherent differences in their personal, psychological, or situational factors. By incorporating two distinct intercepts—for instance, one for the wife and one for the husband—this model enhances the accuracy of modeling the dyadic patterns in data.
To gain a clearer understanding of how the Two-Intercept Model functions, it is essential to have a basic knowledge of regression analysis. Here, we illustrate the basic regression model using gender as a predictor to demonstrate the concept more clearly.
First, let’s load the practice data to begin our analysis.
library(tidyverse)
Practice_long <- read_csv("Practice_long.csv")
## Rows: 170 Columns: 9
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## dbl (9): Dyad, Gender, No, comm_freq, criticism1, criticism2, criticism3, re...
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
names(Practice_long)
## [1] "Dyad" "Gender" "No" "comm_freq" "criticism1"
## [6] "criticism2" "criticism3" "rel_sat" "criticism"
head(Practice_long)
## # A tibble: 6 × 9
## Dyad Gender No comm_freq criticism1 criticism2 criticism3 rel_sat
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 1 1 1 7 2.80 3.54 3.15 8.19
## 2 1 0 2 7 4.35 4.37 6.09 6.69
## 3 2 1 4 6 3.49 2.94 3.88 6.34
## 4 2 0 3 3 3.51 3.33 3.46 4.73
## 5 3 1 5 3 3.03 2.15 2.30 5.49
## 6 3 0 6 2 2.44 3.49 2.11 5.75
## # ℹ 1 more variable: criticism <dbl>
Let’s insert gender as the independent variable (IV) and marital satisfaction as the dependent variable (DV), and then proceed to run the analysis.
summary(lm(rel_sat ~ Gender, Practice_long))
##
## Call:
## lm(formula = rel_sat ~ Gender, data = Practice_long)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.8476 -1.2116 0.0842 1.1355 4.4840
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.2000 0.1759 29.559 < 0.0000000000000002 ***
## Gender 1.0289 0.2488 4.136 0.0000558 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.622 on 168 degrees of freedom
## Multiple R-squared: 0.0924, Adjusted R-squared: 0.08699
## F-statistic: 17.1 on 1 and 168 DF, p-value: 0.00005583
Intercept (Men): The intercept value is approximately 5.20, with a standard error of 0.1759. This value represents the average marital satisfaction for men (coded as 0 in gender), as they are the reference category in this model. The intercept is relationship different from zero, 𝑡=29.559, 𝑝<0.00001.
Gender (Women): The coefficient for gender is 1.0289 with a standard error of 0.2488. This suggests that, holding other factors constant, women (coded as 1) report marital satisfaction that is, on average, 1.0289 units higher than men. This difference is statistically significant𝑡=4.136,𝑝=0.0000558, suggesting that women, on average, experience higher levels of relationship satisfaction (6.2289) compared to men.
The analysis of marital satisfaction by gender can be approached through both regression analysis and t-tests.
t.test(rel_sat ~ Gender, Practice_long)
##
## Welch Two Sample t-test
##
## data: rel_sat by Gender
## t = -4.1356, df = 161.95, p-value = 0.00005673
## alternative hypothesis: true difference in means between group 0 and group 1 is not equal to 0
## 95 percent confidence interval:
## -1.5201451 -0.5375828
## sample estimates:
## mean in group 0 mean in group 1
## 5.200030 6.228894
The t-test also showed that women (mean = 6.228894) reported higher levels of marital satisfaction than men (mean = 5.200030), with a t-value of -4.1356 and a p-value of 5.673e-05, confirming the results seen in the regression analysis.
** Shifting Our Analytical Approach: Separate Analyses for Men and Women **
To deepen our understanding of how gender influences marital satisfaction, we will now adjust our analytic strategy to separately evaluate the data for men and women.
To analyze the marital satisfaction among men, we first filtered the dataset to include only male participants:
Men <- Practice_long %>% filter(Gender == 0)
summary(lm(rel_sat ~ 1, Men))
##
## Call:
## lm(formula = rel_sat ~ 1, data = Men)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.6856 -1.2204 -0.3899 1.0900 4.4840
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.200 0.158 32.91 <0.0000000000000002 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.457 on 84 degrees of freedom
The analysis indicates that the average level of relationship satisfaction reported by men is 5.200 on the scale used, with this estimate being highly significant (p < 0.00001).
mean(Men$rel_sat)
## [1] 5.20003
Now filter to include only female participants:
Women <- Practice_long %>% filter(Gender == 1)
summary(lm(rel_sat ~ 1, Women))
##
## Call:
## lm(formula = rel_sat ~ 1, data = Women)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.8476 -1.1861 0.3697 1.1780 3.6535
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 6.2289 0.1922 32.41 <0.0000000000000002 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.772 on 84 degrees of freedom
The results indicate that the average level of relationship satisfaction reported by women is 6.2289, which is also statistically significant (p < 0.00001).
mean(Women$rel_sat)
## [1] 6.228894
While the separate analyses of marital satisfaction for men and women provide valuable insights into the unique experiences of each gender, this approach does not facilitate a direct comparison or statistical test of gender differences within the same framework. Consequently, we are unable to ascertain whether the observed differences in marital satisfaction between men and women are statistically significant across the entire sample.
As we progress in our analysis, it is beneficial to synthesize the insights gained from separate evaluations of men and women with the holistic perspective offered by a combined approach. To achieve this, we will now shift our focus to a more advanced analytical strategy. This method allows us to estimate gender-specific intercepts for relationship satisfaction within the same regression model, without the need to segregate the dataset into subgroups for men and women.
To better analyze the impact of gender on marital satisfaction within our dataset, we first need to create dummy variables for men and women. This process will allow us to include men and women as separate variables in our regression models effectively.
Practice_long <- Practice_long %>% mutate(women = ifelse(Gender == 1, 1, 0),
men = ifelse(Gender == 0, 1, 0))
head(Practice_long)
## # A tibble: 6 × 11
## Dyad Gender No comm_freq criticism1 criticism2 criticism3 rel_sat
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 1 1 1 7 2.80 3.54 3.15 8.19
## 2 1 0 2 7 4.35 4.37 6.09 6.69
## 3 2 1 4 6 3.49 2.94 3.88 6.34
## 4 2 0 3 3 3.51 3.33 3.46 4.73
## 5 3 1 5 3 3.03 2.15 2.30 5.49
## 6 3 0 6 2 2.44 3.49 2.11 5.75
## # ℹ 3 more variables: criticism <dbl>, women <dbl>, men <dbl>
summary(lm(rel_sat ~ women + men, Practice_long))
##
## Call:
## lm(formula = rel_sat ~ women + men, data = Practice_long)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.8476 -1.2116 0.0842 1.1355 4.4840
##
## Coefficients: (1 not defined because of singularities)
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.2000 0.1759 29.559 < 0.0000000000000002 ***
## women 1.0289 0.2488 4.136 0.0000558 ***
## men NA NA NA NA
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.622 on 168 degrees of freedom
## Multiple R-squared: 0.0924, Adjusted R-squared: 0.08699
## F-statistic: 17.1 on 1 and 168 DF, p-value: 0.00005583
The presence of a singularity (NA for men) indicates that the model recognizes the redundancy of having two dummy variables without an intercept, as both variables perfectly predict the observations.
To further clarify the model, we might consider removing the intercept or one of the dummy variables:
summary(lm(rel_sat ~ women + men - 1, Practice_long))
##
## Call:
## lm(formula = rel_sat ~ women + men - 1, data = Practice_long)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.8476 -1.2116 0.0842 1.1355 4.4840
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## women 6.2289 0.1759 35.41 <0.0000000000000002 ***
## men 5.2000 0.1759 29.56 <0.0000000000000002 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.622 on 168 degrees of freedom
## Multiple R-squared: 0.9268, Adjusted R-squared: 0.9259
## F-statistic: 1064 on 2 and 168 DF, p-value: < 0.00000000000000022
By running this model without an intercept (-1), each gender’s coefficient directly represents their respective mean marital satisfaction scores, simplifying interpretation.
Interaction Approach
When analyzing how external factors like criticism impact marital satisfaction differently based on gender, interaction models are invaluable. These models allow us to dissect the unique impacts across different groups by strategically adjusting the reference category.
summary(lm(rel_sat ~ criticism + men + criticism:men, Practice_long))
##
## Call:
## lm(formula = rel_sat ~ criticism + men + criticism:men, data = Practice_long)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.866 -1.198 0.036 1.137 4.617
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.9588 0.6679 7.425 0.00000000000561 ***
## criticism 0.3239 0.1644 1.970 0.0505 .
## men 0.9080 0.9948 0.913 0.3627
## criticism:men -0.4826 0.2369 -2.037 0.0432 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.609 on 166 degrees of freedom
## Multiple R-squared: 0.1176, Adjusted R-squared: 0.1017
## F-statistic: 7.377 on 3 and 166 DF, p-value: 0.0001138
The slope for criticism effectively represents the effect for women because ‘men’ is coded as 1 for men and 0 for women, making women the reference category in this model setup. By configuring the model this way, the coefficients for ‘criticism’ directly tell us about its impact on women, with the interaction term (‘criticism’) adjusting this effect for men.
summary(lm(rel_sat ~ criticism + women + criticism:women, Practice_long))
##
## Call:
## lm(formula = rel_sat ~ criticism + women + criticism:women, data = Practice_long)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.866 -1.198 0.036 1.137 4.617
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.8668 0.7373 7.957 0.000000000000262 ***
## criticism -0.1587 0.1706 -0.931 0.3533
## women -0.9080 0.9948 -0.913 0.3627
## criticism:women 0.4826 0.2369 2.037 0.0432 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.609 on 166 degrees of freedom
## Multiple R-squared: 0.1176, Adjusted R-squared: 0.1017
## F-statistic: 7.377 on 3 and 166 DF, p-value: 0.0001138
The slope for criticism effectively represents the effect for men because ‘women’ is coded as 1 for men and 0 for women, making men the reference category in this case.
summary(lm(rel_sat ~ criticism, Men))
##
## Call:
## lm(formula = rel_sat ~ criticism, data = Men)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.0313 -1.2124 -0.4132 1.1443 4.6168
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.8668 0.6674 8.790 0.000000000000172 ***
## criticism -0.1587 0.1544 -1.028 0.307
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.456 on 83 degrees of freedom
## Multiple R-squared: 0.01258, Adjusted R-squared: 0.0006806
## F-statistic: 1.057 on 1 and 83 DF, p-value: 0.3068
summary(lm(rel_sat ~ criticism, Women))
##
## Call:
## lm(formula = rel_sat ~ criticism, data = Women)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.8664 -1.0216 0.2629 1.0942 3.7243
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.9588 0.7257 6.833 0.00000000129 ***
## criticism 0.3239 0.1786 1.813 0.0734 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.748 on 83 degrees of freedom
## Multiple R-squared: 0.0381, Adjusted R-squared: 0.02652
## F-statistic: 3.288 on 1 and 83 DF, p-value: 0.0734
In regression analysis, particularly when dealing with categorical variables like gender, the choice of reference category and its coding can significantly impact the interpretability of the results. To improve clarity, it’s beneficial to code the reference category with ‘0’, which traditionally denotes the absence or baseline level of the categorical variable. This approach aligns with common statistical practices and enhances the comprehension of model outputs.
Practice_long <- Practice_long %>%
mutate(
women = ifelse(Gender == 1, 0, 1), # Men as the reference category
men = ifelse(Gender == 0, 0, 1) # Women as the reference category
)
summary(lm(rel_sat ~ criticism + men + criticism:men, Practice_long))
##
## Call:
## lm(formula = rel_sat ~ criticism + men + criticism:men, data = Practice_long)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.866 -1.198 0.036 1.137 4.617
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.8668 0.7373 7.957 0.000000000000262 ***
## criticism -0.1587 0.1706 -0.931 0.3533
## men -0.9080 0.9948 -0.913 0.3627
## criticism:men 0.4826 0.2369 2.037 0.0432 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.609 on 166 degrees of freedom
## Multiple R-squared: 0.1176, Adjusted R-squared: 0.1017
## F-statistic: 7.377 on 3 and 166 DF, p-value: 0.0001138
summary(lm(rel_sat ~ criticism + women + criticism:women, Practice_long))
##
## Call:
## lm(formula = rel_sat ~ criticism + women + criticism:women, data = Practice_long)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.866 -1.198 0.036 1.137 4.617
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.9588 0.6679 7.425 0.00000000000561 ***
## criticism 0.3239 0.1644 1.970 0.0505 .
## women 0.9080 0.9948 0.913 0.3627
## criticism:women -0.4826 0.2369 -2.037 0.0432 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.609 on 166 degrees of freedom
## Multiple R-squared: 0.1176, Adjusted R-squared: 0.1017
## F-statistic: 7.377 on 3 and 166 DF, p-value: 0.0001138
This method reverses the typical encoding, ensuring that the coefficient for each non-reference category (expressed by ‘1’) in the regression directly reflects the difference from the reference category (expressed by ‘0’).
Two-Intercept Approach
Practice_long <- Practice_long %>% mutate(women = ifelse(Gender == 1, 1, 0),
men = ifelse(Gender == 0, 1, 0))
By coding each group with ‘1’ when they belong to that group and using separate intercepts:
\(\beta_1\) (Intercept for Women): This intercept now directly represents the baseline marital satisfaction for women (when criticism is zero), as women = 1 for actual women. \(\beta_2\) (Intercept for Men): Similarly, this intercept represents the baseline marital satisfaction for men. This setup simplifies the interpretation because each gender’s baseline level of the dependent variable (marital satisfaction in this case) is explicitly modeled by its respective intercept.
\[ \text{relationship satisfaction} = \beta_1 \cdot \text{women} + \beta_2 \cdot \text{men} + \beta_3 \cdot (\text{women} \times \text{criticism}) + \beta_4 \cdot (\text{men} \times \text{criticism}) \]
summary(lm(rel_sat ~ women + men + women:criticism + men:criticism - 1, Practice_long))
##
## Call:
## lm(formula = rel_sat ~ women + men + women:criticism + men:criticism -
## 1, data = Practice_long)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.866 -1.198 0.036 1.137 4.617
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## women 4.9588 0.6679 7.425 0.000000000005611 ***
## men 5.8668 0.7373 7.957 0.000000000000262 ***
## women:criticism 0.3239 0.1644 1.970 0.0505 .
## men:criticism -0.1587 0.1706 -0.931 0.3533
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.609 on 166 degrees of freedom
## Multiple R-squared: 0.9288, Adjusted R-squared: 0.9271
## F-statistic: 541.8 on 4 and 166 DF, p-value: < 0.00000000000000022
This formula represents a linear regression model that predicts marital satisfaction (rel_sat) as a function of gender and the interaction of gender with criticism. Here’s a breakdown of each component:
\(\beta_1 \cdot \text{women}\): This term estimates the baseline marital satisfaction for women. Here, \(\beta_1\) represents the coefficient or change in marital satisfaction attributed solely to being a woman when criticism is zero.
\(\beta_2 \cdot \text{men}\): Similarly, this term estimates the baseline marital satisfaction for men. Since ‘men’ and ‘women’ are coded as dummy variables (1 for yes, 0 for no), \(\beta_2\) represents the adjustment or the baseline difference in marital satisfaction for men compared to women when criticism is zero.
\(\beta_3 \cdot (\text{women} \times \text{criticism})\): This interaction term assesses how the relationship between criticism and marital satisfaction varies for women. \(\beta_3\) adjusts the effect of criticism on marital satisfaction depending on whether the individual is a woman.
\(\beta_4 \cdot (\text{men} \times \text{criticism})\): This term is the interaction between being a man and the level of criticism, assessing how the relationship between criticism and marital satisfaction changes for men. \(\beta_4\) provides the differential effect of criticism on marital satisfaction for men.