RaModel: Generate data (x, y) from various models in two papers.

Description Usage Arguments Value Note References See Also Examples

View source: R/RaModel.R

Description

RaModel generates data from 4 models described in Tian, Y. and Feng, Y., 2021(b) and 8 models described in Tian, Y. and Feng, Y., 2021(a).

Usage

1
RaModel(model.type, model.no, n, p, p0 = 1/2, sparse = TRUE)

Arguments

model.type

indicator of the paper covering the model, which can be 'classification' (Tian, Y. and Feng, Y., 2021(b)) or 'screening' (Tian, Y. and Feng, Y., 2021(a)).

model.no

model number. It can be 1-4 when model.type = 'classification' and 1-8 when model.type = 'screening', respectively.

n

sample size

p

data dimension

p0

marginal probability of class 0. Default = 0.5. Only used when model.type = 'classification' and model.no = 1, 2, 3.

sparse

a logistic object indicating model sparsity. Default = TRUE. Only used when model.type = 'classification' and model.no = 1, 4.

Value

x

n * p matrix. n observations and p features.

y

n responses.

Note

When model.type = 'classification' and sparse = TRUE, models 1, 2, 4 require p ≥ 5 and model 3 requires p ≥ 50. When model.type = 'classification' and sparse = FALSE, models 1 and 4 require p ≥ 50 and p ≥ 30, respectively. When model.type = 'screening', models 1, 4, 5 and 7 require p ≥ 4. Models 2 and 8 require p ≥ 5. Model 3 requires p ≥ 22. Model 5 requires p ≥ 2.

References

Tian, Y. and Feng, Y., 2021(a). RaSE: A variable screening framework via random subspace ensembles. Journal of the American Statistical Association, (just-accepted), pp.1-30.

Tian, Y. and Feng, Y., 2021(b). RaSE: Random subspace ensemble classification. Journal of Machine Learning Research, 22(45), pp.1-93.

See Also

Rase, RaScreen.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
train.data <- RaModel("classification", 1, n = 100, p = 50)
xtrain <- train.data$x
ytrain <- train.data$y

## Not run: 
train.data <- RaModel("screening", 2, n = 100, p = 50)
xtrain <- train.data$x
ytrain <- train.data$y

## End(Not run)

RaSEn documentation built on Oct. 16, 2021, 9:06 a.m.