2

I conducted a feature selection using lasso method as well as a covariance test using covTest::covTest to retrieve the p.values. I borrow an example from covTest such that:

require(lars)
require(covTest)
set.seed(1234)
x=matrix(rnorm(100*10),ncol=10)
x=scale(x,TRUE,TRUE)/sqrt(99)
beta=c(4,rep(0,9))
y=x%*%beta+.4*rnorm(100)

a=lars(x,y)
covTest(a,x,y)
$results
 Predictor_Number Drop_in_covariance P-value
                1           105.7307  0.0000
                6             0.9377  0.3953
               10             0.2270  0.7974
                3             0.0689  0.9334
                7             0.1144  0.8921
                2             0.0509  0.9504
                9             0.0508  0.9505
                8             0.0006  0.9994
                4             0.1190  0.8880
                5             0.0013  0.9987

$sigma
[1] 0.3705

$null.dist
[1] "F(2,90)

The covTest's results showed the p-values of the top hit features. My question is how to retrieve the coefficient of these features such as that of the predictor 1 as well as its Std.err and 95%CI. I'd to compare these estimates with the counterparts from glm.

David Z
  • 6,641
  • 11
  • 50
  • 101
  • For coefficients, see http://stackoverflow.com/questions/25620511/how-to-obtain-coefficients-from-lasso-regression-in-r For errors and CI, I believe there is no simple way but proposed approaches include bootstrapping and the lassoscore package. – MattBagg Jan 25 '15 at 17:16

0 Answers0