Function to compute univariate ORs for genetic predictors.
The function computes the univariate ORs with 95% CIs for genetic predictors.
Data frame or matrix that includes the outcome and predictors variables.
Column number of the outcome variable.
Column numbers of genetic variables for which the ORs are calculated.
Name of the output file in which the univariate ORs
and frequencies per genotype will be saved. The file is saved in the working directory as
a txt file. When no
Name of the output file in which the univariate ORs and
frequencies per allele will be saved. The file is saved in the working
directory as a txt file. When no
The function computes the univariate ORs with 95% CIs for the specified
genetic variants both per allele and per genotype. The ORs are saved with the data from which they are
calculated. Genotype frequencies are provided for
persons with and without the outcome
of interest. The genotype or allele that is coded as
'0' is considered
as the reference to computes the ORs.
The function returns two different tables. One table contains genotype frequencies and univariate ORs with 95% CIs and the other contains allele frequencies and univariate ORs with 95% CIs.
1 2 3 4 5 6 7 8 9 10
# specify dataset with outcome and predictor variables data(ExampleData) # specify column number of the outcome variable cOutcome <- 2 # specify column numbers of genetic predictors cGenPreds <- c(11:13,16) # compute univariate ORs ORunivariate(data=ExampleData, cOutcome=cOutcome, cGenPreds=cGenPreds, filenameGeno="GenoOR.txt", filenameAllele="AlleleOR.txt")
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.