opts {STOPES} | R Documentation |
Optimization via Subsampling (OPTS)
Description
opts
computes the OPTS MLE in low dimensional
case.
Usage
opts(X, Y, m, crit = "aic", prop_split = 0.5, cutoff = 0.75, ...)
Arguments
X |
n x p covariate matrix (without intercept) |
Y |
n x 1 binary response vector |
m |
number of subsamples |
crit |
information criterion to select the variables: (a) aic = minimum AIC and (b) bic = minimum BIC |
prop_split |
proportion of subsample size and sample size, default value = 0.5 |
cutoff |
cutoff used to select the variables using the stability selection criterion, default value = 0.75 |
... |
other arguments passed to the glm function, e.g., family = "binomial" |
Value
opts
returns a list:
betahat |
OPTS MLE of regression parameter vector |
Jhat |
estimated set of active predictors (TRUE/FALSE) corresponding to the OPTS MLE |
SE |
standard error of OPTS MLE |
freqs |
relative frequency of selection for all variables |
Examples
require(MASS)
P = 15
N = 100
M = 20
BETA_vector = c(0.5, rep(0.5, 2), rep(0.5, 2), rep(0, P - 5))
MU_vector = numeric(P)
SIGMA_mat = diag(P)
X <- mvrnorm(N, MU_vector, Sigma = SIGMA_mat)
linearPred <- cbind(rep(1, N), X)
Y <- rbinom(N, 1, plogis(linearPred))
# OPTS-AIC MLE
opts(X, Y, 10, family = "binomial")
[Package STOPES version 0.2 Index]