inertia_coordination

Emily Butler,

2019-02-03

As for all rties analyses, the first step for an Inertia-Coordination analysis is to follow the instructions in “overview_data_prep” to visualize and prepare the data. We include only the minimal required steps here:

library(rties)
data1 <- rties_ExampleData_2

The Inertia-Coordination model represents the within-person pattern of inertia, which is defined as the extent to which a person’s state can be predicted from his or her own state at a prior time point, and the between-person pattern of coordination, which is defined as the extent to which one partner’s state can be predicted from their partner’s state either concurrently or time-lagged (Reed, Randall, Post, & Butler, 2013). Specifically, the time-series state variable is predicted by: 1) separate intercepts for each partner, 2) a person’s own state variable at a prior time point, which gives two “inertia” estimates, one for each partner, and 3) the person’s partner’s state variable at the same prior time point, which gives two “coordination” estimates, again one for each partner. This model is identical to the “Stability-Influence” model (Thorson, West & Mendes, 2017), but we prefer the terms “inertia” and “coordination” rather than “stability” and “influence” because they have fewer connotations that may or may not be appropriate for a given research design. The lm model used by the rties functions is:

lm(obs_deTrend ~ -1 + dist0 + dist1 + dist0:obs_deTrend_Lag + dist0:p_obs_deTrend_Lag + dist1:obs_deTrend_Lag + dist1:p_obs_deTrend_Lag, na.action=na.exclude, data=datai)

where “obs_deTrend” is the observed state variable with individual linear trends removed (e.g., it is the residuals from each person’s state variable predicted from time). The “-1” , “dist0” and “dist1” work together to implement a two-intercept model, whereby the overall intercept is omitted and instead separate intercepts are estimated for the level-0 and level-1 of the distinguisher variable provided by the user (for a discussion of this approach see: Kenny, Kashy, & Cook, 2006). The terms “dist0:obs_deTrend_Lag” and “dist1:obs_deTrend_Lag” estimate the inertia parameters for the partners scored 0 and 1 respectively on the distinguishing variable (e.g., “obs_deTrend_Lag” is the person’s own de-trended observed state variable lagged by how ever many steps the user specifies). Similarly, “dist0:p_obs_deTrend_Lag” and “dist1:p_obs_deTrend_Lag” estimate the coordination parameters for the partners scored 0 and 1 respectively on the distinguishing variable (e.g., “p_obs_deTrend_Lag” is the person’s partner’s de-trended observed state variable lagged by how ever many steps the user specifies). The model is estimated separately for each dyad (e.g., “datai” is the data from couple “i”).

If we consider the parameters of the model in isolation from each other, positive inertia estimates imply slower fluctuations of the state variable, while negative inertia estimates imply that the observed variable is oscillating back and forth between each lag (see Figures in overview_data_prep). For the between-person coordination parameters, a positive estimate implies an in-phase pattern, such that when one partner is high on the observed state variable, so is their partner at the specified lag, while a negative parameter implies an anti-phase pattern, such that when one partner is high the other partner is low at the specified lag (Randall, Post, Reed, & Butler, 2013; Reed et al., 2013; Wilson et al., 2018). It is important to realize, however, that the parameters do not act in isolation - they work together as a set to determine potentially complex trajectories for both partners over time. As with any non-linear model, it is impossible to inspect the inertia and coordination parameters and draw any conclusions about the dynamic pattern implied without actually plotting it using the full set of parameter estimates. The rties package provides functions for doing so (see “Plotting the Dynamic Trajectories”).

Sample Size Considerations

There are two sample size considerations for any of the models implemented in rties. The first pertains to the number of observations per dyad that are required, while the second is the number of dyads required. The first consideration comes into play when we estimate the dynamics one dyad at a time. Greater complexity requires finer-grained measurement of time and hence more observations per dyad. One advantage of the Inertia-Coordination model is that it is fairly simple and hence requires relatively few observations per dyad. The exact number will depend on how much variance there is over time, both within-people and between-partners, but it is likely to provide good results with as few as 5 observations per dyad (someone should do a simulation study of this!).

The second sample size consideration comes into play when we use latent profiles based on the estimated dynamic parameters for each dyad to either predict the system variable, or be predicted by it (these steps are described in detail in sections below). In both cases, the system variable can be either a dyadic variable (e.g., both partners have the same score, as in relationship length) or an individual variable (e.g., partners can have different scores, as in age). In the case of predicting a dyadic system variable, a regular regression model is appropriate for normally distributed system variables, or a generalized linear model for non-normal ones (any of the families available for glm can be used). In this case, the shared system variable is predicted by the categorical latent profile membership and you can use your favorite rule of thumb along the lines of “n observations for a one-predictor regression model” to choose your sample size. Alternately, you could conduct a power analysis for the linear (e.g., regular regression) or generalized linear model you choose.

The situation is more complicated when the system variable is assessed at the individual level, or when it is the predictor of the latent profiles. In the former case, the system variable is predicted using a cross-sectional random-intercept dyadic model with the latent profile membership, the distinguisher variable and their interaction as fixed effects. For these models, it should be possible to use the R package simr to estimate the necessary sample size to obtain desired power. In the latter case, profile membership is predicted using either a binomial (for 2 latent profiles) or multinomial (for more than 2 latent profiles) model, with either just the system variable as a predictor (for dyadic system variables), or each partner’s system variable and their interaction as predictors (for individual system variables). For these models, it should be possible to use G-Power, or some other software for logistic and multinomial regression, to assess the needed sample size for a given power level.

Choosing the Lag Length

One complexity in using the Inertia-Coordination model is that the results are highly dependent upon the chosen lag length (for discussion of a similar issue when choosing the measurement interval see Boker & Nesselroade, 2002). This dependence on the lag makes interpretation problematic unless one has a strong theory about the temporal processes at work. At a minimum, it is a good idea to inspect the auto-correlation (relevant to inertia) and cross-correlation (relevant to coordination) plots for the observed state variables. If the state variables are oscillating at all, the auto- and cross- correlations will also oscillate depending on lag. For example, the correlations can vary from negative, to zero, to positive depending on the lag. To facilitate making an informed decision about lag length, rties provides functions to produce auto- and cross- correlation plots. Here we plot a chosen subset of dyads to show the strong impact that is sometimes found due to lag, especially for cross-correlation.

temp <- subset(data1, couple %in% c(2,5,27,31,47,60,103,110))
autoCorPlots(temp, "person","couple","dial","time")

crossCorPlots(temp, "person","couple","dial","time")

In addition to visual inspection of the auto- and cross- correlations, choosing the lag relies on a combination of theory, prior research, and how quickly you expect the phenomenon of interest to be changing (see Thorson, West & Mendes, 2017, for additional discussion). For example, if the process is fairly stable, auto-correlation will be high across a long lag time and will dominate any results, because when estimated with the Inertia-Coordination model, the stronger the autocorrelation is, the weaker the cross-correlation will be. This results from the behavior of multiple regression models, where the coordination parameters can only account for independent variance in the outcome after accounting for inertia. Thus part of the decision depends upon how much of the observed state variables behavior you want to be explained by within-person auto-correlation processes versus how much you prefer to prioritize between-person cross-correlations. Another consideration is how many observation time points there were. For each lag you lose one observation point (e.g., if the lag is two steps, then the parameter estimates will be based on the total number of observations per dyad minus 2). One strength of rties is that it makes it very easy to alter the lag length and observe the impact on the results, which is helpful for developing an intuitive understanding of inertia and coordination.

Assessing Model Fit

Having chosen a lag length, we complete the data preparation process. Here we include the system variable of “empathy” (an individual-level self-report variable assessing how much a person tried to empathize with their partner during the conversation) and choose a lag length of 10 (see “overview_data_prep” for the basis of our decision).

data2 <- dataPrep(data1, "person","couple", "dial","empathy","female","time", time_lag=10)

The next step, which is often neglected in the literature, is to assess how well different variants of the Inertia-Coordination model fit the observed temporal data. Our ultimate goal is to either predict outcomes of interest from the dynamics assessed by the model, or to test whether other variables predict those dynamics. Either way, the results are only meaningful if the Inertia-Coordination model does, in fact, realistically represent the dynamics of the system. We therefore provide a function, “indivInertCoordCompare”“, that fits three versions of the model (inertia-only, coordination-only, inertia and coordination) to each dyad’s data and returns a list that includes: 1) the adjusted R^2 for each dyad for each of the 3 models (“R2inert”, “R2coord” and “R2inertCoord” e.g., how well each model predicts the observed temporal trajectories of the data), and 2) differences between the R2 for each model, where “R2dif_I_C” is the R2 for the inertia-only model minus the coordination-only model, “R2dif_IC_I” (inertia-coordination minus inertia), and “R2dif_IC_C” (inertia-coordination minus coordination-only). The function takes the name of the processed dataframe, here “data2”, and the results can be accessed with the “summary”" function:

compare <- indivInertCoordCompare(data2)
summary(compare$R2inert)
#>      Min.   1st Qu.    Median      Mean   3rd Qu.      Max. 
#> -0.007427  0.085937  0.199565  0.196640  0.281898  0.566880
summary(compare$R2coord)
#>      Min.   1st Qu.    Median      Mean   3rd Qu.      Max. 
#> -0.005545  0.013291  0.046795  0.075084  0.111216  0.379437
summary(compare$R2inertCoord)
#>      Min.   1st Qu.    Median      Mean   3rd Qu.      Max. 
#> -0.007574  0.111837  0.213854  0.217133  0.296475  0.573132
summary(compare$R2dif_IC_I)
#>      Min.   1st Qu.    Median      Mean   3rd Qu.      Max. 
#> -0.001887  0.005316  0.013728  0.020493  0.030963  0.109700

In this example, we see that the full model accounts on average for about 21% of the variance in the observed state variables, while the inertia-only model accounts for almost as much (19%) and the coordination-only model accounts for only 7% on average and adds only about 2% to the inertia-only model when included in the full model. These results suggest that coordination is not important for describing the dynamics of the system, over and above inertia. It is still possible, however, that the small amount of variance explained by coordination may predict system variables, such as relationship quality or health, better than the larger amount of variance explained by inertia.

In addition to the model comparison results, we provide a function, “indivInertCoordPlots”“, to plot the observed state variables for each dyad, superimposed with their model predicted trajectories. The function takes as arguments the name of the processed dataframe, which of the 3 variants of the inertia-coordination model to plot the results for (”inert“,”coord“,”inertCoord“), and optional strings providing labels for the level-0 and level-1 of the distinguishing variable, as well as the name of the observed state variable (default is”observed“) and minimum/maximum values for the y-axis in terms of quantiles (default is the observed minimum and maximum of the state variable). These plots provide a visual tool for assessing model fit at the individual dyad level. The figures can be accessed from the returned list called “plots” and they are also automatically saved as a .pdf file in the working directory (this process takes awhile). The following figures show examples of poor and good fit respectively:

figures <- indivInertCoordPlots(data2, "inertCoord", dist0name="Men", dist1name="Women")

Alt text

Generating Dynamic Parameter Estimates

The next step is to use the function “indivInertCoord” to generate the dynamic parameter estimates for each dyad. The function takes the name of the processed dataframe (“data2” in this example) and the name of the version of the Inertia-Coordination model that you want the parameter estimates for (“inert”, “coord”, or “inertCoord”). It returns: 1) a dataframe containing both the parameter estimates for each dyad and the system variable (called “data”, for using the dynamic parameters to either predict, or be predicted by, the system variable), 2) a dataframe with just the parameter estimates (called “params”, for use in the latent profile analysis), and 3) a vector with the adjusted R^2 for the model fit to each dyad’s data (called R^2; this R^2 information is identical to that returned by indivInertCoordCompare).

ic <- indivInertCoord(data2, "inertCoord")
names(ic)
#> [1] "R2"     "data"   "params"
head(ic$data)
#>       int0     int1   inert0  coord0   inert1   coord1 dyad  id    sysVar
#> 1 -0.00632 -0.01619 -0.07375 0.09917 -0.23438 -0.11653    2   2 0.6666667
#> 2 -0.00632 -0.01619 -0.07375 0.09917 -0.23438 -0.11653    2 502 2.0000000
#> 3  0.00141  0.01266  0.22805 0.15119  0.39254  0.12521    3   3 1.0000000
#> 4  0.00141  0.01266  0.22805 0.15119  0.39254  0.12521    3 503 3.0000000
#> 5  0.02355  0.00336  0.60280 0.05147  0.56849  0.06767    5   5 2.0000000
#> 6  0.02355  0.00336  0.60280 0.05147  0.56849  0.06767    5 505 0.3333333
#>   dist0
#> 1     0
#> 2     1
#> 3     0
#> 4     1
#> 5     0
#> 6     1

In the returned dataframes, “int0” and “int1” are the estimated intercepts for the partner scored 0 amd 1 on the distinguisher respectively (e.g., their estimated state variable at time zero). The variables “inert0” and “inert1” are the inertia estimates for each partner and “coord0” and “coord1” are their coordination estimates. The other variables are the dyad and individual IDs, the partner’s scores on the system variable (self-reported conversation quality in this example), and dist0 is scored 1 for the partner scored 0 on the original distinguishing variable (in this example the men) and scored 0 for the partner scored 1 on the original variable (in this case the women).

Latent Profile Analysis (LPA)

The next step is to use the data generated by “indivInertCoord” as input to a latent profile analysis. Because the models in rties all represent non-linear dynamics, the behavior of the dyadic system cannot be intuited by examining individual parameter estimates from the model. Rather, they operate together as a set to produce potentially complex temporal trajectories of both partner’s state variables (emotional experience in this example). Thus when it comes to using the dynamic parameter estimates to predict, or be predicted by, system variables such as conversation quality, we wish the parameters to be operating as a set, not as isolated individual predictors or outcomes (such as would be the case if we used them as predictors in a regression model). Instead, we use them as input to a latent profile analysis in order to estimate qualitatively distinct groups of dyads based on the dynamics assessed by the Inertia-Coordination model. In other words, we wish to group the dyads based on their similarities and differences in terms of patterns of inertia and coordination.

Prior to conducting the LPA, it is a good idea to look at histograms of the parameter estimates to check that there is adequate variance across dyads for them to be meaningful as input for a latent profile analysis. In addition, LPA can be sensitive to non-normally distributed variables, so caution should be used if some of the parameters are clearly non-Gaussian. This issue is less problematic, however, if you choose the number of profiles a-priori (as we recommend) rather than based purely on fit statistics. In this example, we see there is adequate variance for all parameters and although the are not perfectly normally distributed, they are probably adequate. It would be good for a serious analysis to see how much the results change if they were transformed to be more normally distributed.

icParams <- subset(ic$params, select=c(int0:coord1))
histAll(icParams)

The latent profile analysis makes use of the tidyLPA package and we recommend consulting their documentation for a full understanding. We focus here on its specific use in the context of rties. We first load the tidyLPA package (you will need to install it if you haven’t already) and use the dynamic parameter estimates in “ic$params” as input to the tidyLPA “compare_solutions” function. It takes the name of the dataframe we just created with the parameter estimates and the names of which parameter estimates to include in the analysis. The parameters to be included need to be listed in the same order they are here in order for some of the rties functions to work. The result is a plot showing the BIC fit statistic for various models with various numbers of profiles (see tidyLPA documentation for a full interpretation).

library(tidyLPA)
#> Note that an update to tidyLPA is forthcoming; see vignette('introduction-to-major-changes') for details!
compare_solutions(ic$params, inert1, coord1, coord0, inert0)

The previous output can help to inform decisions about which model and how many profiles to use. We recommend reading some papers on latent profile analysis if this is new to you. In general, we recommend choosing based on a combination of how many dyads are included in each profile (e.g., we prefer solutions where there is at least 10% of the dyads in the smallest profile) and how meaningful the dynamics of each profile are, which can be established by inspecting the model predicted trajectories of the state variable for each profile (described below). We recommend only considering fit statistics to the extent that our chosen model has an adequate fit (e.g., we don’t care if it has the best fit, just an adequate one). Here we choose model 6 with 2 profiles based on a combination of the entropy estimates and the clearly distinguishable dynamics when we plot them later. The next step is to investigate the makeup of the estimated profiles using the “estimate_profiles” function.

lpaStep1 <- estimate_profiles(ic$params, inert1, coord1, coord0, inert0, n_profiles=2, variances="varying", covariances="varying")
#> Fit NA model with 2 profiles.
#> LogLik is 138.738
#> BIC is 150.761
#> Entropy is 0.966
plot_profiles(lpaStep1)

We see from the resulting plot that the profiles are primarily distinguished by “Profile 1” having coordination parameters around zero, while “Profile 2” has positive coordination parameters. There is also a difference in the inertia parameters for the partner scored 1 on the original distinguishing variable (women in our example), with higher inertia for that partner in “Profile 2” than “Profile 1”.

You could repeat the previous steps with different models and numbers of profiles. Once you have chosen the final combination you want to use moving forward, the next step is to run the “estimate_profiles” two more times with different return options in order to collect the information needed for using the latent profiles as either predictors or outcomes of the system variable. Specifically, the object “lpaStep2” below is created using the “return_orig_df=T” argument, while the object “lpaStep3” uses the “to_return=”mclust"" argument. Those objects are then used as input to the rties function “makeLpaData”, along with the dataframe created by the “indivInertCoord” function and the name of the model that generated the estimates (either “inertCoord” or “clo”). The result (called “lpaVars” in this example) contains the needed data (called “profileData”) and parameter estimates (called “profileParams”) for all subsequent steps in an rties analysis.

lpaStep2 <- estimate_profiles(ic$params, inert1, coord1, coord0, inert0, n_profiles= 2, variances="varying", covariances="varying", return_orig_df=T)
#> Fit NA model with 2 profiles.
#> LogLik is 138.738
#> BIC is 150.761
#> Entropy is 0.966

lpaStep3 <- estimate_profiles(ic$params, inert1, coord1, coord0, inert0, n_profiles= 2, variances="varying", covariances="varying", to_return="mclust")
#> Fit NA model with 2 profiles.
#> LogLik is 138.738
#> BIC is 150.761
#> Entropy is 0.966

lpaVars <- makeLpaData(ic$data, lpaStep2, lpaStep3, "inertCoord")

Plotting the Dynamic Trajectories for Each Profile

As described above, to interpret the dynamic parameter estimates obtained from the Inertia-Coordination model (or any other rties model), we need to plot the model predicted temporal trajectories. If plotted directly, the Inertia-Coordination model predicts simple exponential growth or decline, which by itself would not be a good representation of most interpersonal temporal data. For example, the time-series emotional data in our example clearly do not show simple exponential growth/decline, but rather fluctuate up and down over time. The model only becomes a good representation of our data when random noise is added at each temporal step. In other words, local exponential growth/decline becomes a fluctuating trajectory when the system is randomly perturbed at each time step.

In order to visualize the model predicted dynamics, therefore, we provide multiple exemplar plots for each profile (the default is 5 plots for each profile, but this can be changed with the “numPlots” argument), based on the Inertia-Coordination parameter estimates for that profile in combination with random noise at each time step. The “inertCoordPredTraj” function does this and takes as arguments the name of the processed dataframe (“data2” in this example), the 2 dataframes produced by the “makeLpaData” function (“profileData” and “profileParams”), the number of profiles, an optional “time_length” argument that specifies the number of time points to plot across (the default is 20), optional names for the levels of the distinguishing variable and the observed state variable, and an optional argument for the minimum/maximum values for the y-axis in terms of quantiles (default is the observed minimum and maximum of the state variable). We show one of the five random examples for each profile below. From these, we can see that Profile 2 is characterized by larger fluctuations that tend to be in-phase between partners, compared to Profile 1 where fluctuations are smaller and tend to be anti-phase.

profilePlots <- inertCoordPredTraj(origData=data2, lpaData=lpaVars$profileData, lpaParams=lpaVars$profileParams, n_profiles=2, time_length=50, dist0name="men", dist1name="women", obsName="Dial")

Alt text

Predicting the System Variable From the Profiles

The next step in the analysis is to use each dyad’s profile membership to predict the system variable using the “sysVarOut” function. The system variable can be either dyadic (sysVarType = “dyadic”), where both partners have the same score (e.g., relationship length) or individual (sysVarType = “indiv”), where the partners can have different scores (e.g., age). For dyadic system variables, the only predictor is profile membership and the model is a regular regression model since all variables are at the level of the dyad. If the system variable is individual then the model is a random-intercept dyadic model and 3 models are estimated: 1) the main effect of profile membership (“profile”), 2) main effects of profile membership and the distinguishing variable (“profilePlusDist”), and 3) the interaction of profile membership and the distinguishing variable (“profileByDist”). If the system variable is not normally distributed, any of the generalized linear models supported by glm (for dyadic system variables) or glmmPQL (for individual system variables) are available by specifying the “family” distribution.

For normally distributed system variables, the function returns a list including the lm or lme objects containing the full results for each model (called “models”). These results can be inspected using the usual “summary” function and the models can be compared using the “anova” function. Similarly, for non-normal system variables, the function returns a list of the glm or glmmPQL objects containing the full results for the models. By default, the function also displays histograms of the residuals and plots of the predicted values against observed values for each model, but these can be turned off by setting “printPlots=F”. In this example, we find a significant main effect of profile, such that the system variable (empathy) is predicted to be higher for couples with Profile 2, but there is no evidence of differences between men and women (the effect of “distmen” variable) or of an interaction between profile and sex.

sysOut <- sysVarOut(lpaVars$profileData, "indiv", dist0name="men", dist1name="women", sysVarName = "Empathy")

summary(sysOut$models$profile)
#> Linear mixed-effects model fit by maximum likelihood
#>  Data: basedata 
#>      AIC      BIC   logLik
#>   418.83 430.8725 -205.415
#> 
#> Random effects:
#>  Formula: ~1 | dyad
#>         (Intercept)  Residual
#> StdDev:  0.02846063 0.9512747
#> 
#> Fixed effects: sysVar ~ profile 
#>                 Value Std.Error DF  t-value p-value
#> (Intercept) 1.1609660 0.1779932 76 6.522530   0.000
#> profile2    0.4836851 0.1981783 76 2.440656   0.017
#>  Correlation: 
#>          (Intr)
#> profile2 -0.898
#> 
#> Standardized Within-Group Residuals:
#>         Min          Q1         Med          Q3         Max 
#> -2.27135069 -0.67732081  0.02278915  0.72383735  1.93353376 
#> 
#> Number of Observations: 150
#> Number of Groups: 78
summary(sysOut$models$profilePlusDist)
#> Linear mixed-effects model fit by maximum likelihood
#>  Data: basedata 
#>        AIC    BIC    logLik
#>   419.1968 434.25 -204.5984
#> 
#> Random effects:
#>  Formula: ~1 | dyad
#>         (Intercept) Residual
#> StdDev:   0.0303452 0.946047
#> 
#> Fixed effects: sysVar ~ profile + dist 
#>                  Value Std.Error DF   t-value p-value
#> (Intercept)  1.2634056 0.1951254 76  6.474839  0.0000
#> profile2     0.4794448 0.1978126 76  2.423733  0.0177
#> distmen     -0.1980300 0.1560827 71 -1.268750  0.2087
#>  Correlation: 
#>          (Intr) profl2
#> profile2 -0.825       
#> distmen  -0.414  0.017
#> 
#> Standardized Within-Group Residuals:
#>          Min           Q1          Med           Q3          Max 
#> -2.392130640 -0.630775846  0.002581618  0.832617897  2.045312690 
#> 
#> Number of Observations: 150
#> Number of Groups: 78
summary(sysOut$models$profileByDist)
#> Linear mixed-effects model fit by maximum likelihood
#>  Data: basedata 
#>       AIC      BIC    logLik
#>   421.173 439.2368 -204.5865
#> 
#> Random effects:
#>  Formula: ~1 | dyad
#>         (Intercept)  Residual
#> StdDev:  0.03010837 0.9459793
#> 
#> Fixed effects: sysVar ~ profile * dist 
#>                       Value Std.Error DF   t-value p-value
#> (Intercept)       1.2382093 0.2563933 76  4.829336  0.0000
#> profile2          0.5104233 0.2842971 76  1.795387  0.0766
#> distmen          -0.1493204 0.3563262 70 -0.419055  0.6765
#> profile2:distmen -0.0603712 0.3966925 70 -0.152186  0.8795
#>  Correlation: 
#>                  (Intr) profl2 distmn
#> profile2         -0.902              
#> distmen          -0.719  0.648       
#> profile2:distmen  0.646 -0.716 -0.898
#> 
#> Standardized Within-Group Residuals:
#>          Min           Q1          Med           Q3          Max 
#> -2.365673892 -0.604187524  0.006926966  0.838905822  2.020595699 
#> 
#> Number of Observations: 150
#> Number of Groups: 78
anova(sysOut$models$profile, sysOut$models$profilePlusDist)
#>                               Model df      AIC      BIC    logLik   Test
#> sysOut$models$profile             1  4 418.8300 430.8725 -205.4150       
#> sysOut$models$profilePlusDist     2  5 419.1968 434.2500 -204.5984 1 vs 2
#>                                L.Ratio p-value
#> sysOut$models$profile                         
#> sysOut$models$profilePlusDist 1.633143  0.2013

Predicting Profile Membership From the System Variable

The last step in the analysis is to turn the direction of prediction around and use the system variable to predict couples’ profile membership. The function “sysVarIn” accomplishes this. It takes as arguments the name of the dataframe containing the profileData (created by the “makeLpaData” function), whether the system variable is “dyadic” or “individual”, the number of profiles, and optional names for the levels of the distinguisher and the system variable. If there are 2 profiles, then binomial regression models are used. If there are more than 2 profiles then multinomial regression is used. For dyadic system variables, a couple’s shared score is the only predictor of their profile membership (called “sysVar”). For individual system variables, two models are tested, one with the main effects of both partner’s system variable (“sysVarMain”) and one with the main effects and their interaction (“sysVarInteract”). In both cases an intercept-only model is included as a comparison point (called “base”).

The function returns a list of the full model results and by default produces plots of profile membership against the system variable(s), but these can be turned off by setting printPlots=F. The results below show weak evidence for empathy predicting profile membership, such that higher empathy for either partner predicts more likelihood of being in Profile 2. Although neither effect is large enough to be significant, exponentiating the parmeter estimates translates them into odds-ratios (since this is an example of logistic regression) and shows that they are 1.7 and 1.9, which means that for every one point increase in empathy, which is about a 25% increase since empathy is on a -1 to 3 scale, the probability of being in Profile 2 almost doubles.

sysIn <- sysVarIn(lpaVars$profileData, "indiv", n_profiles=2, dist0name="women", dist1name="men", sysVarName="empathy")

summary(sysIn$models$sysVarMain)
#> 
#> Call:
#> glm(formula = profileN ~ sysVar0 + sysVar1, family = "binomial", 
#>     data = basedata)
#> 
#> Deviance Residuals: 
#>     Min       1Q   Median       3Q      Max  
#> -2.2951   0.3167   0.5179   0.7009   1.2574  
#> 
#> Coefficients:
#>               Estimate Std. Error z value Pr(>|z|)  
#> Intercept      -0.1862     0.6910  -0.269   0.7876  
#> empathy_women   0.5348     0.3285   1.628   0.1035  
#> empathy_men     0.6596     0.3444   1.915   0.0555 .
#> ---
#> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> 
#> (Dispersion parameter for binomial family taken to be 1)
#> 
#>     Null deviance: 70.935  on 71  degrees of freedom
#> Residual deviance: 64.361  on 69  degrees of freedom
#>   (6 observations deleted due to missingness)
#> AIC: 70.361
#> 
#> Number of Fisher Scoring iterations: 5
summary(sysIn$models$sysVarInteract)
#> 
#> Call:
#> glm(formula = profileN ~ sysVar0 * sysVar1, family = "binomial", 
#>     data = basedata)
#> 
#> Deviance Residuals: 
#>     Min       1Q   Median       3Q      Max  
#> -2.5518   0.1867   0.4734   0.7337   1.0204  
#> 
#> Coefficients:
#>                           Estimate Std. Error z value Pr(>|z|)
#> Intercept                  0.64648    0.89510   0.722    0.470
#> empathy_women             -0.02293    0.47849  -0.048    0.962
#> empathy_men                0.02489    0.53716   0.046    0.963
#> empathy_women:empathy_men  0.48403    0.31420   1.541    0.123
#> 
#> (Dispersion parameter for binomial family taken to be 1)
#> 
#>     Null deviance: 70.935  on 71  degrees of freedom
#> Residual deviance: 61.795  on 68  degrees of freedom
#>   (6 observations deleted due to missingness)
#> AIC: 69.795
#> 
#> Number of Fisher Scoring iterations: 5
exp(coef(sysIn$models$sysVarMain))
#>     Intercept empathy_women   empathy_men 
#>     0.8301299     1.7071456     1.9339243

In summary, taken together, the results from this example provide some evidence that the dynamics represented by the Inertia-Coordination model are associated with empathy, such that higher-amplitude in-phase emotional oscillations are associated with more empathy.