The function estimates multivariate (adjusted) odds ratios (ORs) with 95% confidence intervals (CIs) for all the genetic and non-genetic variables in the risk model.
Name of logistic regression model that can be fitted using
Name of the output file in which the multivariate
ORs will be saved. If no directory is specified, the file is
saved in the working directory as a txt file.
The function requires that first a logistic regression
model is fitted either by using
GLM function or the function
fitLogRegModel. In addition to the multivariate ORs,
the function returns summary statistics of model performance, namely the Brier
score and the Nagelkerke's R^2 value.
The Brier score quantifies the accuracy of risk predictions by comparing
predicted risks with observed outcomes at individual level (where outcome
values are either 0 or 1). The Nagelkerke's R^2 value indicates the percentage of variation
of the outcome explained by the predictors in the model.
The function returns:
OR with 95% CI and corresponding p-values for each predictor in the model
Nagelkerke's R^2 value
Brier GW. Verification of forecasts expressed in terms of probability. Monthly weather review 1950;78:1-3.
Nagelkerke NJ. A note on a general definition of the coefficient of determination. Biometrika 1991;78:691-692.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
# specify dataset with outcome and predictor variables data(ExampleData) # specify column number of outcome variable cOutcome <- 2 # specify column numbers of non-genetic predictors cNonGenPred <- c(3:10) # specify column numbers of non-genetic predictors that are categorical cNonGenPredCat <- c(6:8) # specify column numbers of genetic predictors cGenPred <- c(11,13:16) # specify column numbers of genetic predictors that are categorical cGenPredCat <- c(0) # fit logistic regression model riskmodel <- fitLogRegModel(data=ExampleData, cOutcome=cOutcome, cNonGenPreds=cNonGenPred, cNonGenPredsCat=cNonGenPredCat, cGenPreds=cGenPred, cGenPredsCat=cGenPredCat) # obtain multivariate OR(95% CI) for all predictors of the fitted model ORmultivariate(riskModel=riskmodel)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.