stepDMR: Stepwise Delete or Merge Regressors

Description Usage Arguments Value Author(s) See Also Examples

View source: R/stepDMR.r

Description

Stepwise DMR is a backward model selection procedure which simultaneously deletes continuous variables and merges levels of factors. It is a stepwise version of DMR, where in every step the values of squared t-statistics are recalculated. The final model is selected by minimization of generalized information criterion in the nested family of models.

Usage

1
 stepDMR(model, K = log(nrow(model$model))) 

Arguments

model

initial model of class lm.

K

penalty for the number of parameters in generalized information criterion, default is log(n).

Value

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

Best

a list containing features of the selected model: Partition, Model of class lm, Crit and Hypotheses represesnted as a matrix of lienear hypotheses imposed on the model's parameters

Author(s)

Piotr Pokarowski, Agnieszka Prochenka, Aleksandra Maj

See Also

DMR, DMR4glm, plot_bf, roc

Examples

1
2
3
4
5
6
7
8
9
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)
y <- rep(c(2, 2, -1, -1, -1, -1, 0, 0), each = 12*k) + rnorm(96*k)
m <- lm(y ~ v1 + v2 + v3 + x1 + x2)
(out <- stepDMR(m))

DMR documentation built on May 30, 2017, 6:25 a.m.