Description Usage Arguments Value Author(s) See Also Examples
DMR4glm is a backward model selection procedure which simultaneously deletes continuous variables and merges levels of factors. It is a generalization of DMR onto generalized linear models, where instead of squared t-statistics, squared Wald statistics are used. The final model is selected by minimization of generalized information criterion in the nested family of models.
1 |
model |
initial model of class glm. |
K |
penalty for the number of parameters in generalized information criterion, default is log(n). |
clust.method |
method of clustering, the same as in |
a list including elements
Partitions |
a list of partitions of factors for the models on the nested path searched through |
Crit |
values of generalized information criterion for the models on the nested path searched through |
LogLik |
values of log-likelihood for the models on the nested path searched through |
Models |
a list of models of class glm on the nested path searched through |
Best |
a list containing features of the selected model: Partition, Model of class glm, Crit and Hypotheses represesnted as a matrix of lienear hypotheses imposed on the model's parameters |
Piotr Pokarowski, Agnieszka Prochenka, Aleksandra Maj
1 2 3 4 5 6 7 8 9 10 | k <- 4
v1 <- factor(rep(1:8, each=12*k))
v2 <- factor(rep(1:4, times = 24*k))
v3 <- factor(rep(1:3, times = 32*k))
x1 <- rnorm(96*k)
x2 <- runif(96*k)
mi <- rep(c(2 , 2, -1, -1, -1, -1, 0, 0), each = 12*k)
y <- rbinom(96*k, 1, exp(mi)/(1+exp(mi)) )
m <- glm(y ~ x1 + x2 + v1 + v2 + v3, family = binomial)
(out <- DMR4glm(m))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.