The function fits a standard GLM function for the logistic regression model.
1 2  fitLogRegModel(data, cOutcome, cNonGenPreds, cNonGenPredsCat,
cGenPreds, cGenPredsCat)

data 
Data frame or matrix that includes the outcome and predictor variables. 
cOutcome 
Column number of the outcome variable. 
cNonGenPreds 
Column numbers of the nongenetic predictors that are
included in the model. An example to denote column numbers is

cNonGenPredsCat 
Column numbers of the nongenetic predictors that
are entered as categorical variables in the model. When nongenetic
predictors are not specified as being categorical they are treated as
continuous variables in the model. If no nongenetic predictors are
categorical, denote 
cGenPreds 
Column numbers of the genetic predictors or genetic risk score.
Denote 
cGenPredsCat 
Column numbers of the genetic predictors that are entered as categorical variables in the model. When SNPs are considered as categorical, the model will estimate effects per genotype. Otherwise, SNPs are considered as continuous variables for which the model will estimate an allelic effect. Choose c(0) when no genetic predictors are considered as categorical or when genetic predictors are entered as a risk score into the model. 
The function fits a standard GLM function for the logistic regression model.
This function can be used to construct a logistic regression model based on genetic and nongenetic
predictors. The function also allows to enter the genetic predictors
as a single risk score. For that purpose, the function requires that
the dataset additionally includes the risk score.
A new dataset can be constructed using
"NewExampleData < cbind(ExampleData,riskScore)
".
The genetic risk scores can be obtained
using the function riskScore
in this package or be
imported from other methods.
No value returned.
predRisk
, ORmultivariate
, riskScore
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 nongenetic predictors
cNonGenPred < c(3:10)
# specify column numbers of nongenetic 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)
# show summary details for the fitted risk model
summary(riskmodel)

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.