mlogreg {logicFS} | R Documentation |
Performs a multinomial logic regression for a nominal response by fitting a logic regression model (with logit as link function) for each of the levels of the response except for the level with the smallest value which is used as reference category.
## S3 method for class 'formula': mlogreg(formula, data, recdom = TRUE, ...) ## Default S3 method: mlogreg(x, y, ntrees = 1, nleaves = 8, anneal.control = logreg.anneal.control(), rand = NA, ...)
formula |
an object of class formula describing the model that should be
fitted |
data |
a data frame containing the variables in the model. Each column of data
must correspond to a binary variable (coded by 0 and 1) or a factor (for details on factors, see
recdom ) except for the column comprising
the response, and each row to an observation. The response must be a categorical variable
with less than 10 levels. This response can be either a factor or of type numeric or
character |
recdom |
a logical value or vector of length ncol(data) comprising whether a SNP should
be transformed into two binary dummy variables coding for a recessive and a dominant effect.
If TRUE (logical value), then all factors (variables) with three levels will be coded by two dummy
variables as described in make.snp.dummy . Each level of each of the other factors
(also factors specifying a SNP that shows only two genotypes) is coded by one indicator variable.
If FALSE (logical value),
each level of each factor is coded by an indicator variable. If recdom is a logical vector,
all factors corresponding to an entry in recdom that is TRUE are assumed to be SNPs
and transformed into the two binary variables described above. Each variable that corresponds
to an entry of recdom that is TRUE (no matter whether recdom is a vector or a value)
must be coded by the integers 1 (coding for the homozygous reference genotype), 2 (heterozygous),
and 3 (homozygous variant) |
x |
a matrix consisting of 0's and 1's. Each column must correspond to a binary variable and each row to an observation |
y |
either a factor or a numeric or character vector specifying the values of the response.
The length of y must be equal to the number of rows of x |
ntrees |
an integer indicating how many trees should be used in the logic regression models.
For details, see logreg in the LogicReg package |
nleaves |
a numeric value specifying the maximum number of leaves used
in all trees combined. See the help page of the function logreg in the LogicReg
package for details |
anneal.control |
a list containing the parameters for simulated annealing.
For details, see the help page of logreg.anneal.control in the LogicReg package |
rand |
numeric value. If specified, the random number generator will be set into a reproducible state |
... |
for the formula method, optional parameters to be passed to the low level function
mlogreg.default . Otherwise, ignored |
An object of class mlogreg
composed of
model |
a list containing the logic regression models |
data |
a matrix containing the binary predictors |
cl |
a vector comprising the class labels |
ntrees |
a numeric value naming the maximum number of trees used in the logic regressions |
nleaves |
a numeric value comprising the maximum number of leaves used in the logic regressions |
Holger Schwender, holger.schwender@udo.edu
Holger Schwender (2007). Measuring the Importances of Genotypes and Sets of Single Nucleotide Polymorphisms. Technical Report, SFB 475, Department of Statistics, University of Dortmund. Appears soon.
predict.mlogreg
, logic.bagging
, logicFS