dataPrep: Reformat a user-provided dataframe in a generic form...

Description Usage Arguments Value

Description

In the dataframe, the partners within each dyad must have the same number of observations (e.g. rows of data), although those can include rows that have missing values (NAs). Each dyad, however, can have it's own unique number of observations.

Usage

1
2
dataPrep(basedata, id, dyad, obs, sysVar, dist, time_name,
  time_lag = NULL, coVar = NULL)

Arguments

basedata

A user-provided dataframe.

id

The name of the column in the dataframe that has the person-level identifier.

dyad

The name of the column in the dataframe that has the dyad-level identifier.

obs

The name of the column in the dataframe that has the time-varying observable (e.g., the variable for which dynamics will be assessed).

sysVar

The name of the column in the dataframe that has the system variable (e.g., something that will be predicted from the dynamics of the system).

dist

The name of the column in the dataframe that has a variable that distinguishes the partners (e.g., sex, mother/daughter, etc) that is numeric and scored 0/1.

time_name

The name of the column in the dataframe that indicates sequential temporal observations.

time_lag

An optional argument for the number of lags for the lagged observable.

Value

The function returns a dataframe that has all the variables needed for rties modeling, each renamed to a generic variable name, which are:


ebmtnprof/qid documentation built on May 13, 2019, 6:08 p.m.