prepare_data {bigstep} | R Documentation |
Data preparation
Description
Create an object of class big
which is needed to perform the selection
procedure.
Usage
prepare_data(
y,
X,
type = "linear",
candidates = NULL,
Xadd = NULL,
na = NULL,
maxp = 1e+06,
verbose = TRUE
)
Arguments
y |
a numeric vector of dependent (target) variable. |
X |
a numeric matrix or an object of class |
type |
a string, type of the regression model you want to fit. You can
use one of these: |
candidates |
a numeric vector, columns from |
Xadd |
a numeric matrix, additional variables which will be included in
the model selection procedure (they will not be removed in any step). If
|
na |
a logical. There are any missing values in |
maxp |
a numeric. The matrix |
verbose |
a logical. Set |
Details
The function automatically removes observations which have missing
values in y
. Type browseVignettes("bigstep")
for more
details.
Value
An object of class big
.
Examples
X <- matrix(rnorm(20), ncol = 4)
y <- X[, 2] + rnorm(5)
data <- prepare_data(y, X)