Perform a Linear Regression within the Discordant Kinship Framework
discord_regression(
data,
outcome,
predictors,
demographics = NULL,
id = NULL,
sex = "sex",
race = "race",
pair_identifiers = c("_s1", "_s2"),
data_processed = FALSE,
coding_method = "none",
fast = TRUE
)discord_within_model(
data,
outcome,
predictors,
demographics = NULL,
id = NULL,
sex = "sex",
race = "race",
pair_identifiers = c("_s1", "_s2"),
data_processed = FALSE,
coding_method = "none",
fast = TRUE
)
Resulting `lm` object from performing the discordant regression.
The data set with kinship pairs
A character string containing the outcome variable of interest.
A character vector containing the column names for predicting the outcome. Can be NULL if no predictors are desired.
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".
Default's to NULL. If supplied, must specify the column name corresponding to unique kinship pair identifiers.
A character string for the sex column name.
A character string for the race column name.
A character vector of length two that contains the variable identifier for each kinship pair. Default is c("_s1","_s2").
Logical operator if data are already preprocessed by discord_data , default is FALSE
A character string that indicates what kind of additional coding schemes should be used. Default is none. Other options include "binary" and "multi".
Logical. If TRUE, uses a faster method for data processing.
discord_regression(
data = data_sample,
outcome = "height",
predictors = "weight",
pair_identifiers = c("_s1", "_s2"),
sex = NULL,
race = NULL
)
Run the code above in your browser using DataLab