discord_data {discord} | R Documentation |
Restructure Data to Determine Kinship Differences
Description
Restructure Data to Determine Kinship Differences
Usage
discord_data(
data,
outcome,
predictors,
id = "extended_id",
sex = "sex",
race = "race",
pair_identifiers,
demographics = "both"
)
Arguments
data |
A data frame. |
outcome |
A character string containing the outcome variable of interest. |
predictors |
A character vector containing the column names for predicting the outcome. |
id |
A unique kinship pair identifier. |
sex |
A character string for the sex column name. |
race |
A character string for the race column name. |
pair_identifiers |
A character vector of length two that contains the variable identifier for each kinship p |
demographics |
Indicator variable for if the data has the sex and race demographics. If both are present (default, and recommended), value should be "both". Other options include "sex", "race", or "none". |
Value
A data frame that contains analyzable, paired data for performing kinship regressions.
Examples
discord_data(data = sample_data,
outcome = "height",
predictors = "weight",
pair_identifiers = c("_s1", "_s2"),
sex = NULL,
race = NULL,
demographics = "none")
[Package discord version 1.1.0 Index]