SexRegress: Performing linear regression analysis with quantitative response variable.
Source:R/GXwasR_main_functions.R
SexRegress.Rd
This function could be used to check association of two variables. For instance, PRS with sex.
Arguments
- fdata
R dataframe object. The column with header
response
should contain the response variable. All other column are the regressor.- regressor_index
Integer value, specifying the column number of the main regressor variable.
- response_index
Integer value, specifying the column number of the response variable.
Value
Numeric value containing the regression estimate ("Estimate"), standard error ("Std. Error"), statistics ("t value") and p-value (\(Pr(>|t|)\))
Examples
data("Regression_Ex", package = "GXwasR")
fdata <- Regression_Ex
fdata$SEX <- as.factor(as.character(fdata$SEX))
response_index <- 1
regressor_index <- 2
x <- SexRegress(fdata, regressor_index, response_index)