actorPartnerDataTime {rties} | R Documentation |
Takes individual repeated measures data from dyads and turns it into actor-partner format.
Description
Need to use a person ID that has first person in dyad numbered 1-n and second person in dyad = ID + some number larger than the number of dyads. Need dyad ID numbered same as for person ID for the first person in the dyad. Both members in each dyad need to have the same number of rows (rows of missing data are ok).
Usage
actorPartnerDataTime(basedata, dyadId, personId)
Arguments
basedata |
A dataframe with repeated measures dyadic data |
dyadId |
The name of variable indicating dyad ID. |
personId |
The name of the variable indicating peron ID. |
Value
A dataframe in actor-partner format.
Examples
data <- rties_ExampleDataShort
newData <- actorPartnerDataTime(basedata=data, dyadId="couple", personId="couple")
head(newData)
[Package rties version 5.0.0 Index]