Package: rties 5.0.0

rties: Modeling Interpersonal Dynamics

The name of this package grew out of our research on temporal interpersonal emotion systems (TIES), hence 'rties'. It provides tools for using a set of models to investigate temporal processes in bivariate (e.g., dyadic) systems. The general approach is to model, one dyad at a time, the dynamics of a variable that is assessed repeatedly from both partners, extract the parameter estimates for each dyad, and then use those parameter estimates as input to a latent profile analysis to extract groups of dyads with qualitatively distinct dynamics. Finally, the profile memberships can be used to either predict, or be predicted by, another variable of interest. Currently, 2 models are supported: 1) inertia-coordination, and 2) a coupled-oscillator. Extended documentation is provided in vignettes. Theoretical background can be found in Butler (2011) <doi:10.1177/1088868311411164> and Butler & Barnard (2019) <doi:10.1097/PSY.0000000000000703>.

Authors:Emily Butler [aut, cre], Steven Boker [ctb]

rties_5.0.0.tar.gz
rties_5.0.0.zip(r-4.5)rties_5.0.0.zip(r-4.4)rties_5.0.0.zip(r-4.3)
rties_5.0.0.tgz(r-4.4-any)rties_5.0.0.tgz(r-4.3-any)
rties_5.0.0.tar.gz(r-4.5-noble)rties_5.0.0.tar.gz(r-4.4-noble)
rties_5.0.0.tgz(r-4.4-emscripten)rties_5.0.0.tgz(r-4.3-emscripten)
rties.pdf |rties.html
rties/json (API)

# Install 'rties' in R:
install.packages('rties', repos = c('https://ebmtnprof.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/ebmtnprof/rties/issues

Datasets:

On CRAN:

33 exports 11 stars 1.76 score 91 dependencies 1 mentions 16 scripts 143 downloads

Last updated 2 years agofrom:fae5652359. Checks:ERROR: 7. Indexed: yes.

TargetResultDate
Doc / VignettesFAILSep 05 2024
R-4.5-winERRORSep 05 2024
R-4.5-linuxERRORSep 05 2024
R-4.4-winERRORSep 05 2024
R-4.4-macERRORSep 05 2024
R-4.3-winERRORSep 05 2024
R-4.3-macERRORSep 05 2024

Exports:actorPartnerDataCrossactorPartnerDataTimeautoCorPlotscloPlotTrajcloResidscrossCorPlotsdataPrepdyadByContextestDerivshistAllindivCloindivCloCompareindivCloPlotsindivInertCoordindivInertCoordCompareindivInertCoordPlotsinertCoordPlotTrajinertCoordResidsinspectProfilesmakeBiVarDatamakeCrossCorBiVarmakeCrossCorDyadicmakeFullDataplotDataByProfileplotRawremoveDyadssmoothDatasysVarInsysVarInPlotssysVarInResultssysVarOutsysVarOutPlotssysVarOutResults

Dependencies:askpassbackportsbootbroombroom.mixedcellrangerclassclicodacodetoolscolorspacecpp11crayoncurldata.tableDataCombineDescToolsdeSolvedigestdplyre1071Exactexpmfansifarverforcatsfurrrfuturegenericsggplot2gldglobalsgluegridExtragtablehmshttrinteractionsisobandjsonlitejtoolslabelinglatticelifecyclelistenvlme4lmommagrittrMASSMatrixmclustmgcvmimeminqamunsellmvtnormnlmenloptrnnetopensslpanderparallellypillarpkgconfigplyrprettyunitsprogressproxypurrrR6RColorBrewerRcppRcppEigenreadxlrematchrlangrootSolverstudioapisandwichscalesstringistringrsystibbletidyrtidyselectutf8vctrsviridisLitewithrzoo

Readme and manuals

Help Manual

Help pageTopics
Takes individual cross-sectional data from dyads and turns it into actor-partner format.actorPartnerDataCross
Takes individual repeated measures data from dyads and turns it into actor-partner format.actorPartnerDataTime
Produces auto-correlation plots of the observed state variable for lags of -+ 20 time steps for each dyad.autoCorPlots
Provides the equation for a coupled oscillator model for the differential equation solver (ode) to plotcloCoupledOde
Plots the bivariate state variable's clo model-predicted temporal trajectories for each latent profile of clo parameters.cloPlotTraj
Produces histograms of the residuals from the oscillator model for each dyad.cloResids
Provides the equation for an un-coupled oscillator model for the differential equation solver (ode) to plotcloUncoupledOde
Produces cross-correlation plots of the observed state variable for lags of -+ 20 time steps for each dyad.crossCorPlots
Reformat a user-provided dataframe in a generic form appropriate for _rties_ modelingdataPrep
Creates variables indicating dyad by context membership (dyadContext) and person by context (personContext) membership. These are renamed by the dataPrep function into "dyad" and "person," which can be used as normal for all other rties functions that use the dataframe produced by dataPrep. Other functions that use the dataframe prior to the dataPrep step will need to use the dyadContext and personContext variables instead.dyadByContext
Produces plots for sysVarIn when sysVar is dyadic.dyadic
Estimates first and second derivatives of an oberved state variableestDerivs
Histograms for all numeric variables in a dataframe.histAll
Produces plots for sysVarIn when sysVar is categorical and there are 2 profilesindiv2profilesCat
Produces plots for sysVarIn when sysVar is continuous and there are 2 profilesindiv2profilesCont
Produces plots for sysVarIn when sysVar is categorical and there are 3 profilesindiv3profilesCat
Produces plots for sysVarIn when sysVar is continuous and there are 3 profilesindiv3profilesCont
Produces plots for sysVarIn when sysVar is categorical and there are 4 profilesindiv4profilesCat
Produces plots for sysVarIn when sysVar is continuous and there are 4 profilesindiv4profilesCont
Estimates either an uncoupled or coupled oscillator model for each dyad.indivClo
Compares model fit for the uncoupled and coupled oscillator for each dyad's state trajectories using an R-square comparison.indivCloCompare
Produces plots of either an uncoupled or coupled oscillator model-predicted trajectories overlaid on raw data for each dyad.indivCloPlots
Estimates versions of the inertia-coordination model for each dyad.indivInertCoord
Compares model fit for the inertia-only, coordination-only and full inertia-coordination model for each dyad's state trajectories using an R-square comparison.indivInertCoordCompare
Produces plots of the inertia-coordination model-predicted trajectories overlaid on raw data for each dyad.indivInertCoordPlots
Plots the bivariate state variables' model-predicted temporal trajectories for each latent profile of inertia-coordination parameters.inertCoordPlotTraj
Produces histograms of the residuals from the inertia-coordination model for each dyad.inertCoordResids
Provides information to help decide how many profiles to use for subsequent rties analyses.inspectProfiles
Takes typical long-format time-nested-in-person data, and stacks two user-chosen observed variables on top of each other so they can be treated as "bivariate" within person. In other words, two time-series variables from each person are stacked on top of each other, forming a bivariate pair of variables within person (e.g., time in variable in person).makeBiVarData
Takes typical time-series wide-format data (e.g., multiple time-varying variables for each person in wide format) and calculates cross-correlations for two user-specified variables within a specified maximum number of lags. It returns a dataframe with the largest absolute cross-correlation and its lag added for each person (e.g., it returns either the most negative or most positive cross-correlation, whichever is larger in absolute terms - the sign is retained).makeCrossCorBiVar
Calculates cross-correlations for a variable that is nested by person within dyad (e.g. it is the same variable for both partners). It returns a dataframe with either: 1) if "time_lag" is null, the largest absolute cross-correlation and its lag added for each dyad (e.g., it returns either the most negative or most positive cross-correlation, whichever is larger in absolute terms - the sign is retained), or 2) if "time_lag is specified, the cross-correlations for each dyad at that lag.makeCrossCorDyadic
Create a distinguishing variable (called "dist") for non-distinguishable dyads by assigning the partner who is lower on a chosen variable a 0 and the partner who is higher on the variable a 1.makeDist
Combines profile membership data from the latent profile analysis with other data for using the profile membership to predict and be predicted by the system variable.makeFullData
A helper function for makeCrossCorrMax_Min_CCF_Signed
Plots of de-trended observed variable over time, with dyads separated into groups based on LPA profile membership.plotDataByProfile
Plots of observed variable over time by dyad.plotRaw
Remove data for specified dyads from a dataframeremoveDyads
Data for demonstrating rties models.rties_ExampleData_Demo
Data for examples in the vignettes.rties_ExampleDataFull
Data for the function examples.rties_ExampleDataShort
A helper function for makeCrossCorBiVarsignAbsMaxCC
Smooth one column of a dataframe that has time nested in people (e.g., the function is applied one person at a time) with a user specified smoothing windowsmoothData
Provides results for predicting couples' latent profile membership from the system variable.sysVarIn
Produces plots for interpreting the results from sysVarIn.sysVarInPlots
Produces results from sysVarIn.sysVarInResults
Provides results for predicting the system variable from the latent profiles of the dynamic parameters.sysVarOut
Produces plots for interpreting the results from sysVarIn.sysVarOutPlots
Produces results from sysVarOut.sysVarOutResults