To be filled out at a later date

mestimate(x, y)

Arguments

x

input vector, of dimension nobs x nvars; each row is an observation vector.

y

quantitative response variable of length nobs

Value

Returns a list of 7 variables:

p.full

The p-value for the test of the full set of variables selected by the lasso (based on the OLS estimates)

ols.selected

A vector of the indices of the non-zero variables selected by glmnet sorted from (numerically) highest to lowest based on their ols test statistic.

p.maxols

The p-value for the maximum of the OLS test statistics

lasso.selected

A vector of the indices of the non-zero variables selected by glmnet sorted from (numerically) highest to lowest based on their absolute lasso coefficients.

p.maxlasso

The p-value for the maximum of the lasso test statistics

lambda.orig

The value of lambda used in the computations

B

The number of permutations used

See also

lm

Examples

n <- 1000 p <- rbinom(n, size=1, prob=.20) x <- rnorm(n) y <- rnorm(n, mean=x)*p mestimate(x, y)
#> $phat #> [1] 0.222199 #> #> $betahat #> [1] 0.8735494 #>