Description Usage Arguments Value Examples
View source: R/degree.df.maker.R
Creates a dataframe for the degree distribution of persons specified from the
dataset produced by agemix.df.maker
. This function allows users
to specify whether they want new relationships or ongoing relationships among
a specified age group, gender, or HIV status of persons in the dataset.
1 2 3 | degree.df.maker(df = rels.episodes.df, agegroup = c(15, 30),
hivstatus = 0, survey.time = 40, window.width = 1,
gender.degree = "female", only.new = TRUE)
|
df |
The dataframe that is produced by |
agegroup |
Boundaries of the age group (lower bound <= age < upper bound) that should be retained. Should be expressed as a vector of two integers. e.g. c(15, 30) |
hivstatus |
HIV status at the time of the survey. Options are: 0 = only HIV-negative, 1 = only HIV-positive, 2 = all |
survey.time |
Numeric integer representing the time point of the cross-sectional glance at the data |
window.width |
Numeric integer representing how long before the cross-sectional glance should you look at the data. E.g 1 year before the survey |
gender.degree |
The gender or the persons in the data. c("male", "female") |
only.new |
Logical indicator. If TRUE, only relationships that were newly started during window.width are counted (i.e. the individual was NEVER in a relationship with these partners before the start of the window). If FALSE, all relationships that were ongoing at some point during the window.width are counted. |
A dataframe that has the columns "ID" and "Degree"
1 2 3 4 5 | cfg <- list()
modeloutput <- RSimpactCyan::simpact.run(configParams = cfg, destDir = "temp")
dl <- readthedata(modeloutput)
rels.episodes.df <- agemix.df.maker(datalist = dl)
degree.df <- degree.df.maker(df = rels.episodes.df, agegroup = c(20, 30), hivstatus = 1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.