Usage
"mlogreg"(formula, data, recdom = TRUE, ...)
"mlogreg"(x, y, ntrees = 1, nleaves = 8, anneal.control = logreg.anneal.control(), select = 1, rand = NA, ...)
Arguments
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.
select
numeric value. Either 0 for a stepwise greedy selection (corresponds to select = 6
in logreg
) or 1 for simulated annealing.
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.