agemix.episodes.df.maker: Create dataframe of relationship episodes for agemixing...

Description Usage Arguments Details Value Examples

View source: R/agemix.episodes.df.maker.R

Description

Produces a dataframe of relationship episodes from list created by readthedata.

Usage

1

Arguments

datalist

The list object that is produced by readthedata

Details

The resulting dataframe is in a long format where each row/observation represents an episode from each relationship. Each relationship episode is represented twice: once for each man in the dataset who was the male partner in that relationship, and once for each woman who was the female partner in the relationship. This allows the user to conduct stratified analyses based on gender. For relationships where there is more than one episode, there will be multiple rows.

Value

A dataframe, with the following additional columns generated:

relid

Unique relationship identier. It combines the unique ID for the male parter in the relationship first, and the female partner second.

episodeorder

This indicates the order in which the episodes occured.

ageepisform

This indicates the age that the person was when the episode was formed.

agerelform

The age of the person when when the relationship began. In other words, the age at the first episode.

pagerelform

This is the age of the partner when the relationship began.

Examples

1
2
3
4
cfg <- list()
modeloutput <- RSimpactCyan::simpact.run(configParams = cfg, destDir = "temp")
dl <- readthedata(modeloutput)
agemix.df <- agemix.episodes.df.maker(datalist = dl)

wdelva/RSimpactHelp documentation built on Dec. 26, 2019, 3:42 a.m.