powered by
stopes computes the STOPES estimator.
stopes
stopes(x, y, m = 20, prop_split = 0.50, prop_trim = 0.20, q_tail = 0.90)
n x p covariate matrix
n x 1 response vector
number of split samples, with default value = 20
proportion of data used for training samples, default value = 0.50
proportion of trimming, default prop_trim = 0.20
proportion of truncation samples across the split samples, default values = 0.90
stopes returns a list with the STOPE estimates via data splitting using 0.25 method and the PELT method:
the STOPE estimate via data splitting
the set of active predictors corresponding to STOPES via data splitting
the final cutpoint for STOPES
the STOPE estimate via PELT
the set of active predictors corresponding to STOPES via PELT
the final cutpoint for PELT
test if the vector of trimmed cutpoints has length 0, with 1 if TRUE and 0 otherwise
# NOT RUN { p <- 5 n <- 100 beta <- c(2, 1, 0.5, rep(0, p - 3)) x <- matrix(nrow = n, ncol = p, rnorm(n * p)) y <- rnorm(n) + crossprod(t(x), beta) stopes(x, y) # }
Run the code above in your browser using DataLab