[Stable]

APIM_sem(
  data,
  mod_type,
  predictor_a,
  predictor_p,
  outcome_a,
  outcome_p,
  med_a = NULL,
  med_p = NULL,
  mod_a = NULL,
  mod_p = NULL,
  bootstrap = NULL,
  standardized = FALSE,
  return_result = FALSE,
  quite = FALSE
)

Arguments

data

data frame object

mod_type

options are "simple" (main effect), "med" (mediation), and "mod" (moderation)

predictor_a

predictor variable name for actor

predictor_p

predictor variable name for partner

outcome_a

dependent variable name for actor

outcome_p

dependent variable name for partner

med_a

mediation variable name for actor

med_p

mediation variable name for partner

mod_a

moderation variable name for actor

mod_p

moderation variable name for partner

bootstrap

number of bootstrapping (e.g., 5000). Default is not using bootstrap

standardized

standardized coefficient

return_result

return lavaan::parameterestimates(). Default is FALSE

quite

suppress printing output. Default is FALSE

Value

data.frame from lavaan::parameterestimates()

Details

Actor-partner interdependence model using SEM approach (with lavaan). Indistinguishable dyads only. Results should be the same as those from Kenny (2015a, 2015b).

References

Kenny, D. A. (2015, October). An interactive tool for the estimation and testing mediation in the Actor-Partner Interdependence Model using structural equation modeling. Computer software. Available from https://davidakenny.shinyapps.io/APIMeM/. Kenny, D. A. (2015, October). An interactive tool for the estimation and testing moderation in the Actor-Partner Interdependence Model using structural equation modeling. Computer software. Available from https://davidakenny.shinyapps.io/APIMoM/. Stas, L, Kenny, D. A., Mayer, A., & Loeys, T. (2018). Giving Dyadic Data Analysis Away: A User-Friendly App for Actor-Partner Interdependence Models. Personal Relationships, 25 (1), 103-119. https://doi.org/10.1111/pere.12230.

Examples

APIM_sem(data = acitelli,
        predictor_a = 'Tension_A',
        predictor_p = 'Tension_P',
        outcome_a = 'Satisfaction_A',
        outcome_p = 'Satisfaction_P',
        mod_type = 'simple')
#> lavaan 0.6-18 ended normally after 25 iterations
#> 
#>   Estimator                                         ML
#>   Optimization method                           NLMINB
#>   Number of model parameters                        14
#>   Number of equality constraints                     6
#> 
#>   Number of observations                           296
#>   Number of missing patterns                         1
#> 
#> Model Test User Model:
#>                                                       
#>   Test statistic                                 0.000
#>   Degrees of freedom                                 6
#>   P-value (Chi-square)                           1.000
#> 
#> Model Test Baseline Model:
#> 
#>   Test statistic                               406.856
#>   Degrees of freedom                                 6
#>   P-value                                        0.000
#> 
#> User Model versus Baseline Model:
#> 
#>   Comparative Fit Index (CFI)                    1.000
#>   Tucker-Lewis Index (TLI)                       1.015
#>                                                       
#>   Robust Comparative Fit Index (CFI)             1.000
#>   Robust Tucker-Lewis Index (TLI)                1.015
#> 
#> Loglikelihood and Information Criteria:
#> 
#>   Loglikelihood user model (H0)               -837.957
#>   Loglikelihood unrestricted model (H1)       -837.957
#>                                                       
#>   Akaike (AIC)                                1691.915
#>   Bayesian (BIC)                              1721.438
#>   Sample-size adjusted Bayesian (SABIC)       1696.067
#> 
#> Root Mean Square Error of Approximation:
#> 
#>   RMSEA                                          0.000
#>   90 Percent confidence interval - lower         0.000
#>   90 Percent confidence interval - upper         0.000
#>   P-value H_0: RMSEA <= 0.050                    1.000
#>   P-value H_0: RMSEA >= 0.080                    0.000
#>                                                       
#>   Robust RMSEA                                   0.000
#>   90 Percent confidence interval - lower         0.000
#>   90 Percent confidence interval - upper         0.000
#>   P-value H_0: Robust RMSEA <= 0.050             1.000
#>   P-value H_0: Robust RMSEA >= 0.080             0.000
#> 
#> Standardized Root Mean Square Residual:
#> 
#>   SRMR                                           0.000
#> 
#> Parameter Estimates:
#> 
#>   Standard errors                             Standard
#>   Information                                 Observed
#>   Observed information based on                Hessian
#> 
#> Regressions:
#>                    Estimate  Std.Err  z-value  P(>|z|)
#>   y_a ~                                               
#>     x_a        (a)   -0.375    0.022  -16.824    0.000
#>     x_p        (p)   -0.177    0.022   -7.959    0.000
#>   y_p ~                                               
#>     x_p        (a)   -0.375    0.022  -16.824    0.000
#>     x_a        (p)   -0.177    0.022   -7.959    0.000
#> 
#> Covariances:
#>                    Estimate  Std.Err  z-value  P(>|z|)
#>   x_a ~~                                              
#>     x_p       (cx)    0.149    0.029    5.190    0.000
#>  .y_a ~~                                              
#>    .y_p       (cy)    0.063    0.009    6.872    0.000
#> 
#> Intercepts:
#>                    Estimate  Std.Err  z-value  P(>|z|)
#>     x_a       (mx)    2.431    0.032   75.134    0.000
#>     x_p       (mx)    2.431    0.032   75.134    0.000
#>    .y_a       (my)    4.948    0.084   58.968    0.000
#>    .y_p       (my)    4.948    0.084   58.968    0.000
#> 
#> Variances:
#>                    Estimate  Std.Err  z-value  P(>|z|)
#>     x_a       (vx)    0.471    0.029   16.403    0.000
#>     x_p       (vx)    0.471    0.029   16.403    0.000
#>    .y_a       (ve)    0.145    0.009   15.773    0.000
#>    .y_p       (ve)    0.145    0.009   15.773    0.000
#> 
#> Defined Parameters:
#>                    Estimate  Std.Err  z-value  P(>|z|)
#>     k                 0.473    0.062    7.613    0.000
#>     sum              -0.276    0.017  -16.425    0.000
#>     cont             -0.198    0.029   -6.754    0.000
#>