indivInertCoordPlots: Produces plots of the inertia-coordination model-predicted...

Description Usage Arguments Value Examples

View source: R/inertCoord.R

Description

The observed state variables (with linear trends removed) are predicted from one of the 3 versions of the inertia-coordination model (inertia only, "inert"; coordination only, "coord"; full inertia-coordination, "inertCoord") for each dyad individually. The predicted trajectories are plotted overlaid on the observed trajectories.

Usage

1
2
3
4
5
6
7
8
9
indivInertCoordPlots(
  prepData,
  whichModel,
  dist0name = NULL,
  dist1name = NULL,
  plot_obs_name = NULL,
  minMax = NULL,
  printPlots = T
)

Arguments

prepData

A dataframe that was produced with the "dataPrep" function.

whichModel

Whether the model to be estimated is the inertia only model ("inert"), the coordination only model ("coord"), or the full inertia-coordination model ("inertCoord").

dist0name

An optional name for the level-0 of the distinguishing variable to appear on plots (e.g., "Women").

dist1name

An optional name for the level-1 of the distinguishing variable to appear on plots (e.g., "Men").

plot_obs_name

An optional name for the observed state variable to appear on plots (e.g., "Emotional Experience").

minMax

An optional vector with desired minimum and maximum quantiles to be used for setting the y-axis range on the plots, e.g., minMax <- c(.1, .9) would set the y-axis limits to the 10th and 90th percentiles of the observed state variables. If not provided, the default is to use the minimum and maximum observed values of the state variables.

printPlots

If true (the default) plots are displayed on the screen.

Value

A list with the plots of the predicted values against the observed values for each dyad.

Examples

1
2
3
4
5
data <- rties_ExampleDataShort
newData <- dataPrep(basedata=data, dyadId="couple", personId="person", 
obs_name="dial", dist_name="female", time_name="time", time_lag=2)
temp <- newData[newData$dyad < 5, ]
plots <- indivInertCoordPlots(prepData=temp, whichModel="inertCoord")

rties documentation built on July 2, 2020, 4:11 a.m.