R/func_discord_regression.R
discord_regression.Rd
Perform a Linear Regression within the Discordant Kinship Framework
discord_regression( data, outcome, predictors, id = "extended_id", sex = "sex", race = "race", pair_identifiers = c("_s1", "_s2") )
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 pair. |
A tidy dataframe containing the model metrics via the tidy function.
discord_regression(data = sample_data, outcome = "height", predictors = "weight", pair_identifiers = c("_s1", "_s2"), sex = NULL, race = NULL)#> # A tibble: 4 x 5 #> term estimate std.error statistic p.value #> <chr> <dbl> <dbl> <dbl> <dbl> #> 1 (Intercept) 0.895 0.00638 140. 0. #> 2 height_mean 0.0809 0.00698 11.6 5.83e-31 #> 3 weight_diff 0.0506 0.00505 10.0 1.42e-23 #> 4 weight_mean -0.0582 0.00764 -7.61 2.77e-14