agemix.rels.df.maker: Create dataframe of relationships for agemixing analysis.

Description Usage Arguments Value Examples

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

Description

Produces a dataframe of relationships from the dataframe of relationship episodes created by agemix.episodes.df.maker. The user specifies a time point, time window, and age group for which they would like to obtain this dataframe. This dataframe can then be used as the input for fitting linear mixed effect models that describe the agemixing pattern with amp.modeller.

Usage

1
2
agemix.rels.df.maker(dataframe, agegroup, timepoint, timewindow,
  start = FALSE)

Arguments

dataframe

The dataframe that is produced by agemix.episodes.df.maker

agegroup

Boundaries of the age group that should be retained, e.g. c(15, 30). The interval is closed on the left and open on the right.

timepoint

Point in time during the simulation to be used in the calculation.

timewindow

The length of time before the timepoint for which relationships should be included, e.g. 1, representing one year before the timepoint. This should be a whole number.

start

This is a logical indicating that only relationships starting after the beginning of the window should be used. If start = FALSE relationships could start before the time window. This is the default.

Value

returns a dataframe of relationships

Examples

1
2
3
data(persreldf)
agemix.rels.df <- agemix.rels.df.maker(dataframe = persreldf, agegroup = c(15, 30),
timewindow = 1, timepoint = 30, start = FALSE)

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