To be filled out at a later date
mestimate(x, y)
x | input vector, of dimension nobs x nvars; each row is an observation vector. |
---|---|
y | quantitative response variable of length nobs |
Returns a list of 7 variables:
The p-value for the test of the full set of variables selected by the lasso (based on the OLS estimates)
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.
The p-value for the maximum of the OLS test statistics
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.
The p-value for the maximum of the lasso test statistics
The value of lambda used in the computations
The number of permutations used
lm
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 #>