-------------
      name:  <unnamed>
       log:  C:\Users\ecomes\Documents\GitHub\lassopack\lassopack_v141incomplete\cs_lasso2.smcl
  log type:  smcl
 opened on:  24 Sep 2020, 22:18:04
r; t=0.02 22:18:04

. about

Stata/SE 16.1 for Windows (64-bit x86-64)
Revision 30 Jun 2020
Copyright 1985-2019 StataCorp LLC

Total physical memory:       16.00 GB
Available physical memory:    6.73 GB

Stata license: 5-user network perpetual
Serial number: 401606228165
  Licensed to: Mark Schaffer
               Heriot-Watt University
r; t=0.00 22:18:04

. which lasso2
.\lasso2.ado
*! lasso2 1.0.12 xxsept2020
*! lassopack package 1.4.1
*! authors aa/ms
r; t=0.00 22:18:04

. which lasso2_p
.\lasso2_p.ado
*! lasso2_p 1.0.06 14oct2019
*! lassopack package 1.4
*! authors aa/ms
r; t=0.00 22:18:04

. which lassoutils
.\lassoutils.ado
*! lassoutils 1.2.03 xxxsept2020
*! lassopack package 1.4.1
*! authors aa/cbh/ms
r; t=0.01 22:18:04

.
. * data source
. //global prostate prostate.data
. global prostate https://web.stanford.edu/~hastie/ElemStatLearn/datasets/prostate.data
r; t=0.00 22:18:04

.
. * simple ridge regression program
. cap program drop estridge
r; t=0.00 22:18:04

. program define estridge, rclass
  1.         syntax varlist , Lambda(real) [NOCONStant]
  2.         local yvar              : word 1 of `varlist'
  3.         local xvars             : list varlist - yvar
  4.         qui putmata X=(`xvars') y=(`yvar'), replace
  5.         mata: n=rows(y)
  6.         if ("`noconstant'"=="") {
  7.                 mata: X=X:-mean(X)
  8.                 mata: y=y:-mean(y)
  9.         }
 10.         mata: p=cols(X)
 11.         mata: beta=lusolve(X'X+(`lambda')/2*I(p),X'y)
 12.         tempname bhat
 13.         mata: st_matrix("`bhat'",beta')
 14.         mat list `bhat'
 15.         return matrix bhat = `bhat'
 16. end
r; t=0.00 22:18:04

.
. cap program drop comparemat
r; t=0.00 22:18:04

. program define comparemat , rclass
  1.         syntax anything [, tol(real 10e-3)]
  2.         local A         : word 1 of `0'
  3.         local B         : word 2 of `0'
  4.         tempname Amat Bmat
  5.         mat `Amat' = `A'
  6.         mat `Bmat' = `B'
  7.         local diff=mreldif(`Amat',`Bmat')
  8.         di as text "mreldif=`diff'. tolerance = `tol'"
  9.         mat list `Amat'
 10.         mat list `Bmat'
 11.         return scalar mreldif = `diff'
 12.         assert `diff'<`tol'
 13. end
r; t=0.00 22:18:04

.
. * program to compare two vectors using col names
. cap program drop comparevec
r; t=0.00 22:18:04

. program define comparevec , rclass
  1.         syntax anything [, tol(real 10e-3)]
  2.         local A         : word 1 of `0'
  3.         local B         : word 2 of `0'
  4.         tempname Amat Bmat
  5.         mat `Amat' = `A'
  6.         mat `Bmat' = `B'
  7.         local Anames: colnames `Amat'
  8.         local Bnames: colnames `Bmat'
  9.         local maxdiff = 0
 10.         local num = 0
 11.         foreach var of local Anames {
 12.                 local aix = colnumb(`Amat',"`var'")
 13.                 local bix = colnumb(`Bmat',"`var'")
 14.                 //di `aix'
.                 //di `bix'
.                 local thisdiff=reldif(el(`Amat',1,`aix'),el(`Bmat',1,`bix'))
 15.                 if `thisdiff'>`maxdiff' {
 16.                         local diff = `thisdiff'
 17.                 }
 18.                 local num=`num'+1
 19.         }
 20.         di as text "Max rel dif = `maxdiff'. tolerance = `tol'"
 21.         mat list `Amat'
 22.         mat list `Bmat'
 23.         return scalar maxdiff = `maxdiff'
 24.         assert `maxdiff'<`tol'
 25. end
r; t=0.00 22:18:04

.
.
. ********************************************************************************
. *** replicate glmnet                                                                                                             ***
. ********************************************************************************
.
. sysuse auto, clear
(1978 Automobile Data)
r; t=0.00 22:18:04

. drop if rep78==.
(5 observations deleted)
r; t=0.00 22:18:04

.
. global model price mpg-foreign
r; t=0.00 22:18:04

.
. // # the following R code was run using ‘glmnet’ version 4.0-2
. /*
> library("glmnet")
> library("haven")
> library("tidyverse")
>
> auto <- read_dta("http://www.stata-press.com/data/r9/auto.dta")
>
> auto <- auto %>% drop_na()
> n <- nrow(auto)
>
> price <- auto$price
>
> X <- auto[,c("mpg","rep78","headroom","trunk",
>              "weight","length","turn",
>              "displacement","gear_ratio","foreign")]
> X <- X %>%
>   mutate(foreign = as.integer(foreign)) %>%
>   as.matrix()
> */
.
. // single lambda, lasso
. /*
> > r<-glmnet(X,price,alpha=1,lambda=1000,thresh=1e-15)
> > t(coef(r))
> 1 x 11 sparse Matrix of class "dgCMatrix"
>    [[ suppressing 11 column names ‘(Intercept)’, ‘mpg’, ‘rep78’ ... ]]
>
> s0 4336.84 . . . . 0.3819041 . . 3.289185 . .
> */
. mat G = 0.3819041, 3.289185, 4336.84
r; t=0.00 22:18:04

. lasso2 $model, lambda(1000) lglmnet

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           weight |       0.3819035      1.0396466
     displacement |       3.2891898      8.8877339
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |    4336.8413380   1234.0335107
------------------+--------------------------------
r; t=1.87 22:18:06

. assert mreldif(e(b),G) <1e-5
r; t=0.00 22:18:06

.
. // single lambda, ridge
. /*
> > r<-glmnet(X,price,alpha=0,lambda=1000,thresh=1e-15)
> > t(coef(r))
> 1 x 11 sparse Matrix of class "dgCMatrix"
>    [[ suppressing 11 column names ‘(Intercept)’, ‘mpg’, ‘rep78’ ... ]]
>
> s0 3425.776 -57.0062 296.9702 -392.4219 23.70664
>
> s0 0.9938447 5.562674 -24.18045 8.855065 -536.018
>
> s0 1726.658
> */
. mat G = -57.0062, 296.9702, -392.4219, 23.70664, 0.9938447, 5.562674,   ///
>                         -24.18045, 8.855065, -536.018, 1726.65, 3425.776
r; t=0.00 22:18:06

. lasso2 $model, alpha(0) lambda(1000) lglmnet

------------------+--------------------------------
         Selected |           Ridge   Post-est OLS
------------------+--------------------------------
              mpg |     -57.0062055    -21.8051782
            rep78 |     296.9701496    184.7934987
         headroom |    -392.4219414   -635.4921033
            trunk |      23.7066545     71.4992915
           weight |       0.9938448      4.5211613
           length |       5.5626725    -76.4910106
             turn |     -24.1804578   -114.2776716
     displacement |       8.8550641     11.5401247
       gear_ratio |    -536.0179206   -318.6478765
          foreign |    1726.6581594   3334.8483415
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |    3425.7767718   9789.4941906
------------------+--------------------------------
r; t=0.04 22:18:06

. assert mreldif(e(b),G) <1e-5
r; t=0.00 22:18:06

.
. // single lambda, elastic net
. /*
> > r<-glmnet(X,price,alpha=0.5,lambda=1000,thresh=1e-15)
> > t(coef(r))
> 1 x 11 sparse Matrix of class "dgCMatrix"
>    [[ suppressing 11 column names ‘(Intercept)’, ‘mpg’, ‘rep78’ ... ]]
>
> s0 2883.129 -5.096381 . . . 0.692915 . . 5.942777 .
>
> s0 308.225
> */
. mat G = -5.096381, 0.692915, 5.942777, 308.225, 2883.129
r; t=0.00 22:18:06

. lasso2 $model, alpha(0.5) lambda(1000) lglmnet

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
              mpg |      -5.0963909     32.4482003
           weight |       0.6929148      2.1201353
     displacement |       5.9427779     14.0772143
          foreign |     308.2249767   3853.0800775
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |    2883.1295527  -4933.0507249
------------------+--------------------------------
r; t=0.03 22:18:06

. assert mreldif(e(b),G) <1e-5
r; t=0.00 22:18:06

.
. // lasso, lambda grid
. /*
> > r<-glmnet(X,price,alpha=1,nlambda=5,thres=1e-15)
> > r$lambda
> [1] 1584.1894208  158.4189421   15.8418942    1.5841894
> [5]    0.1584189
> > r$dev.ratio
> [1] 0.0000000 0.5272556 0.5970093 0.5988338 0.5988521
> */
. mat L =  1584.1894208, 158.4189421, 15.8418942, 1.5841894, 0.1584189
r; t=0.00 22:18:06

. mat L = L'
r; t=0.00 22:18:06

. mat D = 0.0000000, 0.5272556, 0.5970093, 0.5988338, 0.5988521
r; t=0.00 22:18:06

. mat D = D'
r; t=0.00 22:18:06

. lasso2 $model, lglmnet lcount(5)

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1 1584.18942    0     0.00000   1104.38888   0.0000  | Added _cons.
     2 |   2  158.41894    5  3107.35517   1075.71990   0.5273  | Added rep78
      |                                                         | headroom
      |                                                         | weight
      |                                                         | displacement
      |                                                         | foreign.
     3 |   3   15.84189   10  4584.90849   1087.73051   0.5970  | Added mpg
      |                                                         | trunk length
      |                                                         | turn
      |                                                         | gear_ratio.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


r; t=0.08 22:18:06

. assert mreldif(e(lambdamat0),L) < 1e-5
r; t=0.00 22:18:06

. assert mreldif(e(rsq),D) < 1e-5
r; t=0.00 22:18:06

.
. // ridge, lambda grid
. /*
> > r<-glmnet(X,price,alpha=0,nlambda=5,thres=1e-15)
> > r$lambda
> [1] 1584189.4208  158418.9421   15841.8942    1584.1894
> [5]     158.4189
> > r$dev.ratio
> [1] 2.777378e-36 4.347508e-02 2.060125e-01 4.453574e-01
> [5] 5.744210e-01
> */
. mat L =  1584189.4208, 158418.9421, 15841.8942, 1584.1894, 158.4189
r; t=0.00 22:18:06

. mat L = L'
r; t=0.00 22:18:06

. // first R-sq of glmnet appears to be wrong - see below
. * mat D = 2.777378e-36, 4.347508e-02, 2.060125e-01, 4.453574e-01, 5.744210e-01
. * mat D = D'
. lasso2 $model, alpha(0) lglmnet lcount(5) long

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1  1.584e+06   10     6.52952   1104.13041   0.0049  | All
      |                                                         | selected.
      |   2  1.584e+05    10    59.50834   1102.09934   0.0435  |
      |   3  1.584e+04    10   470.11906   1093.53830   0.2060  |
      |   4 1584.18942    10  2523.75949   1082.05499   0.4454  |
      |   5  158.41894    10  4405.02556   1081.83852*  0.5744  |
*indicates minimum EBIC.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


r; t=0.06 22:18:06

. assert mreldif(e(lambdamat0),L) < 1e-5
r; t=0.00 22:18:06

. * assert mreldif(e(rsq),D) < 1e-5
.
. // single lambda, ridge - see above
. /*
> > r<-glmnet(X,price,alpha=0,lambda=1584189.4208,thresh=1e-15)
> > r$dev.ratio
> [1] 0.004941719
> */
. lasso2 $model, alpha(0) lglmnet lambda(1584189.4208)

------------------+--------------------------------
         Selected |           Ridge   Post-est OLS
------------------+--------------------------------
              mpg |      -0.4092178    -21.8051782
            rep78 |       0.0465791    184.7934987
         headroom |       0.6755847   -635.4921033
            trunk |       0.3909418     71.4992915
           weight |       0.0036401      4.5211613
           length |       0.1022667    -76.4910106
             turn |       0.3898556   -114.2776716
     displacement |       0.0309961     11.5401247
       gear_ratio |      -4.3197832   -318.6478765
          foreign |      -0.1606565   3334.8483415
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |    6108.1856291   9789.4941906
------------------+--------------------------------
r; t=0.03 22:18:06

. assert reldif(e(r2),0.004941719) < 1e-5
r; t=0.00 22:18:06

.
. // elastic net, grid of 5
. /*
> > r<-glmnet(X,price,alpha=0.5,nlambda=5,thresh=1e-15)
> > r$lambda
> [1] 3168.3788416  316.8378842   31.6837884    3.1683788
> [5]    0.3168379
> > r$dev.ratio
> [1] 0.0000000 0.5088361 0.5942304 0.5987942 0.5988517
> */
. mat L = 3168.3788416, 316.8378842, 31.6837884, 3.1683788, 0.3168379
r; t=0.00 22:18:06

. mat L = L'
r; t=0.00 22:18:06

. mat D = 0.0000000, 0.5088361, 0.5942304, 0.5987942, 0.5988517
r; t=0.00 22:18:06

. mat D = D'
r; t=0.00 22:18:06

. lasso2 $model, alpha(0.5) lglmnet lcount(5) long

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1 3168.37884    0     0.00000   1104.38888   0.0000  | Added _cons.
     2 |   2  316.83788    6  2671.08935   1078.58843*  0.5088  | Added mpg
      |                                                         | rep78
      |                                                         | headroom
      |                                                         | weight
      |                                                         | displacement
      |                                                         | foreign.
     3 |   3   31.68379   10  4533.98792   1086.61888   0.5942  | Added trunk
      |                                                         | length turn
      |                                                         | gear_ratio.
      |   4    3.16838    10  4748.97046   1087.25116   0.5988  |
      |   5    0.31684    10  4771.40958   1087.39686   0.5989  |
*indicates minimum EBIC.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


r; t=0.08 22:18:06

. assert mreldif(e(lambdamat0),L) < 1e-5
r; t=0.00 22:18:06

. assert mreldif(e(rsq),D) < 1e-5
r; t=0.00 22:18:06

.
. // single lambda, lasso, nocons
. /*
> > r<-glmnet(X,price,alpha=1,lambda=1000,intercept=FALSE,thresh=1e-15)
> > t(coef(r))
> 1 x 11 sparse Matrix of class "dgCMatrix"
>    [[ suppressing 11 column names ‘(Intercept)’, ‘mpg’, ‘rep78’ ... ]]
>
> s0 . . . . . 0.379965 26.1441 . . . .
> */
. mat G = 0.379965, 26.1441
r; t=0.00 22:18:06

. lasso2 $model, lambda(1000) lglmnet nocons

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           weight |       0.3799620      2.3984497
           length |      26.1441473     -6.2162671
------------------+--------------------------------
r; t=0.02 22:18:06

. assert mreldif(e(b),G) <1e-5
r; t=0.00 22:18:06

.
. // single lambda, lasso, no standardisation
. /*
> > r<-glmnet(X,price,alpha=1,lambda=1000,standardize=FALSE,thresh=1e-15)
> > t(coef(r))
> 1 x 11 sparse Matrix of class "dgCMatrix"
>    [[ suppressing 11 column names ‘(Intercept)’, ‘mpg’, ‘rep78’ ... ]]
>
> s0 10119.16 . . . . 3.549222 -62.23642 -106.0307
>
> s0 6.079465 . .
> */
. mat G = 3.549222, -62.23642, -106.0307, 6.079465, 10119.16
r; t=0.00 22:18:06

. lasso2 $model, lambda(1000) lglmnet nostd

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           weight |       3.5492239      4.3647870
           length |     -62.2364415    -62.6569484
             turn |    -106.0306825   -306.7713630
     displacement |       6.0794583      7.5928170
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |   10119.1652697  15414.7836815
------------------+--------------------------------
r; t=0.02 22:18:06

. assert mreldif(e(b),G) <1e-5
r; t=0.00 22:18:06

.
. // single lambda, lasso, no standardisation, noconstant
. /*
> > r<-glmnet(X,price,alpha=1,lambda=1000,standardize=FALSE,intercept=FALSE,thresh=1e-15)
> > t(coef(r))
> 1 x 11 sparse Matrix of class "dgCMatrix"
>    [[ suppressing 11 column names ‘(Intercept)’, ‘mpg’, ‘rep78’ ... ]]
>
> s0 . 6.830147 . . . 1.85882 -2.334519 . 3.886964 . .
> */
. mat G = 6.830147, 1.85882, -2.334519, 3.886964
r; t=0.00 22:18:06

. lasso2 $model, lambda(1000) lglmnet nostd nocons

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
              mpg |       6.8298445     67.8769863
           weight |       1.8588003      2.7733874
           length |      -2.3342602    -24.1800039
     displacement |       3.8870523      4.1129337
------------------+--------------------------------
r; t=0.06 22:18:06

. // note looser tolerance
. assert mreldif(e(b),G) <1e-4
r; t=0.00 22:18:06

.
. // single lambda, lasso, mpg and foreign unpenalized
. /*
> > p.fac = rep(1, 10)
> > p.fac[c(1, 10)] = 0
> > r<-glmnet(X,price,alpha=1,lambda=500,penalty.factor=p.fac, thresh=1e-15)
> > t(coef(r))
> 1 x 11 sparse Matrix of class "dgCMatrix"
>    [[ suppressing 11 column names ‘(Intercept)’, ‘mpg’, ‘rep78’ ... ]]
>
> s0 9140.732 -225.1226 . . . . . . 6.065554 . 1962.096
> */
. mat G = -225.1226, 6.065554, 1962.096, 9140.732
r; t=0.00 22:18:06

. lasso2 $model, lambda(500) lglmnet notpen(mpg foreign)

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
              mpg |*    -225.1226002    -41.1777218
     displacement |       6.0655534     26.3416129
          foreign |*    1962.0955409   3506.5154853
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |    9140.7319210    739.8714853
------------------+--------------------------------
*Not penalized
r; t=0.03 22:18:06

. assert mreldif(e(b),G) <1e-5
r; t=0.00 22:18:06

.
. // single lambda, ridge, mpg and foreign unpenalized
. /*
> > p.fac = rep(1, 10)
> > p.fac[c(1, 10)] = 0
> > r<-glmnet(X,price,alpha=0,lambda=500,penalty.factor=p.fac, thresh=1e-15)
> > t(coef(r))
> 1 x 11 sparse Matrix of class "dgCMatrix"
>    [[ suppressing 11 column names ‘(Intercept)’, ‘mpg’, ‘rep78’ ... ]]
>
> s0 4420.934 -65.4987 167.7168 -446.8571 22.46099 1.26494
>
> s0 2.118738 -25.1642 10.62293 -910.106 3185.862
> */
. mat G = -65.4987, 167.7168, -446.8571, 22.46099, 1.26494,                       ///
>                 2.118738, -25.1642, 10.62293, -910.106, 3185.862, 4420.934
r; t=0.00 22:18:06

. lasso2 $model, lambda(500) alpha(0) lglmnet notpen(mpg foreign)

------------------+--------------------------------
         Selected |           Ridge   Post-est OLS
------------------+--------------------------------
              mpg |*     -65.4987232    -21.8051782
            rep78 |     167.7168365    184.7934987
         headroom |    -446.8571174   -635.4921033
            trunk |      22.4609862     71.4992915
           weight |       1.2649401      4.5211613
           length |       2.1187343    -76.4910106
             turn |     -25.1641973   -114.2776716
     displacement |      10.6229336     11.5401247
       gear_ratio |    -910.1061352   -318.6478765
          foreign |*    3185.8620818   3334.8483415
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |    4420.9361916   9789.4941906
------------------+--------------------------------
*Not penalized
r; t=0.04 22:18:06

. assert mreldif(e(b),G) <1e-5
r; t=0.00 22:18:06

.
. // single lambda, elastic net, mpg and foreign unpenalized
. /*
> > p.fac = rep(1, 10)
> > p.fac[c(1, 10)] = 0
> > r<-glmnet(X,price,alpha=0.5,lambda=500,penalty.factor=p.fac, thresh=1e-15)
> > t(coef(r))
> 1 x 11 sparse Matrix of class "dgCMatrix"
>    [[ suppressing 11 column names ‘(Intercept)’, ‘mpg’, ‘rep78’ ... ]]
>
> s0 4089.962 -132.7721 . . . 0.7644731 . . 8.896648 . 2639.545
> */
. mat G = -132.7721, 0.7644731, 8.896648, 2639.545, 4089.962
r; t=0.00 22:18:06

. lasso2 $model, lambda(500) alpha(0.5) lglmnet notpen(mpg foreign)

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
              mpg |*    -132.7721093     32.4482003
           weight |       0.7644727      2.1201353
     displacement |       8.8966496     14.0772143
          foreign |*    2639.5446506   3853.0800775
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |    4089.9626321  -4933.0507249
------------------+--------------------------------
*Not penalized
r; t=0.03 22:18:06

. assert mreldif(e(b),G) <1e-5
r; t=0.00 22:18:06

.
. // single lambda, lasso, misc penalty loadings
. /*
> > p.fac = rep(1, 10)
> > p.fac[c(1, 10)] = 4
> > p.fac[c(2,9)] = 3
> > p.fac[c(3,8)] = 2
> > r<-glmnet(X,price,alpha=1,lambda=400,penalty.factor=p.fac, thresh=1e-15)
> > t(coef(r))
> 1 x 11 sparse Matrix of class "dgCMatrix"
>    [[ suppressing 11 column names ‘(Intercept)’, ‘mpg’, ‘rep78’ ... ]]
>
> s0 1254.559 . . . . 2.136852 . -42.89822 . . 393.3358
> */
. mat G =  2.136852, -42.89822, 393.3358, 1254.559
r; t=0.00 22:18:06

. mat psi = 4, 3, 2, 1, 1, 1, 1, 2, 3, 4
r; t=0.00 22:18:06

. lasso2 $model, lambda(400) lglmnet ploadings(psi)

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           weight |       2.1368521      4.2041749
             turn |     -42.8982000   -201.6040429
          foreign |     393.3357681   3229.0798707
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |    1254.5591614    439.3565194
------------------+--------------------------------
r; t=0.03 22:18:06

. assert mreldif(e(b),G) <1e-5
r; t=0.00 22:18:06

.
. // Elastic net, single lambda, misc penalty loadings
. /*
> > p.fac = rep(1, 10)
> > p.fac[c(1, 10)] = 4
> > p.fac[c(2,9)] = 3
> > p.fac[c(3,8)] = 2
> > r<-glmnet(X,price,alpha=0.5,lambda=400,penalty.factor=p.fac,thresh=1e-15)
> > t(coef(r))
> 1 x 11 sparse Matrix of class "dgCMatrix"
>    [[ suppressing 11 column names ‘(Intercept)’, ‘mpg’, ‘rep78’ ... ]]
>
> s0 1232.917 . 91.49722 -256.4055 . 2.29446 . -78.49864 5.61806 .
>
> s0 1398.059
> */
. mat G = 91.49722, -256.4055, 2.29446, -78.49864, 5.61806, 1398.059, 1232.917
r; t=0.00 22:18:06

. mat psi = 4, 3, 2, 1, 1, 1, 1, 2, 3, 4
r; t=0.00 22:18:06

. lasso2 $model, lambda(400) alpha(0.5) lglmnet ploadings(psi)

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
            rep78 |      91.4972524    137.6395144
         headroom |    -256.4054750   -662.3143019
           weight |       2.2944593      2.8095110
             turn |     -78.4986102   -185.4958291
     displacement |       5.6180622     15.8198864
          foreign |    1398.0594268   3239.6807619
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |    1232.9161107   2409.5642531
------------------+--------------------------------
r; t=0.03 22:18:06

. assert mreldif(e(b),G) <1e-5
r; t=0.00 22:18:06

.
. // Elastic net, single lambda, misc penalty loadings, no standardization
. /*
> > p.fac = rep(1, 10)
> > p.fac[c(1, 10)] = 4
> > p.fac[c(2,9)] = 3
> > p.fac[c(3,8)] = 2
> > r<-glmnet(X,price,alpha=0.5,lambda=400,penalty.factor=p.fac,standardize=FALSE,thresh=1e-15)
> > t(coef(r))
> 1 x 11 sparse Matrix of class "dgCMatrix"
>    [[ suppressing 11 column names ‘(Intercept)’, ‘mpg’, ‘rep78’ ... ]]
>
> s0 16039.13 -58.51055 322.0282 -218.2771 21.3079 4.093964 -72.31631
>
> s0 -247.7182 8.463531 . .
> */
. mat G = -58.51055, 322.0282, -218.2771, 21.3079, 4.093964, -72.31631,   ///
>                 -247.7182, 8.463531, 16039.13
r; t=0.00 22:18:06

. mat psi = 4, 3, 2, 1, 1, 1, 1, 2, 3, 4
r; t=0.00 22:18:06

. lasso2 $model, lambda(400) alpha(0.5) lglmnet ploadings(psi) nostd

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
              mpg |     -58.5107795   -105.8894153
            rep78 |     322.0321459    759.3265317
         headroom |    -218.2801371   -713.0017251
            trunk |      21.3080854     70.8032750
           weight |       4.0939622      3.9135872
           length |     -72.3163363    -80.4499647
             turn |    -247.7178737   -211.3076497
     displacement |       8.4635526     10.6210554
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |   16039.1150621  16555.4570151
------------------+--------------------------------
r; t=0.02 22:18:06

. // note looser tolerance
. assert mreldif(e(b),G) <1e-4
r; t=0.00 22:18:06

.
. ********************************************************************************
. *** lglmnet option - consistency  with lasso2 default parameterization       ***
. ********************************************************************************
.
. * uses auto dataset
. * can change sd(y) and lambdas to suit
. * note lglmnet implies prestd
.
. // any lambda, any alpha
. sysuse auto, clear
(1978 Automobile Data)
r; t=0.00 22:18:06

. gen double y = price/10
r; t=0.00 22:18:06

. local glmnetlambda_a = 100
r; t=0.00 22:18:06

. local glmnetlambda_b = 10
r; t=0.00 22:18:06

. drop if rep78==.
(5 observations deleted)
r; t=0.00 22:18:06

. qui sum y
r; t=0.00 22:18:06

. local sd = r(sd) * 1/sqrt( r(N)/(r(N)-1)   )
r; t=0.00 22:18:06

. local glmnetalpha = 0.5
r; t=0.00 22:18:06

. local L1lambda_a = `glmnetlambda_a' * 2 * 69
r; t=0.00 22:18:06

. local L2lambda_a = `L1lambda_a' / `sd'
r; t=0.00 22:18:06

. local L1lambda_b = `glmnetlambda_b' * 2 * 69
r; t=0.00 22:18:06

. local L2lambda_b = `L1lambda_b' / `sd'
r; t=0.00 22:18:06

. di "glmnetlambda_a=`glmnetlambda_a' L1lambda_a=`L1lambda_a' L2lambda_a=`L2lambda_a'"
glmnetlambda_a=100 L1lambda_a=13800 L2lambda_a=47.73007873873659
r; t=0.00 22:18:06

. di "glmnetlambda_b=`glmnetlambda_b' L1lambda_b=`L1lambda_b' L2lambda_b=`L2lambda_b'"
glmnetlambda_b=10 L1lambda_b=1380 L2lambda_b=4.773007873873659
r; t=0.00 22:18:06

. // Lasso / alpha=1
. lasso2 y mpg-foreign, lambda(`glmnetlambda_a') lglmnet

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           weight |       0.0381904      0.1039647
     displacement |       0.3289190      0.8887734
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |     433.6841338    123.4033511
------------------+--------------------------------
r; t=0.03 22:18:06

. local objfn = e(objfn)
r; t=0.00 22:18:06

. storedresults save glmnet e()
r; t=0.00 22:18:06

. lasso2 y mpg-foreign, lambda(`L1lambda_a') prestd

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           weight |       0.0381904      0.1039647
     displacement |       0.3289190      0.8887734
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |     433.6841335    123.4033511
------------------+--------------------------------
r; t=0.04 22:18:06

. storedresults compare glmnet e(), tol(1e-8)                                                     ///
>         exclude(macros: lasso2opt scalar: niter lambda objfn slambda sobjfn)
r; t=0.00 22:18:06

. assert reldif(2*`objfn',e(objfn))<1e-8
r; t=0.00 22:18:06

. // lambda list
. lasso2 y mpg-foreign, lambda(`glmnetlambda_a' `glmnetlambda_b') lglmnet

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1  100.00000    2     0.36711    781.56294   0.1869  | Added weight
      |                                                         | displacement
      |                                                         | _cons.
     2 |   2   10.00000    7   357.08640    763.62958   0.5509  | Added rep78
      |                                                         | headroom turn
      |                                                         | gear_ratio
      |                                                         | foreign.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


r; t=0.03 22:18:06

. storedresults save glmnet e()
r; t=0.00 22:18:06

. lasso2 y mpg-foreign, lambda(`L1lambda_a' `L1lambda_b') prestd

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1  1.380e+04    2     0.36711    781.56294   0.1869  | Added weight
      |                                                         | displacement
      |                                                         | _cons.
     2 |   2 1380.00000    7   357.08640    763.62958   0.5509  | Added rep78
      |                                                         | headroom turn
      |                                                         | gear_ratio
      |                                                         | foreign.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


r; t=0.04 22:18:06

. storedresults compare glmnet e(), tol(1e-8)                                                     ///
>         exclude(macros: lasso2opt                                                                               ///
>         scalar: niter lmax lmax0 lmin lmin0                                                             ///
>                         laic laicc lbic lebic slaic slaicc slbic slebic                 ///
>         matrix: lambdamat lambdamat0 slambdamat slambdamat0)
r; t=0.00 22:18:06

. // Enet
. local alpha=(`glmnetalpha'*`sd')/( (1-`glmnetalpha') + `glmnetalpha'*`sd' )
r; t=0.00 22:18:06

. local lambda_a=(1-`glmnetalpha')*`L2lambda_a' + `glmnetalpha'*`L1lambda_a'
r; t=0.00 22:18:06

. local lambda_b=(1-`glmnetalpha')*`L2lambda_b' + `glmnetalpha'*`L1lambda_b'
r; t=0.00 22:18:06

. di "alpha=`alpha' lambda_a=`lambda_a' lambda_b=`lambda_b'"
alpha=.9965532200247014 lambda_a=6923.865039369368 lambda_b=692.3865039369368
r; t=0.00 22:18:06

. lasso2 y mpg-foreign, alpha(`glmnetalpha') lambda(`glmnetlambda_a') lglmnet

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
              mpg |      -0.5096391      3.2448200
           weight |       0.0692915      0.2120135
     displacement |       0.5942778      1.4077214
          foreign |      30.8224977    385.3080078
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |     288.3129553   -493.3050725
------------------+--------------------------------
r; t=0.03 22:18:07

. local objfn = e(objfn)
r; t=0.00 22:18:07

. storedresults save glmnet e()
r; t=0.00 22:18:07

. lasso2 y mpg-foreign, alpha(`alpha') lambda(`lambda_a') prestd

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.997)
------------------+--------------------------------
              mpg |      -0.5096391      3.2448200
           weight |       0.0692915      0.2120135
     displacement |       0.5942778      1.4077214
          foreign |      30.8224976    385.3080078
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |     288.3129554   -493.3050725
------------------+--------------------------------
r; t=0.04 22:18:07

. storedresults compare glmnet e(), tol(1e-8)                                                     ///
>         exclude(macros: lasso2opt scalar: niter alpha lambda objfn slambda sobjfn)
r; t=0.00 22:18:07

. di 2*`objfn'
72261.603
r; t=0.00 22:18:07

. di e(objfn)
72261.603
r; t=0.00 22:18:07

. assert reldif(2*`objfn',e(objfn))<1e-8
r; t=0.00 22:18:07

. // lambda list
. lasso2 y mpg-foreign, alpha(`glmnetalpha') lambda(`glmnetlambda_a' `glmnetlambda_b') lglmnet

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1  100.00000    4    31.99571    773.80040   0.2999  | Added mpg
      |                                                         | weight
      |                                                         | displacement
      |                                                         | foreign
      |                                                         | _cons.
     2 |   2   10.00000    9   406.69452    766.12681   0.5687  | Added rep78
      |                                                         | headroom
      |                                                         | length turn
      |                                                         | gear_ratio.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


r; t=0.04 22:18:07

. storedresults save glmnet e()
r; t=0.00 22:18:07

. lasso2 y mpg-foreign, alpha(`alpha') lambda(`lambda_a' `lambda_b') prestd

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1 6923.86504    4    31.99571    773.80040   0.2999  | Added mpg
      |                                                         | weight
      |                                                         | displacement
      |                                                         | foreign
      |                                                         | _cons.
     2 |   2  692.38650    9   406.69452    766.12681   0.5687  | Added rep78
      |                                                         | headroom
      |                                                         | length turn
      |                                                         | gear_ratio.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


r; t=0.03 22:18:07

. storedresults compare glmnet e(), tol(1e-8)                                                     ///
>         exclude(macros: lasso2opt                                                                               ///
>         scalar: niter lmax lmax0 lmin lmin0                                                             ///
>                         laic laicc lbic lebic slaic slaicc slbic slebic alpha   ///
>         matrix: lambdamat lambdamat0 slambdamat slambdamat0)
r; t=0.00 22:18:07

. // Ridge / alpha=0
. lasso2 y mpg-foreign, alpha(0) lambda(`glmnetlambda_a') lglmnet

------------------+--------------------------------
         Selected |           Ridge   Post-est OLS
------------------+--------------------------------
              mpg |      -5.7006206     -2.1805178
            rep78 |      29.6970150     18.4793499
         headroom |     -39.2421941    -63.5492103
            trunk |       2.3706654      7.1499291
           weight |       0.0993845      0.4521161
           length |       0.5562672     -7.6491011
             turn |      -2.4180458    -11.4277672
     displacement |       0.8855064      1.1540125
       gear_ratio |     -53.6017921    -31.8647876
          foreign |     172.6658159    333.4848341
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |     342.5776772    978.9494191
------------------+--------------------------------
r; t=0.04 22:18:07

. local objfn = e(objfn)
r; t=0.00 22:18:07

. storedresults save glmnet e()
r; t=0.00 22:18:07

. lasso2 y mpg-foreign, alpha(0) lambda(`L2lambda_a') prestd

------------------+--------------------------------
         Selected |           Ridge   Post-est OLS
------------------+--------------------------------
              mpg |      -5.7006206     -2.1805178
            rep78 |      29.6970150     18.4793499
         headroom |     -39.2421941    -63.5492103
            trunk |       2.3706654      7.1499291
           weight |       0.0993845      0.4521161
           length |       0.5562672     -7.6491011
             turn |      -2.4180458    -11.4277672
     displacement |       0.8855064      1.1540125
       gear_ratio |     -53.6017921    -31.8647876
          foreign |     172.6658159    333.4848341
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |     342.5776772    978.9494191
------------------+--------------------------------
r; t=0.03 22:18:07

. storedresults compare glmnet e(), tol(1e-8)                                                     ///
>         exclude(macros: lasso2opt scalar: niter lambda objfn slambda sobjfn)
r; t=0.00 22:18:07

. di 2*`objfn'
51016.759
r; t=0.00 22:18:07

. di e(objfn)
51016.759
r; t=0.00 22:18:07

. assert reldif(2*`objfn',e(objfn))<1e-8
r; t=0.00 22:18:07

. // lambda list
. lasso2 y mpg-foreign, alpha(0) lambda(`glmnetlambda_a' `glmnetlambda_b') lglmnet

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1  100.00000   10   307.23731    762.92238   0.4856  | All
      |                                                         | selected.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


r; t=0.03 22:18:07

. storedresults save glmnet e()
r; t=0.00 22:18:07

. lasso2 y mpg-foreign, alpha(0) lambda(`L2lambda_a' `L2lambda_b') prestd

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1   47.73008   10   307.23731    762.92238   0.4856  | All
      |                                                         | selected.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


r; t=0.03 22:18:07

. storedresults compare glmnet e(), tol(1e-8)                                                     ///
>         exclude(macros: lasso2opt                                                                               ///
>         scalar: niter lmax lmax0 lmin lmin0                                                             ///
>                         laic laicc lbic lebic slaic slaicc slbic slebic                 ///
>         matrix: lambdamat lambdamat0 slambdamat slambdamat0)
r; t=0.01 22:18:07

.
.
. ********************************************************************************
. *** Validate ploadings(.) option                                             ***
. ********************************************************************************
.
. * Default lasso2 behavior is to standardize, either on the fly or in advance.
. * Confirm ploadings(.) work correctly by providing SDs of X.
. * Behavior should be identical to standardization on-the-fly.
.
. sysuse auto, clear
(1978 Automobile Data)
r; t=0.00 22:18:07

. drop if rep78==.
(5 observations deleted)
r; t=0.00 22:18:07

.
. cap mat drop psi_sd
r; t=0.00 22:18:07

. foreach var of varlist mpg-foreign {
  2.         qui sum `var'
  3.         mat psi_sd = nullmat(psi_sd) , r(sd) * sqrt( (r(N)-1)/r(N)   )
  4. }
r; t=0.00 22:18:07

.
. // lasso
. lasso2 price mpg-foreign, lambda(1000) alpha(1)

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
              mpg |     -18.3438624    -21.8051782
            rep78 |     179.1821391    184.7934987
         headroom |    -615.9286814   -635.4921033
            trunk |      61.4301532     71.4992915
           weight |       4.3034979      4.5211613
           length |     -68.8535302    -76.4910106
             turn |    -110.0494001   -114.2776716
     displacement |      11.7536289     11.5401247
       gear_ratio |    -304.4553207   -318.6478765
          foreign |    3313.1603780   3334.8483415
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |    8791.8507263   9789.4941906
------------------+--------------------------------
r; t=0.02 22:18:07

. storedresults save nopload e()
r; t=0.00 22:18:07

. lasso2 price mpg-foreign, lambda(1000) alpha(1) pload(psi_sd)

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
              mpg |     -18.3438624    -21.8051782
            rep78 |     179.1821391    184.7934987
         headroom |    -615.9286814   -635.4921033
            trunk |      61.4301532     71.4992915
           weight |       4.3034979      4.5211613
           length |     -68.8535302    -76.4910106
             turn |    -110.0494001   -114.2776716
     displacement |      11.7536289     11.5401247
       gear_ratio |    -304.4553207   -318.6478765
          foreign |    3313.1603780   3334.8483415
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |    8791.8507263   9789.4941906
------------------+--------------------------------
r; t=0.04 22:18:07

. storedresults compare nopload e(), tol(1e-8)                                            ///
>         exclude(macros: lasso2opt)
r; t=0.00 22:18:07

.
. // ridge
. lasso2 price mpg-foreign, lambda(1000) alpha(0)

------------------+--------------------------------
         Selected |           Ridge   Post-est OLS
------------------+--------------------------------
              mpg |     -19.0545973    -21.8051782
            rep78 |      32.4489067    184.7934987
         headroom |       1.1304796   -635.4921033
            trunk |      15.7127508     71.4992915
           weight |       0.1765069      4.5211613
           length |       4.3548987    -76.4910106
             turn |      13.7083378   -114.2776716
     displacement |       1.5279724     11.5401247
       gear_ratio |    -183.1904143   -318.6478765
          foreign |      92.5342556   3334.8483415
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |    4536.9953864   9789.4941906
------------------+--------------------------------
r; t=0.01 22:18:07

. storedresults save nopload e()
r; t=0.00 22:18:07

. lasso2 price mpg-foreign, lambda(1000) alpha(0) pload(psi_sd)

------------------+--------------------------------
         Selected |           Ridge   Post-est OLS
------------------+--------------------------------
              mpg |     -19.0545973    -21.8051782
            rep78 |      32.4489067    184.7934987
         headroom |       1.1304796   -635.4921033
            trunk |      15.7127508     71.4992915
           weight |       0.1765069      4.5211613
           length |       4.3548987    -76.4910106
             turn |      13.7083378   -114.2776716
     displacement |       1.5279724     11.5401247
       gear_ratio |    -183.1904143   -318.6478765
          foreign |      92.5342556   3334.8483415
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |    4536.9953864   9789.4941906
------------------+--------------------------------
r; t=0.02 22:18:07

. storedresults compare nopload e(), tol(1e-8)                                            ///
>         exclude(macros: lasso2opt)
r; t=0.00 22:18:07

.
. // elastic net
. lasso2 price mpg-foreign, lambda(1000) alpha(0.5)

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
              mpg |     -28.5859633    -21.8051782
            rep78 |      74.9181382    184.7934987
         headroom |     -28.5269294   -635.4921033
            trunk |      20.8909193     71.4992915
           weight |       0.2759929      4.5211613
           length |       6.0974424    -76.4910106
             turn |      15.9331313   -114.2776716
     displacement |       2.4187068     11.5401247
       gear_ratio |    -259.8006333   -318.6478765
          foreign |     238.8099950   3334.8483415
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |    3902.7312017   9789.4941906
------------------+--------------------------------
r; t=0.01 22:18:07

. storedresults save nopload e()
r; t=0.00 22:18:07

. lasso2 price mpg-foreign, lambda(1000) alpha(0.5) pload(psi_sd)

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
              mpg |     -28.5859633    -21.8051782
            rep78 |      74.9181382    184.7934987
         headroom |     -28.5269294   -635.4921033
            trunk |      20.8909193     71.4992915
           weight |       0.2759929      4.5211613
           length |       6.0974424    -76.4910106
             turn |      15.9331313   -114.2776716
     displacement |       2.4187068     11.5401247
       gear_ratio |    -259.8006333   -318.6478765
          foreign |     238.8099950   3334.8483415
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |    3902.7312017   9789.4941906
------------------+--------------------------------
r; t=0.02 22:18:07

. storedresults compare nopload e(), tol(1e-8)                                            ///
>         exclude(macros: lasso2opt)
r; t=0.01 22:18:07

.
.
. ********************************************************************************
. *** Validate adaptive lasso option                                           ***
. ********************************************************************************
.
. sysuse auto, clear
(1978 Automobile Data)
r; t=0.00 22:18:07

. drop if rep78==.
(5 observations deleted)
r; t=0.00 22:18:07

. cap mat drop sdvec
r; t=0.00 22:18:07

. // standardized variables used to get OLS with std coefs
. foreach var of varlist price mpg-foreign {
  2.         cap drop `var'_sd
  3.         qui sum `var', meanonly
  4.         qui gen double `var'_sd = `var'-r(mean)
  5.         qui sum `var'
  6.         qui replace `var'_sd = `var'_sd * 1/r(sd) * sqrt( r(N)/(r(N)-1) )
  7.         mat sdvec = nullmat(sdvec), r(sd)/sqrt( r(N)/(r(N)-1) )
  8. }
r; t=0.00 22:18:07

. mat ysd = sdvec[1,1]
r; t=0.00 22:18:07

. mat xsd = sdvec[1,2..11]
r; t=0.00 22:18:07

.
. // replicate adaptive lasso
.
. // use standardized coefficients + prestd
. qui reg price_sd mpg_sd-foreign_sd
r; t=0.01 22:18:07

.
. mata: st_matrix("psi",1:/abs(st_matrix("e(b)")))
r; t=0.00 22:18:07

. mat psi = psi[1,1..10]
r; t=0.00 22:18:07

. mat psi2 = J(1,10,1)
r; t=0.00 22:18:07

.
. // lasso
. lasso2 price mpg-foreign, lambda(10000) adaptive prestd

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           weight |       3.5334774      4.6853615
           length |     -19.7902595    -88.7239556
     displacement |       0.6463527     10.6380315
          foreign |    2988.0917572   3772.1989894
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |   -1878.6544500   5391.3216527
------------------+--------------------------------
r; t=0.04 22:18:07

. mat b=e(b)
r; t=0.00 22:18:07

. lasso2 price mpg-foreign, lambda(10000) ploadings(psi) prestd

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           weight |       3.5334774      4.6853615
           length |     -19.7902595    -88.7239556
     displacement |       0.6463527     10.6380315
          foreign |    2988.0917572   3772.1989894
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |   -1878.6544500   5391.3216527
------------------+--------------------------------
r; t=0.03 22:18:07

. assert mreldif(b,e(b)) < 1e-7
r; t=0.00 22:18:07

. // elastic net
. lasso2 price mpg-foreign, lambda(10000) adaptive prestd alpha(0.5)

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
              mpg |      -1.7731610    -89.9090943
         headroom |       1.6386897   -756.8859765
            trunk |       3.1294076    103.3583403
           weight |       0.0495826      4.1010142
           length |       1.3208623    -74.4855993
             turn |       3.8728127   -304.3532932
     displacement |       0.4028925     15.9289515
       gear_ratio |     -16.0118757   1870.1301785
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |    5550.3766506  13831.2257011
------------------+--------------------------------
r; t=0.04 22:18:07

. mat b=e(b)
r; t=0.00 22:18:07

. lasso2 price mpg-foreign, lambda(10000) ploadings(psi) ploadings2(psi2) prestd alpha(0.5)

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
              mpg |      -1.7731610    -89.9090943
         headroom |       1.6386897   -756.8859765
            trunk |       3.1294076    103.3583403
           weight |       0.0495826      4.1010142
           length |       1.3208623    -74.4855993
             turn |       3.8728127   -304.3532932
     displacement |       0.4028925     15.9289515
       gear_ratio |     -16.0118757   1870.1301785
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |    5550.3766506  13831.2257011
------------------+--------------------------------
r; t=0.03 22:18:07

. assert mreldif(b,e(b)) < 1e-7
r; t=0.00 22:18:07

.
. // using adaloadings option + standardized coefficients + prestd
. qui reg price_sd mpg_sd-foreign_sd
r; t=0.01 22:18:07

.
. mata: st_matrix("psi",st_matrix("e(b)"))
r; t=0.00 22:18:07

. mat psi = psi[1,1..10]
r; t=0.00 22:18:07

. mat psi2 = J(1,10,1)
r; t=0.00 22:18:07

.
. // lasso
. lasso2 price mpg-foreign, lambda(10000) adaptive prestd

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           weight |       3.5334774      4.6853615
           length |     -19.7902595    -88.7239556
     displacement |       0.6463527     10.6380315
          foreign |    2988.0917572   3772.1989894
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |   -1878.6544500   5391.3216527
------------------+--------------------------------
r; t=0.03 22:18:07

. mat b=e(b)
r; t=0.00 22:18:07

. lasso2 price mpg-foreign, lambda(10000) adaloadings(psi) prestd

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           weight |       3.5334774      4.6853615
           length |     -19.7902595    -88.7239556
     displacement |       0.6463527     10.6380315
          foreign |    2988.0917572   3772.1989894
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |   -1878.6544500   5391.3216527
------------------+--------------------------------
r; t=0.04 22:18:07

. assert mreldif(b,e(b)) < 1e-7
r; t=0.00 22:18:07

. // elastic net
. lasso2 price mpg-foreign, lambda(10000) adaptive prestd alpha(0.5)

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
              mpg |      -1.7731610    -89.9090943
         headroom |       1.6386897   -756.8859765
            trunk |       3.1294076    103.3583403
           weight |       0.0495826      4.1010142
           length |       1.3208623    -74.4855993
             turn |       3.8728127   -304.3532932
     displacement |       0.4028925     15.9289515
       gear_ratio |     -16.0118757   1870.1301785
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |    5550.3766506  13831.2257011
------------------+--------------------------------
r; t=0.03 22:18:07

. mat b=e(b)
r; t=0.00 22:18:07

. lasso2 price mpg-foreign, lambda(10000) adaloadings(psi) prestd alpha(0.5)

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
              mpg |      -1.7731610    -89.9090943
         headroom |       1.6386897   -756.8859765
            trunk |       3.1294076    103.3583403
           weight |       0.0495826      4.1010142
           length |       1.3208623    -74.4855993
             turn |       3.8728127   -304.3532932
     displacement |       0.4028925     15.9289515
       gear_ratio |     -16.0118757   1870.1301785
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |    5550.3766506  13831.2257011
------------------+--------------------------------
r; t=0.04 22:18:07

. assert mreldif(b,e(b)) < 1e-7
r; t=0.00 22:18:07

.
.
. // use unstandardized coefficients and no prestandardization
. qui reg price mpg-foreign
r; t=0.01 22:18:07

.
. mata: st_matrix("psi",1:/abs(st_matrix("e(b)")))
r; t=0.00 22:18:07

. // note that psi needs to be rescaled by sd(y) in order for lambda to be the same
. mat psi = psi[1,1..10] * ysd[1,1]
r; t=0.00 22:18:07

. mat psi2 = xsd
r; t=0.00 22:18:07

.
. // lasso
. lasso2 price mpg-foreign, lambda(10000) adaptive

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           weight |       3.5334774      4.6853615
           length |     -19.7902595    -88.7239556
     displacement |       0.6463527     10.6380315
          foreign |    2988.0917572   3772.1989894
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |   -1878.6544500   5391.3216527
------------------+--------------------------------
r; t=0.01 22:18:07

. mat b=e(b)
r; t=0.00 22:18:07

. lasso2 price mpg-foreign, lambda(10000) ploadings(psi)

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           weight |       3.5334774      4.6853615
           length |     -19.7902595    -88.7239556
     displacement |       0.6463527     10.6380315
          foreign |    2988.0917572   3772.1989894
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |   -1878.6544500   5391.3216527
------------------+--------------------------------
r; t=0.02 22:18:07

. assert mreldif(b,e(b)) < 1e-7
r; t=0.00 22:18:07

. // elastic net
. lasso2 price mpg-foreign, lambda(10000) adaptive alpha(0.5)

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
              mpg |      -1.7731610    -89.9090943
         headroom |       1.6386897   -756.8859765
            trunk |       3.1294076    103.3583403
           weight |       0.0495826      4.1010142
           length |       1.3208623    -74.4855993
             turn |       3.8728127   -304.3532932
     displacement |       0.4028925     15.9289515
       gear_ratio |     -16.0118757   1870.1301785
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |    5550.3766506  13831.2257011
------------------+--------------------------------
r; t=0.01 22:18:07

. mat b=e(b)
r; t=0.00 22:18:07

. lasso2 price mpg-foreign, lambda(10000) ploadings(psi) ploadings2(psi2) alpha(0.5)

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
              mpg |      -1.7731610    -89.9090943
         headroom |       1.6386897   -756.8859765
            trunk |       3.1294076    103.3583403
           weight |       0.0495826      4.1010142
           length |       1.3208623    -74.4855993
             turn |       3.8728127   -304.3532932
     displacement |       0.4028925     15.9289515
       gear_ratio |     -16.0118757   1870.1301785
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |    5550.3766506  13831.2257011
------------------+--------------------------------
r; t=0.01 22:18:07

. assert mreldif(b,e(b)) < 1e-7
r; t=0.00 22:18:07

.
. // use adaloadings option + unstandardized coefficients + no prestandardization
. qui reg price mpg-foreign
r; t=0.01 22:18:07

.
. mata: st_matrix("psi",st_matrix("e(b)"))
r; t=0.00 22:18:07

. // note that psi does NOT need to be rescaled by sd(y) - handled automatically
. mat psi = psi[1,1..10]
r; t=0.00 22:18:07

. mat psi2 = xsd
r; t=0.00 22:18:07

.
. // lasso
. lasso2 price mpg-foreign, lambda(10000) adaptive

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           weight |       3.5334774      4.6853615
           length |     -19.7902595    -88.7239556
     displacement |       0.6463527     10.6380315
          foreign |    2988.0917572   3772.1989894
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |   -1878.6544500   5391.3216527
------------------+--------------------------------
r; t=0.02 22:18:07

. mat b=e(b)
r; t=0.00 22:18:07

. lasso2 price mpg-foreign, lambda(10000) adaloadings(psi)

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           weight |       3.5334774      4.6853615
           length |     -19.7902595    -88.7239556
     displacement |       0.6463527     10.6380315
          foreign |    2988.0917572   3772.1989894
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |   -1878.6544500   5391.3216527
------------------+--------------------------------
r; t=0.02 22:18:07

. assert mreldif(b,e(b)) < 1e-7
r; t=0.00 22:18:07

. // elastic net
. lasso2 price mpg-foreign, lambda(10000) adaptive alpha(0.5)

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
              mpg |      -1.7731610    -89.9090943
         headroom |       1.6386897   -756.8859765
            trunk |       3.1294076    103.3583403
           weight |       0.0495826      4.1010142
           length |       1.3208623    -74.4855993
             turn |       3.8728127   -304.3532932
     displacement |       0.4028925     15.9289515
       gear_ratio |     -16.0118757   1870.1301785
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |    5550.3766506  13831.2257011
------------------+--------------------------------
r; t=0.01 22:18:07

. mat b=e(b)
r; t=0.00 22:18:07

. lasso2 price mpg-foreign, lambda(10000) adaloadings(psi) alpha(0.5)

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
              mpg |      -1.7731610    -89.9090943
         headroom |       1.6386897   -756.8859765
            trunk |       3.1294076    103.3583403
           weight |       0.0495826      4.1010142
           length |       1.3208623    -74.4855993
             turn |       3.8728127   -304.3532932
     displacement |       0.4028925     15.9289515
       gear_ratio |     -16.0118757   1870.1301785
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |    5550.3766506  13831.2257011
------------------+--------------------------------
r; t=0.02 22:18:07

. assert mreldif(b,e(b)) < 1e-7
r; t=0.00 22:18:07

.
.
.
. // confirm prestd and no prestd yield same estimates
. // lasso, theta=1
. lasso2 price mpg-foreign, lambda(10000) adaptive

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           weight |       3.5334774      4.6853615
           length |     -19.7902595    -88.7239556
     displacement |       0.6463527     10.6380315
          foreign |    2988.0917572   3772.1989894
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |   -1878.6544500   5391.3216527
------------------+--------------------------------
r; t=0.02 22:18:07

. mat b=e(b)
r; t=0.00 22:18:07

. lasso2 price mpg-foreign, lambda(10000) adaptive prestd

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           weight |       3.5334774      4.6853615
           length |     -19.7902595    -88.7239556
     displacement |       0.6463527     10.6380315
          foreign |    2988.0917572   3772.1989894
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |   -1878.6544500   5391.3216527
------------------+--------------------------------
r; t=0.04 22:18:07

. assert mreldif(b,e(b)) < 1e-7
r; t=0.00 22:18:07

. // lasso, theta=2
. lasso2 price mpg-foreign, lambda(10000) adaptive adatheta(2)

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           weight |       2.9162209      3.3828729
          foreign |    2554.2046516   3628.9674452
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |   -3473.3895778  -5215.3936539
------------------+--------------------------------
r; t=0.01 22:18:07

. mat b=e(b)
r; t=0.00 22:18:07

. lasso2 price mpg-foreign, lambda(10000) adaptive prestd adatheta(2)

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           weight |       2.9162209      3.3828729
          foreign |    2554.2046516   3628.9674452
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |   -3473.3895778  -5215.3936539
------------------+--------------------------------
r; t=0.04 22:18:07

. assert mreldif(b,e(b)) < 1e-7
r; t=0.00 22:18:07

. // elastic net
. lasso2 price mpg-foreign, lambda(10000) adaptive alpha(0.5) adatheta(2)

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           weight |       0.0511985      3.9403854
           length |       1.3208071    -92.2794260
     displacement |       0.3645126      5.3125473
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |    5669.9399653  10522.0760112
------------------+--------------------------------
r; t=0.01 22:18:08

. mat b=e(b)
r; t=0.00 22:18:08

. lasso2 price mpg-foreign, lambda(10000) adaptive prestd alpha(0.5) adatheta(2)

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           weight |       0.0511985      3.9403854
           length |       1.3208071    -92.2794260
     displacement |       0.3645126      5.3125473
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |    5669.9399653  10522.0760112
------------------+--------------------------------
r; t=0.04 22:18:08

. assert mreldif(b,e(b)) < 1e-7
r; t=0.00 22:18:08

.
.
.
. * lglmnet version
. * lglmnet standardizes automatically unless overridden by nostd (=unitloadings)
.
. // replicate adaptive lasso with lglmnet and no standardization
. // nostd overrides standardization
.
. // use unstandardized coefficients
. qui reg price mpg-foreign
r; t=0.01 22:18:08

.
. mata: st_matrix("psi",1:/abs(st_matrix("e(b)")))
r; t=0.00 22:18:08

. mat psi = psi[1,1..10]
r; t=0.00 22:18:08

. mat psi2 = J(1,10,1)
r; t=0.00 22:18:08

.
. // lasso
. lasso2 price mpg-foreign, lambda(1000) adaptive lglmnet nostd

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
         headroom |    -440.1455978   -644.6517590
            trunk |       9.5308793     79.2360875
           weight |       4.3899470      4.6208329
           length |     -61.7840967    -73.5220097
             turn |     -85.5802843   -129.6162788
     displacement |      11.1119369     12.4392195
          foreign |    3489.0544931   3451.0082476
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |    5800.4084112   8454.4644106
------------------+--------------------------------
r; t=0.02 22:18:08

. mat b=e(b)
r; t=0.00 22:18:08

. lasso2 price mpg-foreign, lambda(1000) ploadings(psi) nostd lglmnet

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
         headroom |    -440.1455978   -644.6517590
            trunk |       9.5308793     79.2360875
           weight |       4.3899470      4.6208329
           length |     -61.7840967    -73.5220097
             turn |     -85.5802843   -129.6162788
     displacement |      11.1119369     12.4392195
          foreign |    3489.0544931   3451.0082476
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |    5800.4084111   8454.4644106
------------------+--------------------------------
r; t=0.02 22:18:08

. assert mreldif(b,e(b)) < 1e-7
r; t=0.00 22:18:08

. // elastic net
. lasso2 price mpg-foreign, lambda(1000) adaptive lglmnet nostd alpha(0.5)

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
              mpg |     -18.6207172    -21.8051782
            rep78 |     362.5658033    184.7934987
         headroom |    -418.9268142   -635.4921033
            trunk |      25.3948022     71.4992915
           weight |       4.2253682      4.5211613
           length |     -67.6630819    -76.4910106
             turn |    -167.8771315   -114.2776716
     displacement |      10.0720132     11.5401247
       gear_ratio |      60.6712517   -318.6478765
          foreign |    1188.4949021   3334.8483415
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |   10282.6556138   9789.4941906
------------------+--------------------------------
r; t=0.02 22:18:08

. mat b=e(b)
r; t=0.00 22:18:08

. lasso2 price mpg-foreign, lambda(1000) ploadings(psi) ploadings2(psi2) nostd lglmnet alpha(0.5)

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
              mpg |     -18.6207172    -21.8051782
            rep78 |     362.5658033    184.7934987
         headroom |    -418.9268142   -635.4921033
            trunk |      25.3948022     71.4992915
           weight |       4.2253682      4.5211613
           length |     -67.6630819    -76.4910106
             turn |    -167.8771315   -114.2776716
     displacement |      10.0720132     11.5401247
       gear_ratio |      60.6712517   -318.6478765
          foreign |    1188.4949021   3334.8483415
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |   10282.6556138   9789.4941906
------------------+--------------------------------
r; t=0.03 22:18:08

. assert mreldif(b,e(b)) < 1e-7
r; t=0.00 22:18:08

.
. // use adaloadings option + unstandardized coefficients + no standardization
. qui reg price mpg-foreign
r; t=0.01 22:18:08

.
. mata: st_matrix("psi",st_matrix("e(b)"))
r; t=0.00 22:18:08

. mat psi = psi[1,1..10]
r; t=0.00 22:18:08

.
. // lasso
. lasso2 price mpg-foreign, lambda(10000) adaptive lglmnet nostd

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           weight |       3.1464495      6.0428546
           length |      -5.3719360    -97.6734830
          foreign |    2852.4835871   3639.2055334
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |   -3250.7487475   5107.2746990
------------------+--------------------------------
r; t=0.01 22:18:08

. mat b=e(b)
r; t=0.00 22:18:08

. lasso2 price mpg-foreign, lambda(10000) adaloadings(psi) nostd lglmnet

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           weight |       3.1464495      6.0428546
           length |      -5.3719360    -97.6734830
          foreign |    2852.4835871   3639.2055334
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |   -3250.7487475   5107.2746990
------------------+--------------------------------
r; t=0.02 22:18:08

. assert mreldif(b,e(b)) < 1e-7
r; t=0.00 22:18:08

. // elastic net
. lasso2 price mpg-foreign, lambda(10000) adaptive lglmnet nostd alpha(0.5)

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
         headroom |     -43.1512387   -494.2807994
           weight |       3.3803895      4.5188718
           length |     -43.1770991    -62.0918378
             turn |     -47.7861837   -133.5774107
     displacement |       0.8558751     12.7937015
          foreign |     210.2772802   3492.6255532
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |    5824.1590005   7338.6665901
------------------+--------------------------------
r; t=0.02 22:18:08

. mat b=e(b)
r; t=0.00 22:18:08

. lasso2 price mpg-foreign, lambda(10000) adaloadings(psi) nostd lglmnet alpha(0.5)

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
         headroom |     -43.1512387   -494.2807994
           weight |       3.3803895      4.5188718
           length |     -43.1770991    -62.0918378
             turn |     -47.7861837   -133.5774107
     displacement |       0.8558751     12.7937015
          foreign |     210.2772802   3492.6255532
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |    5824.1590005   7338.6665901
------------------+--------------------------------
r; t=0.02 22:18:08

. assert mreldif(b,e(b)) < 1e-7
r; t=0.00 22:18:08

.
. // replicate adaptive lasso with lglmnet and standardization
. // lglmnet standardizes by default unless overridden by nostd
.
. // use standardized coefficients
. // note dep var doesn't have to be standardized
. qui reg price mpg_sd-foreign_sd
r; t=0.01 22:18:08

.
. mata: st_matrix("psi",1:/abs(st_matrix("e(b)")))
r; t=0.00 22:18:08

. mat psi = psi[1,1..10]
r; t=0.00 22:18:08

. mat psi2 = J(1,10,1)
r; t=0.00 22:18:08

.
. // lasso
. lasso2 price mpg-foreign, lambda(1000) adaptive lglmnet

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           weight |       2.8683662      3.3828729
          foreign |    2584.3490652   3628.9674452
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |   -3337.4670369  -5215.3936539
------------------+--------------------------------
r; t=0.03 22:18:08

. mat b=e(b)
r; t=0.00 22:18:08

. lasso2 price mpg-foreign, lambda(1000) ploadings(psi) lglmnet

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           weight |       2.8683662      3.3828729
          foreign |    2584.3490655   3628.9674452
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |   -3337.4670377  -5215.3936539
------------------+--------------------------------
r; t=0.04 22:18:08

. assert mreldif(b,e(b)) < 1e-7
r; t=0.00 22:18:08

. // elastic net
. lasso2 price mpg-foreign, lambda(1000) adaptive lglmnet alpha(0.5)

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           weight |       1.5738510      1.9042391
     displacement |       8.1371763     14.1230186
          foreign |    2076.6614435   3806.7745563
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |    -869.1066989  -3582.6060008
------------------+--------------------------------
r; t=0.03 22:18:08

. mat b=e(b)
r; t=0.00 22:18:08

. lasso2 price mpg-foreign, lambda(1000) ploadings(psi) ploadings2(psi2) lglmnet alpha(0.5)

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           weight |       1.5738510      1.9042391
     displacement |       8.1371763     14.1230186
          foreign |    2076.6614435   3806.7745563
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |    -869.1066989  -3582.6060008
------------------+--------------------------------
r; t=0.04 22:18:08

. assert mreldif(b,e(b)) < 1e-7
r; t=0.00 22:18:08

.
. // use standardized coefficients + adaloadings option
. // note dep var doesn't have to be standardized
. qui reg price mpg_sd-foreign_sd
r; t=0.01 22:18:08

.
. mata: st_matrix("psi",st_matrix("e(b)"))
r; t=0.00 22:18:08

. mat psi = psi[1,1..10]
r; t=0.00 22:18:08

.
. // lasso
. lasso2 price mpg-foreign, lambda(1000) adaptive lglmnet

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           weight |       2.8683662      3.3828729
          foreign |    2584.3490652   3628.9674452
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |   -3337.4670369  -5215.3936539
------------------+--------------------------------
r; t=0.03 22:18:08

. mat b=e(b)
r; t=0.00 22:18:08

. lasso2 price mpg-foreign, lambda(1000) adaloadings(psi) lglmnet

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           weight |       2.8683662      3.3828729
          foreign |    2584.3490652   3628.9674452
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |   -3337.4670369  -5215.3936539
------------------+--------------------------------
r; t=0.04 22:18:08

. assert mreldif(b,e(b)) < 1e-7
r; t=0.00 22:18:08

. // elastic net
. lasso2 price mpg-foreign, lambda(1000) adaptive lglmnet alpha(0.5)

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           weight |       1.5738510      1.9042391
     displacement |       8.1371763     14.1230186
          foreign |    2076.6614435   3806.7745563
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |    -869.1066989  -3582.6060008
------------------+--------------------------------
r; t=0.03 22:18:08

. mat b=e(b)
r; t=0.00 22:18:08

. lasso2 price mpg-foreign, lambda(1000) adaloadings(psi) lglmnet alpha(0.5)

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           weight |       1.5738510      1.9042391
     displacement |       8.1371763     14.1230186
          foreign |    2076.6614435   3806.7745563
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |    -869.1066989  -3582.6060008
------------------+--------------------------------
r; t=0.04 22:18:08

. assert mreldif(b,e(b)) < 1e-7
r; t=0.00 22:18:08

.
.
.
. ********************************************************************************
. *** replicate sqrt-lasso Matlab program                                                                          ***
. ********************************************************************************
.
. * load example data
. insheet using "$prostate", tab clear
(11 vars, 97 obs)
r; t=0.74 22:18:09

. global model lpsa lcavol lweight age lbph svi lcp gleason pgg45
r; t=0.00 22:18:09

.
. // uses the Matlab code "SqrtLassoIterative.m" (available on request)
.
. lasso2 $model, sqrt l(40) unitload

------------------+--------------------------------
         Selected |      Sqrt-lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.3633759      0.6650165
            pgg45 |       0.0102638      0.0052330
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.7375806      1.4530193
------------------+--------------------------------
r; t=0.02 22:18:09

. mat a=e(betaAll)
r; t=0.00 22:18:09

. /*
> ans =
>
>     0.3627
>          0
>          0
>          0
>          0
>          0
>          0
>     0.0103
>     1.7383
> */
. mat b = (0.3627,0,0,0,0,0,0,0.0103,1.7383)
r; t=0.00 22:18:09

. comparemat a b
mreldif=.0004960154300146. tolerance = .01

__000000[1,9]
                         o.         o.         o.         o.         o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .36337592          0          0          0          0          0

              o.
        gleason      pgg45      _cons
lpsa          0  .01026376  1.7375806

__000001[1,9]
        c1      c2      c3      c4      c5      c6      c7      c8      c9
r1   .3627       0       0       0       0       0       0   .0103  1.7383
r; t=0.04 22:18:09

.
. lasso2 $model, sqrt l(10) unitload

------------------+--------------------------------
         Selected |      Sqrt-lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5770595      0.5234981
          lweight |       0.1966298      0.6152349
              age |      -0.0091588     -0.0190343
             lbph |       0.0773017      0.0954908
              svi |       0.0684991      0.6358643
            pgg45 |       0.0063071      0.0035248
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.3943635      0.5214696
------------------+--------------------------------
r; t=0.02 22:18:09

. mat a=e(betaAll)
r; t=0.00 22:18:09

. /*
> ans =
>
>     0.5771
>     0.1965
>    -0.0092
>     0.0773
>     0.0685
>          0
>          0
>     0.0063
>     1.3946
> */
. mat b = (0.5771,0.1965,-0.0092,0.0773,0.0685,0,0,0.0063,1.3946)
r; t=0.00 22:18:09

. comparemat a b
mreldif=.0001084546926302. tolerance = .01

__000000[1,9]
                                                                           o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa    .5770595   .19662977  -.00915877   .07730169   .06849909           0

               o.
         gleason       pgg45       _cons
lpsa           0   .00630709   1.3943635

__000001[1,9]
        c1      c2      c3      c4      c5      c6      c7      c8      c9
r1   .5771   .1965  -.0092   .0773   .0685       0       0   .0063  1.3946
r; t=0.00 22:18:09

.
. lasso2 $model, sqrt l(1) unitload

------------------+--------------------------------
         Selected |      Sqrt-lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5610670      0.5643413
          lweight |       0.5773233      0.6220198
              age |      -0.0195493     -0.0212482
             lbph |       0.0950561      0.0967125
              svi |       0.6699614      0.7616733
              lcp |      -0.0766178     -0.1060509
          gleason |       0.0085670      0.0492279
            pgg45 |       0.0049412      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.5277550      0.1815609
------------------+--------------------------------
r; t=0.03 22:18:09

. mat a=e(betaAll)
r; t=0.00 22:18:09

. /*
> ans =
>
>     0.5610
>     0.5774
>    -0.0196
>     0.0950
>     0.6700
>    -0.0766
>     0.0088
>     0.0049
>     0.5259
> */
. mat b = (0.5610, 0.5774,-0.0196,0.0950,0.6700,-0.0766,0.0088,0.0049,0.5259)
r; t=0.00 22:18:09

. comparemat a b
mreldif=.0012156660543233. tolerance = .01

__000000[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .56106703   .57732328  -.01954931   .09505606   .66996142  -.07661781

         gleason       pgg45       _cons
lpsa   .00856705   .00494122   .52775498

__000001[1,9]
        c1      c2      c3      c4      c5      c6      c7      c8      c9
r1    .561   .5774  -.0196    .095     .67  -.0766   .0088   .0049   .5259
r; t=0.00 22:18:09

.
. ********************************************************************************
. *** validation using Stata's elasticnet                                                                          ***
. ********************************************************************************
.
. // ridge (requires 2 grid points for some reason)
. cap noi elasticnet linear $model, alphas(0) grid(2, min(0.25))

Evaluating up to 2 lambdas in grid ...
Grid value 1:     lambda = 8.43e+07   no. of nonzero coef. =       8
Grid value 2:     lambda =      .25   no. of nonzero coef. =       8

10-fold cross-validation with 2 lambdas ...
Fold  1 of 10:  .
Fold  2 of 10:  .
Fold  3 of 10:  .
Fold  4 of 10:  .
Fold  5 of 10:  .
Fold  6 of 10:  .
Fold  7 of 10:  .
Fold  8 of 10:  .
Fold  9 of 10:  .
Fold 10 of 10:  .
... cross-validation complete

Elastic net linear model                         No. of obs        =         97
                                                 No. of covariates =          8
Selection: Cross-validation                      No. of CV folds   =         10

---------------+---------------------------------------------------------------
               |                               No. of       Out-of-       CV mean
               |                              nonzero        sample    prediction
 alpha        ID |     Description      lambda     coef.     R-squared         error
---------------+---------------------------------------------------------------
 0.000         |
             1 |    first lambda    843.4274         8        0.0280      1.355655
           * 2 | selected lambda         .25         8        0.5751      .5602684
---------------+---------------------------------------------------------------
* alpha and lambda selected by cross-validation.
r; t=1.32 22:18:10

. lassoselect alpha = 0 lambda = 0.25
ID = 2  alpha = 0.000  lambda = .25      selected
r; t=0.19 22:18:10

. lassocoef, display(coef, penalized)

-------------+----------
             |    active
-------------+----------
      lcavol |   .3939533
     lweight |   .5517851
         age |  -.0103746
        lbph |   .0707619
         svi |   .5883225
         lcp |   .0293956
     gleason |   .0748372
       pgg45 |   .0027223
       _cons |  -.0941823
-------------+----------
Legend:
  b - base level
  e - empty cell
  o - omitted
r; t=0.81 22:18:11

. mat b=e(b)
r; t=0.00 22:18:11

. // Stata lambda = 2N*lambda
. global L=2*e(N)*0.25
r; t=0.00 22:18:11

. lasso2 $model, lambda($L) alpha(0)

------------------+--------------------------------
         Selected |           Ridge   Post-est OLS
------------------+--------------------------------
           lcavol |       0.3939533      0.5643413
          lweight |       0.5517851      0.6220198
              age |      -0.0103746     -0.0212482
             lbph |       0.0707619      0.0967125
              svi |       0.5883225      0.7616733
              lcp |       0.0293956     -0.1060509
          gleason |       0.0748372      0.0492279
            pgg45 |       0.0027223      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.0941823      0.1815609
------------------+--------------------------------
r; t=0.02 22:18:11

. assert mreldif(b,e(b))<1e-7
r; t=0.00 22:18:11

.
. // lasso
. cap noi elasticnet linear $model, alphas(1) grid(1, min(0.25))

10-fold cross-validation with 1 lambdas ...
Grid value 1:     lambda =      .25   no. of nonzero coef. =       3


Folds: 1...5....10   CVF = .6486693


Elastic net linear model                         No. of obs        =         97
                                                 No. of covariates =          8
Selection: Cross-validation                      No. of CV folds   =         10

---------------+---------------------------------------------------------------
               |                               No. of       Out-of-       CV mean
               |                              nonzero        sample    prediction
 alpha        ID |     Description      lambda     coef.     R-squared         error
---------------+---------------------------------------------------------------
 1.000         |
           * 1 | selected lambda         .25         3        0.5081      .6486693
---------------+---------------------------------------------------------------
* alpha and lambda selected by cross-validation.
r; t=0.37 22:18:12

. lassoselect alpha = 1 lambda = 0.25
ID = 1  alpha = 1.000  lambda = .25      selected
r; t=0.09 22:18:12

. lassocoef, display(coef, penalized)

-------------+----------
             |    active
-------------+----------
      lcavol |   .4332965
     lweight |   .2054252
         svi |   .2740219
       _cons |   1.088632
-------------+----------
Legend:
  b - base level
  e - empty cell
  o - omitted
r; t=0.01 22:18:12

. mat b=e(b)
r; t=0.00 22:18:12

. // Stata lambda = 2N*lambda
. global L=2*e(N)*0.25
r; t=0.00 22:18:12

. lasso2 $model, lambda($L)

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.4332964      0.5258519
          lweight |       0.2054252      0.6617699
              svi |       0.2740219      0.6656665
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.0886320     -0.7771568
------------------+--------------------------------
r; t=0.04 22:18:12

. assert mreldif(b,e(b))<1e-7
r; t=0.00 22:18:12

.
. // elastic net
. cap noi elasticnet linear $model, alphas(0.5) grid(1, min(0.25))

10-fold cross-validation with 1 lambdas ...
Grid value 1:     lambda =      .25   no. of nonzero coef. =       5


Folds: 1...5....10   CVF =  .611926


Elastic net linear model                         No. of obs        =         97
                                                 No. of covariates =          8
Selection: Cross-validation                      No. of CV folds   =         10

---------------+---------------------------------------------------------------
               |                               No. of       Out-of-       CV mean
               |                              nonzero        sample    prediction
 alpha        ID |     Description      lambda     coef.     R-squared         error
---------------+---------------------------------------------------------------
 0.500         |
           * 1 | selected lambda         .25         5        0.5360       .611926
---------------+---------------------------------------------------------------
* alpha and lambda selected by cross-validation.
r; t=0.29 22:18:12

. lassoselect alpha = 0.5 lambda = 0.25
ID = 1  alpha = 0.500  lambda = .25      selected
r; t=0.07 22:18:12

. lassocoef, display(coef, penalized)

-------------+----------
             |    active
-------------+----------
      lcavol |   .4153708
     lweight |   .4184833
        lbph |   .0019552
         svi |   .4724444
       pgg45 |   .0012783
       _cons |   .2653353
-------------+----------
Legend:
  b - base level
  e - empty cell
  o - omitted
r; t=0.01 22:18:12

. mat b=e(b)
r; t=0.00 22:18:12

. // Stata lambda = 2N*lambda
. global L=2*e(N)*0.25
r; t=0.00 22:18:12

. lasso2 $model, lambda($L) alpha(0.5)

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.4153708      0.5125769
          lweight |       0.4184833      0.5490809
             lbph |       0.0019552      0.0721513
              svi |       0.4724444      0.6496250
            pgg45 |       0.0012783      0.0024450
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.2653354     -0.4136749
------------------+--------------------------------
r; t=0.02 22:18:12

. assert mreldif(b,e(b))<1e-7
r; t=0.00 22:18:12

.
.
. ********************************************************************************
. *** norecover option                                                                                                             ***
. ********************************************************************************
.
. // partial() with constant
. lasso2 $model, partial(age) l(50 20 10)

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1   50.00000    3     0.88384    -30.85353   0.5296  | Added lcavol
      |                                                         | lweight svi
      |                                                         | age _cons.
     2 |   2   20.00000    5     1.48772    -43.08865   0.6227  | Added lbph
      |                                                         | pgg45.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


r; t=0.05 22:18:12

. mat A = e(betas)
r; t=0.00 22:18:12

. mat A = A[2,1..9]
r; t=0.00 22:18:12

. lasso2 $model, l(20) partial(age) postall

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.4879089      0.5234981
          lweight |       0.4887205      0.6152349
             lbph |       0.0240670      0.0954908
              svi |       0.4857605      0.6358643
            pgg45 |       0.0012652      0.0035248
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
              age |      -0.0070139     -0.0190343
            _cons |       0.3556899      0.5214696
------------------+--------------------------------
r; t=0.05 22:18:12

. mat B = e(b)
r; t=0.00 22:18:12

. comparemat A B
mreldif=4.69906603143e-11. tolerance = .01

__000000[1,9]
       lcavol    lweight       lbph        svi        lcp    gleason
r2  .48790885  .48872051    .024067  .48576053          0          0

        pgg45        age      _cons
r2  .00126516  -.0070139   .3556899

__000001[1,9]
                                                        o.         o.
       lcavol    lweight       lbph        svi        lcp    gleason
y1  .48790885  .48872051    .024067  .48576053          0          0


        pgg45        age      _cons
y1  .00126516  -.0070139   .3556899
r; t=0.00 22:18:12

.
. lasso2 $model, partial(age) l(50 20 10) nor

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1   50.00000    3     0.88384    -30.85353   0.5296  | Added lcavol
      |                                                         | lweight svi.
     2 |   2   20.00000    5     1.48772    -43.08865   0.6227  | Added lbph
      |                                                         | pgg45.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


r; t=0.01 22:18:12

. mat A = e(betas)
r; t=0.00 22:18:12

. mat A = A[2,1..7]
r; t=0.00 22:18:12

. lasso2 $model, l(20) partial(age) nor postall

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.4879089      0.5234981
          lweight |       0.4887205      0.6152349
             lbph |       0.0240670      0.0954908
              svi |       0.4857605      0.6358643
            pgg45 |       0.0012652      0.0035248
------------------+--------------------------------
r; t=0.03 22:18:12

. mat B = e(b)
r; t=0.00 22:18:12

. comparemat A B
mreldif=1.40447206847e-11. tolerance = .01

__000000[1,7]
       lcavol    lweight       lbph        svi        lcp    gleason
r2  .48790885  .48872051    .024067  .48576053          0          0

        pgg45
r2  .00126516

__000001[1,7]
                                                        o.         o.
       lcavol    lweight       lbph        svi        lcp    gleason
y1  .48790885  .48872051    .024067  .48576053          0          0


        pgg45
y1  .00126516
r; t=0.00 22:18:12

.
. // partial() with constant, unitloadings
. lasso2 $model, partial(age) l(50 20 10) unitl

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1   50.00000    2     0.44612    -28.38394   0.4942  | Added lcavol
      |                                                         | pgg45 age
      |                                                         | _cons.
     2 |   2   20.00000    4     0.69624    -32.94118   0.5608  | Added
      |                                                         | lweight lbph.
     3 |   3   10.00000    5     1.22372    -42.78188   0.6215  | Added svi.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


r; t=0.05 22:18:12

. mat A = e(betas)
r; t=0.00 22:18:12

. mat A = A[2,1..9]
r; t=0.00 22:18:12

. lasso2 $model, l(20) partial(age) postall unitl

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5779927      0.6120732
          lweight |       0.0317167      0.6699703
             lbph |       0.0796774      0.0686520
            pgg45 |       0.0068551      0.0062945
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
              age |      -0.0075357     -0.0201907
            _cons |       1.8891378      0.3499401
------------------+--------------------------------
r; t=0.04 22:18:12

. mat B = e(b)
r; t=0.00 22:18:12

. comparemat A B
mreldif=2.51999769599e-12. tolerance = .01

__000000[1,9]
        lcavol     lweight        lbph         svi         lcp     gleason
r2    .5779927   .03171671   .07967742           0           0           0

         pgg45         age       _cons
r2   .00685509  -.00753574   1.8891378

__000001[1,9]
                                                 o.          o.          o.
        lcavol     lweight        lbph         svi         lcp     gleason
y1    .5779927   .03171671   .07967742           0           0           0


         pgg45         age       _cons
y1   .00685509  -.00753574   1.8891378
r; t=0.00 22:18:12

.
. lasso2 $model, partial(age) l(50 20 10) nor  unitl

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1   50.00000    2     0.44612    -28.38394   0.4942  | Added lcavol
      |                                                         | pgg45.
     2 |   2   20.00000    4     0.69624    -32.94118   0.5608  | Added
      |                                                         | lweight lbph.
     3 |   3   10.00000    5     1.22372    -42.78188   0.6215  | Added svi.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


r; t=0.01 22:18:12

. mat A = e(betas)
r; t=0.00 22:18:12

. mat A = A[2,1..7]
r; t=0.00 22:18:12

. lasso2 $model, l(20) partial(age) nor postall unitl

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5779927      0.6120732
          lweight |       0.0317167      0.6699703
             lbph |       0.0796774      0.0686520
            pgg45 |       0.0068551      0.0062945
------------------+--------------------------------
r; t=0.02 22:18:12

. mat B = e(b)
r; t=0.00 22:18:12

. comparemat A B
mreldif=2.31267159350e-12. tolerance = .01

__000000[1,7]
       lcavol    lweight       lbph        svi        lcp    gleason
r2   .5779927  .03171671  .07967742          0          0          0

        pgg45
r2  .00685509

__000001[1,7]
                                             o.         o.         o.
       lcavol    lweight       lbph        svi        lcp    gleason
y1   .5779927  .03171671  .07967742          0          0          0


        pgg45
y1  .00685509
r; t=0.00 22:18:12

.
. // no partial() w/ constant, unitloadings
. lasso2 $model, l(50 20 10) unitl

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1   50.00000    2     0.44733    -28.46301   0.5091  | Added lcavol
      |                                                         | pgg45 _cons.
     2 |   2   20.00000    5     0.68869    -27.87450   0.5713  | Added
      |                                                         | lweight age
      |                                                         | lbph.
     3 |   3   10.00000    6     1.23031    -38.07893   0.6319  | Added svi.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


r; t=0.02 22:18:12

. mat A = e(betas)
r; t=0.00 22:18:12

. mat A = A[2,1..9]
r; t=0.00 22:18:12

. lasso2 $model, l(20) postall unitl

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5768407      0.6120732
          lweight |       0.0234046      0.6699703
              age |      -0.0051037     -0.0201907
             lbph |       0.0766171      0.0686520
            pgg45 |       0.0067246      0.0062945
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.7690211      0.3499401
------------------+--------------------------------
r; t=0.02 22:18:12

. mat B = e(b)
r; t=0.00 22:18:12

. comparemat A B
mreldif=3.17788397701e-13. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r2  .57684069  .02340457  -.0051037  .07661707          0          0

      gleason      pgg45      _cons
r2          0  .00672461  1.7690211

__000001[1,9]
                                                        o.         o.
       lcavol    lweight        age       lbph        svi        lcp
y1  .57684069  .02340457  -.0051037  .07661707          0          0

            o.
      gleason      pgg45      _cons
y1          0  .00672461  1.7690211
r; t=0.00 22:18:12

.
. lasso2 $model, l(50 20 10) nor  unitl

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1   50.00000    2     0.44733    -28.46301   0.5091  | Added lcavol
      |                                                         | pgg45 _cons.
     2 |   2   20.00000    5     0.68869    -27.87450   0.5713  | Added
      |                                                         | lweight age
      |                                                         | lbph.
     3 |   3   10.00000    6     1.23031    -38.07893   0.6319  | Added svi.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


r; t=0.01 22:18:12

. mat A = e(betas)
r; t=0.00 22:18:12

. mat A = A[2,1..9]
r; t=0.00 22:18:12

. lasso2 $model, l(20) nor postall unitl

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5768407      0.6120732
          lweight |       0.0234046      0.6699703
              age |      -0.0051037     -0.0201907
             lbph |       0.0766171      0.0686520
            pgg45 |       0.0067246      0.0062945
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.7690211      0.3499401
------------------+--------------------------------
r; t=0.02 22:18:12

. mat B = e(b)
r; t=0.00 22:18:12

. comparemat A B
mreldif=3.17788397701e-13. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r2  .57684069  .02340457  -.0051037  .07661707          0          0

      gleason      pgg45      _cons
r2          0  .00672461  1.7690211

__000001[1,9]
                                                        o.         o.
       lcavol    lweight        age       lbph        svi        lcp
y1  .57684069  .02340457  -.0051037  .07661707          0          0

            o.
      gleason      pgg45      _cons
y1          0  .00672461  1.7690211
r; t=0.00 22:18:12

.
. // no partial() w/o constant, unit loadings
. lasso2 $model, l(50 20 10) unitl nocons

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1   50.00000    3     0.47079    -23.56753   0.9088  | Added lcavol
      |                                                         | age pgg45.
     2 |   2   20.00000    5     0.91164    -36.39277   0.9272  | Added
      |                                                         | lweight lbph.
     3 |   3   10.00000    6     1.31660    -42.77476   0.9350  | Added svi.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


r; t=0.04 22:18:12

. mat A = e(betas)
r; t=0.00 22:18:12

. mat A = A[2,1..8]
r; t=0.00 22:18:12

. lasso2 $model, l(20) postall unitl nocons

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5456868      0.6062460
          lweight |       0.3355068      0.7214320
              age |       0.0054302     -0.0175089
             lbph |       0.0183596      0.0574396
            pgg45 |       0.0066569      0.0062373
------------------+--------------------------------
r; t=0.04 22:18:13

. mat B = e(b)
r; t=0.00 22:18:13

. comparemat A B
mreldif=9.26185810671e-09. tolerance = .01

__000000[1,8]
       lcavol    lweight        age       lbph        svi        lcp
r2  .54568677  .33550676  .00543024   .0183596          0          0

      gleason      pgg45
r2          0  .00665687

__000001[1,8]
                                                        o.         o.
       lcavol    lweight        age       lbph        svi        lcp
y1  .54568677  .33550677  .00543024   .0183596          0          0

            o.
      gleason      pgg45
y1          0  .00665687
r; t=0.00 22:18:13

.
. lasso2 $model, l(50 20 10) nor unitl nocons

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1   50.00000    3     0.47079    -23.56753   0.9088  | Added lcavol
      |                                                         | age pgg45.
     2 |   2   20.00000    5     0.91164    -36.39277   0.9272  | Added
      |                                                         | lweight lbph.
     3 |   3   10.00000    6     1.31660    -42.77476   0.9350  | Added svi.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


r; t=0.04 22:18:13

. mat A = e(betas)
r; t=0.00 22:18:13

. mat A = A[2,1..8]
r; t=0.00 22:18:13

. lasso2 $model, l(20) nor postall unitl nocons

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5456868      0.6062460
          lweight |       0.3355068      0.7214320
              age |       0.0054302     -0.0175089
             lbph |       0.0183596      0.0574396
            pgg45 |       0.0066569      0.0062373
------------------+--------------------------------
r; t=0.03 22:18:13

. mat B = e(b)
r; t=0.00 22:18:13

. comparemat A B
mreldif=9.26185810671e-09. tolerance = .01

__000000[1,8]
       lcavol    lweight        age       lbph        svi        lcp
r2  .54568677  .33550676  .00543024   .0183596          0          0

      gleason      pgg45
r2          0  .00665687

__000001[1,8]
                                                        o.         o.
       lcavol    lweight        age       lbph        svi        lcp
y1  .54568677  .33550677  .00543024   .0183596          0          0

            o.
      gleason      pgg45
y1          0  .00665687
r; t=0.00 22:18:13

.
.
. ********************************************************************************
. *** options                                                                                                                                      ***
. ********************************************************************************
.
. cap lasso2 $model, alpha(0) sqrt
r; t=0.00 22:18:13

. if _rc != 198 {
.         exit 1
r; t=0.00 22:18:13
. }
r; t=0.00 22:18:13

. *
. // should say that lcount/lmax/lminr are being ignored
. lasso2 $model, lambda(10) lcount(10)

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5000819      0.5234981
          lweight |       0.5144276      0.6152349
              age |      -0.0036627     -0.0190343
             lbph |       0.0468469      0.0954908
              svi |       0.5695171      0.6358643
            pgg45 |       0.0017981      0.0035248
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.0014767      0.5214696
------------------+--------------------------------
r; t=0.01 22:18:13

. lasso2 $model, lambda(10) lmax(100)

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5000819      0.5234981
          lweight |       0.5144276      0.6152349
              age |      -0.0036627     -0.0190343
             lbph |       0.0468469      0.0954908
              svi |       0.5695171      0.6358643
            pgg45 |       0.0017981      0.0035248
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.0014767      0.5214696
------------------+--------------------------------
r; t=0.01 22:18:13

. lasso2 $model, lambda(10) lminr(0.01)

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5000819      0.5234981
          lweight |       0.5144276      0.6152349
              age |      -0.0036627     -0.0190343
             lbph |       0.0468469      0.0954908
              svi |       0.5695171      0.6358643
            pgg45 |       0.0017981      0.0035248
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.0014767      0.5214696
------------------+--------------------------------
r; t=0.02 22:18:13

.
. // plotting only supported for lambda list
. lasso2 $model, lambda(10) plotpath(lambda)

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5000819      0.5234981
          lweight |       0.5144276      0.6152349
              age |      -0.0036627     -0.0190343
             lbph |       0.0468469      0.0954908
              svi |       0.5695171      0.6358643
            pgg45 |       0.0017981      0.0035248
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.0014767      0.5214696
------------------+--------------------------------
Plotting only supported for list of lambda values.
Plotting options ignored.
r; t=0.01 22:18:13

.
. // incompatible options wrt penalty loadings
. cap lasso2 $model, ploadings(abc) adaptive
r; t=0.00 22:18:13

. if _rc != 198 {
.         exit 1
r; t=0.00 22:18:13
. }
r; t=0.00 22:18:13

. *
. cap lasso2 $model, ploadings(abc) adatheta(3)
r; t=0.00 22:18:13

. if _rc != 198 {
.         exit 1
r; t=0.00 22:18:13
. }
r; t=0.00 22:18:13

. *
.
. // var may not appear in partial() and notpen()
. cap lasso2 $model, partial(age svi lcp) notpen(age svi)
r; t=0.00 22:18:13

. if _rc != 198 {
.         exit 1
r; t=0.00 22:18:13
. }
r; t=0.00 22:18:13

. *
.
. // controls the output and content of e(b)
. lasso2 $model, l(20) displayall

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.4833840      0.5125769
          lweight |       0.4543151      0.5490809
              age |  (not selected) (not selected)
             lbph |       0.0125605      0.0721513
              svi |       0.4947049      0.6496250
              lcp |  (not selected) (not selected)
          gleason |  (not selected) (not selected)
            pgg45 |       0.0007356      0.0024450
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.0508344     -0.4136749
------------------+--------------------------------
r; t=0.01 22:18:13

. lasso2 $model, l(20) postall

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.4833840      0.5125769
          lweight |       0.4543151      0.5490809
             lbph |       0.0125605      0.0721513
              svi |       0.4947049      0.6496250
            pgg45 |       0.0007356      0.0024450
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.0508344     -0.4136749
------------------+--------------------------------
r; t=0.02 22:18:13

. mat list e(b)

e(b)[1,9]
                                  o.                               o.
       lcavol    lweight        age       lbph        svi        lcp
y1  .48338398  .45431515          0  .01256049  .49470493          0

            o.
      gleason      pgg45      _cons
y1          0  .00073557  .05083441
r; t=0.00 22:18:13

.
. lasso2 $model, l(20) displayall postall

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.4833840      0.5125769
          lweight |       0.4543151      0.5490809
              age |  (not selected) (not selected)
             lbph |       0.0125605      0.0721513
              svi |       0.4947049      0.6496250
              lcp |  (not selected) (not selected)
          gleason |  (not selected) (not selected)
            pgg45 |       0.0007356      0.0024450
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.0508344     -0.4136749
------------------+--------------------------------
r; t=0.01 22:18:13

. mat list e(b)

e(b)[1,9]
                                  o.                               o.
       lcavol    lweight        age       lbph        svi        lcp
y1  .48338398  .45431515          0  .01256049  .49470493          0

            o.
      gleason      pgg45      _cons
y1          0  .00073557  .05083441
r; t=0.00 22:18:13

.
. ********************************************************************************
. *** verify results are the same for scalar lambda vs lambda list                         ***
. ********************************************************************************
.
. global lambdalist 150 130 100 80 60 30 10 5 3 1
r; t=0.00 22:18:13

.
. * lasso
. lasso2 $model, l($lambdalist)

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1  150.00000    1     0.05990     27.25410   0.0861  | Added lcavol
      |                                                         | _cons.
     2 |   4   80.00000    2     0.38311    -11.07754   0.4128  | Added svi.
     3 |   5   60.00000    3     0.68973    -22.33875   0.5012  | Added
      |                                                         | lweight.
     4 |   7   10.00000    6     1.63633    -41.56110   0.6449  | Added age
      |                                                         | lbph pgg45.
     5 |   8    5.00000    7     1.77945    -39.70817   0.6547  | Added
      |                                                         | gleason.
     6 |   9    3.00000    8     1.92855    -36.50334   0.6595  | Added lcp.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


r; t=0.02 22:18:13

. mat A = e(betas)
r; t=0.00 22:18:13

. local j=1
r; t=0.00 22:18:13

. foreach i of numlist $lambdalist {
  2.         mat a = A[`j',1..9]
  3.         lasso2 $model, l(`i')
  4.         mat b = e(betaAll)
  5.         comparemat a b
  6.         local j=`j'+1
  7. }

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.0598973      0.7193204
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.3975250      1.5072975
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r1  .05989726          0          0          0          0          0

      gleason      pgg45      _cons
r1          0          0   2.397525

__000001[1,9]
                         o.         o.         o.         o.         o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .05989726          0          0          0          0          0

              o.         o.
        gleason      pgg45      _cons
lpsa          0          0   2.397525

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.1478203      0.7193204
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.2788280      1.5072975
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r2  .14782035          0          0          0          0          0

      gleason      pgg45      _cons
r2          0          0   2.278828

__000001[1,9]
                         o.         o.         o.         o.         o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .14782035          0          0          0          0          0

              o.         o.
        gleason      pgg45      _cons
lpsa          0          0   2.278828

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.2797050      0.7193204
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.1007825      1.5072975
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r3  .27970497          0          0          0          0          0

      gleason      pgg45      _cons
r3          0          0  2.1007825

__000001[1,9]
                         o.         o.         o.         o.         o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .27970497          0          0          0          0          0

              o.         o.
        gleason      pgg45      _cons
lpsa          0          0  2.1007825

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.3640141      0.5925572
              svi |       0.0190941      0.6697460
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.9828306      1.5334325
------------------+--------------------------------
mreldif=3.47347676312e-11. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r4   .3640141          0          0          0  .01909411          0

      gleason      pgg45      _cons
r4          0          0  1.9828306

__000001[1,9]
                         o.         o.         o.                    o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa   .3640141          0          0          0  .01909411          0

              o.         o.
        gleason      pgg45      _cons
lpsa          0          0  1.9828306

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.4113503      0.5258519
          lweight |       0.0972197      0.6617699
              svi |       0.1811578      0.6656665
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.5310355     -0.7771568
------------------+--------------------------------
mreldif=3.64894066907e-11. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r5  .41135029  .09721972          0          0  .18115776          0

      gleason      pgg45      _cons
r5          0          0  1.5310355

__000001[1,9]
                                    o.         o.                    o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .41135029  .09721972          0          0  .18115776          0

              o.         o.
        gleason      pgg45      _cons
lpsa          0          0  1.5310355

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.4686011      0.5258519
          lweight |       0.3794948      0.6617699
              svi |       0.4234121      0.6656665
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.3769394     -0.7771568
------------------+--------------------------------
mreldif=6.31349140970e-13. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r6  .46860109  .37949483          0          0  .42341213          0

      gleason      pgg45      _cons
r6          0          0  .37693939

__000001[1,9]
                                    o.         o.                    o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .46860109  .37949483          0          0  .42341213          0

              o.         o.
        gleason      pgg45      _cons
lpsa          0          0  .37693939

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5000819      0.5234981
          lweight |       0.5144276      0.6152349
              age |      -0.0036627     -0.0190343
             lbph |       0.0468469      0.0954908
              svi |       0.5695171      0.6358643
            pgg45 |       0.0017981      0.0035248
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.0014767      0.5214696
------------------+--------------------------------
mreldif=1.31041963606e-10. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r7   .50008192    .5144276  -.00366265   .04684694   .56951709           0

       gleason       pgg45       _cons
r7           0   .00179809  -.00147665

__000001[1,9]
                                                                           o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .50008192    .5144276  -.00366265   .04684694   .56951709           0

               o.
         gleason       pgg45       _cons
lpsa           0   .00179809  -.00147665

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5103239      0.5186256
          lweight |       0.5667938      0.6217574
              age |      -0.0114298     -0.0193045
             lbph |       0.0709988      0.0949255
              svi |       0.6047708      0.6427775
          gleason |       0.0126983      0.0422021
            pgg45 |       0.0024330      0.0027656
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1794362      0.2537330
------------------+--------------------------------
mreldif=3.92227863627e-11. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r8  .51032392  .56679383  -.0114298  .07099876  .60477082          0

      gleason      pgg45      _cons
r8  .01269834    .002433  .17943617

__000001[1,9]
                                                                     o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .51032392  .56679383  -.0114298  .07099876  .60477082          0


        gleason      pgg45      _cons
lpsa  .01269834    .002433  .17943617

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5271866      0.5643413
          lweight |       0.5888570      0.6220198
              age |      -0.0151554     -0.0212482
             lbph |       0.0810988      0.0967125
              svi |       0.6551930      0.7616733
              lcp |      -0.0314146     -0.1060509
          gleason |       0.0265810      0.0492279
            pgg45 |       0.0030672      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1877759      0.1815609
------------------+--------------------------------
mreldif=4.42492375906e-10. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r9   .52718658   .58885699  -.01515545   .08109881   .65519303  -.03141459

       gleason       pgg45       _cons
r9   .02658104   .00306722   .18777595

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .52718658   .58885699  -.01515545   .08109881   .65519303  -.03141459

         gleason       pgg45       _cons
lpsa   .02658104   .00306722   .18777595

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5519564      0.5643413
          lweight |       0.6109655      0.6220198
              age |      -0.0192173     -0.0212482
             lbph |       0.0915080      0.0967125
              svi |       0.7261799      0.7616733
              lcp |      -0.0811722     -0.1060509
          gleason |       0.0416790      0.0492279
            pgg45 |       0.0039941      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1836326      0.1815609
------------------+--------------------------------
mreldif=4.03313531135e-10. tolerance = .01

__000000[1,9]
         lcavol     lweight         age        lbph         svi         lcp
r10   .55195639   .61096553  -.01921727   .09150795   .72617991  -.08117216

        gleason       pgg45       _cons
r10   .04167896   .00399408   .18363256

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .55195639   .61096553  -.01921727   .09150795   .72617991  -.08117216

         gleason       pgg45       _cons
lpsa   .04167896   .00399408   .18363256
r; t=0.14 22:18:13

. *
.
. * lasso (w/o constant)
. lasso2 $model, l($lambdalist) nocons

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1  150.00000    3     0.54947     18.97700   0.8585  | Added lcavol
      |                                                         | lweight
      |                                                         | gleason.
     2 |   5   60.00000    4     1.02848    -31.11343   0.9195  | Added svi.
     3 |   7   10.00000    6     1.63622    -46.13790   0.9372  | Added age
      |                                                         | lbph pgg45.
      |                                                         | Removed
      |                                                         | gleason.
     4 |   8    5.00000    7     1.80411    -44.24654   0.9389  | Added
      |                                                         | gleason.
     5 |   9    3.00000    8     1.95588    -41.05748   0.9398  | Added lcp.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


r; t=0.13 22:18:13

. mat A = e(betas)
r; t=0.00 22:18:13

. local j=1
r; t=0.00 22:18:13

. foreach i of numlist $lambdalist {
  2.         mat a = A[`j',1..8]
  3.         lasso2 $model, l(`i') nocons
  4.         mat b = e(betaAll)
  5.         comparemat a b
  6.         local j=`j'+1
  7. }

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.0320208      0.6669792
          lweight |       0.3557261      0.4700476
          gleason |       0.1617255     -0.0175614
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,8]
       lcavol    lweight        age       lbph        svi        lcp
r1  .03202083  .35572606          0          0          0          0

      gleason      pgg45
r1  .16172553          0

__000001[1,8]
                                    o.         o.         o.         o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .03202083  .35572606          0          0          0          0

                         o.
        gleason      pgg45
lpsa  .16172553          0

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.1166819      0.6669792
          lweight |       0.3709689      0.4700476
          gleason |       0.1378206     -0.0175614
------------------+--------------------------------
mreldif=8.56385667391e-09. tolerance = .01

__000000[1,8]
       lcavol    lweight        age       lbph        svi        lcp
r2  .11668194  .37096892          0          0          0          0

      gleason      pgg45
r2  .13782061          0

__000001[1,8]
                                    o.         o.         o.         o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .11668194  .37096893          0          0          0          0

                         o.
        gleason      pgg45
lpsa   .1378206          0

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.2436736      0.6669792
          lweight |       0.3938332      0.4700476
          gleason |       0.1019632     -0.0175614
------------------+--------------------------------
mreldif=8.49779103003e-09. tolerance = .01

__000000[1,8]
       lcavol    lweight        age       lbph        svi        lcp
r3  .24367361  .39383323          0          0          0          0

      gleason      pgg45
r3  .10196322          0

__000001[1,8]
                                    o.         o.         o.         o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .24367361  .39383324          0          0          0          0

                         o.
        gleason      pgg45
lpsa  .10196321          0

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.3283347      0.6669792
          lweight |       0.4090761      0.4700476
          gleason |       0.0780583     -0.0175614
------------------+--------------------------------
mreldif=8.37616947262e-09. tolerance = .01

__000000[1,8]
       lcavol    lweight        age       lbph        svi        lcp
r4  .32833473   .4090761          0          0          0          0

      gleason      pgg45
r4  .07805829          0

__000001[1,8]
                                    o.         o.         o.         o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .32833473  .40907611          0          0          0          0

                         o.
        gleason      pgg45
lpsa  .07805828          0

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.3826450      0.5411928
          lweight |       0.4319349      0.5016112
              svi |       0.1630653      0.6758092
          gleason |       0.0508383     -0.0313003
------------------+--------------------------------
mreldif=6.64287248562e-09. tolerance = .01

__000000[1,8]
       lcavol    lweight        age       lbph        svi        lcp
r5  .38264498  .43193492          0          0  .16306531          0

      gleason      pgg45
r5  .05083831          0

__000001[1,8]
                                    o.         o.                    o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .38264498  .43193492          0          0  .16306532          0

                         o.
        gleason      pgg45
lpsa   .0508383          0

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.4619189      0.5411928
          lweight |       0.4667731      0.5016112
              svi |       0.4194373      0.6758092
          gleason |       0.0097690     -0.0313003
------------------+--------------------------------
mreldif=6.48907669880e-09. tolerance = .01

__000000[1,8]
       lcavol    lweight        age       lbph        svi        lcp
r6  .46191891  .46677304          0          0  .41943725          0

      gleason      pgg45
r6  .00976898          0

__000001[1,8]
                                    o.         o.                    o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .46191891  .46677305          0          0  .41943725          0

                         o.
        gleason      pgg45
lpsa  .00976898          0

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5001030      0.5160584
          lweight |       0.5142093      0.6923228
              age |      -0.0036739     -0.0150717
             lbph |       0.0468951      0.0784921
              svi |       0.5695416      0.6272147
            pgg45 |       0.0017982      0.0034776
------------------+--------------------------------
mreldif=7.94107869177e-09. tolerance = .01

__000000[1,8]
        lcavol     lweight         age        lbph         svi         lcp
r7   .50010299    .5142093  -.00367387   .04689508   .56954158           0

       gleason       pgg45
r7           0   .00179822

__000001[1,8]
                                                                           o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .50010299   .51420931  -.00367387   .04689508   .56954158           0

               o.
         gleason       pgg45
lpsa           0   .00179822

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5073707      0.5144497
          lweight |       0.5809729      0.6418074
              age |      -0.0109271     -0.0185937
             lbph |       0.0681982      0.0909654
              svi |       0.6060353      0.6445656
          gleason |       0.0284609      0.0644912
            pgg45 |       0.0021422      0.0023544
------------------+--------------------------------
mreldif=5.36457535923e-09. tolerance = .01

__000000[1,8]
        lcavol     lweight         age        lbph         svi         lcp
r8   .50737074   .58097291  -.01092708   .06819822   .60603534           0

       gleason       pgg45
r8    .0284609   .00214222

__000001[1,8]
                                                                           o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .50737074    .5809729  -.01092708   .06819822   .60603534           0


         gleason       pgg45
lpsa    .0284609   .00214222

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5243579      0.5616062
          lweight |       0.6036647      0.6363374
              age |      -0.0146413     -0.0207511
             lbph |       0.0781844      0.0938945
              svi |       0.6571770      0.7635916
              lcp |      -0.0320064     -0.1066232
          gleason |       0.0430800      0.0651808
            pgg45 |       0.0027730      0.0041730
------------------+--------------------------------
mreldif=4.69190061139e-09. tolerance = .01

__000000[1,8]
        lcavol     lweight         age        lbph         svi         lcp
r9   .52435789   .60366472  -.01464133   .07818436   .65717697  -.03200641

       gleason       pgg45
r9   .04308004   .00277302

__000001[1,8]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .52435789   .60366471  -.01464133   .07818436   .65717697   -.0320064

         gleason       pgg45
lpsa   .04308003   .00277302

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5491901      0.5616062
          lweight |       0.6254465      0.6363374
              age |      -0.0187145     -0.0207511
             lbph |       0.0886578      0.0938945
              svi |       0.7281201      0.7635916
              lcp |      -0.0817509     -0.1066232
          gleason |       0.0578139      0.0651808
            pgg45 |       0.0037064      0.0041730
------------------+--------------------------------
mreldif=5.28913088447e-09. tolerance = .01

__000000[1,8]
         lcavol     lweight         age        lbph         svi         lcp
r10   .54919011   .62544652   -.0187145   .08865781   .72812008  -.08175091

        gleason       pgg45
r10    .0578139   .00370637

__000001[1,8]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .54919011   .62544652   -.0187145   .08865781   .72812008  -.08175091

         gleason       pgg45
lpsa   .05781389   .00370637
r; t=0.30 22:18:13

. *
.
. * post-lasso
. lasso2 $model, l($lambdalist) ols

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1  150.00000    1     0.71932    -39.21661   0.5394  | Added lcavol
      |                                                         | _cons.
     2 |   4   80.00000    2     1.26230    -43.67279   0.5804  | Added svi.
     3 |   5   60.00000    3     1.85329    -52.87859   0.6359  | Added
      |                                                         | lweight.
     4 |   7   10.00000    6     1.89265    -45.15273   0.6578  | Added age
      |                                                         | lbph pgg45.
     5 |   8    5.00000    7     1.94236    -40.65819   0.6581  | Added
      |                                                         | gleason.
     6 |   9    3.00000    8     2.22573    -37.60646   0.6634  | Added lcp.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


r; t=0.02 22:18:13

. mat A = e(betas)
r; t=0.00 22:18:13

. local j=1
r; t=0.00 22:18:13

. foreach i of numlist $lambdalist {
  2.         mat a = A[`j',1..9]
  3.         lasso2 $model, l(`i')
  4.         mat b = e(betaAllOLS)
  5.         comparemat a b
  6.         local j=`j'+1
  7. }

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.0598973      0.7193204
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.3975250      1.5072975
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r1  .71932039          0          0          0          0          0

      gleason      pgg45      _cons
r1          0          0  1.5072975

__000001[1,9]
                         o.         o.         o.         o.         o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .71932039          0          0          0          0          0

              o.         o.
        gleason      pgg45      _cons
lpsa          0          0  1.5072975

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.1478203      0.7193204
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.2788280      1.5072975
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r2  .71932039          0          0          0          0          0

      gleason      pgg45      _cons
r2          0          0  1.5072975

__000001[1,9]
                         o.         o.         o.         o.         o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .71932039          0          0          0          0          0

              o.         o.
        gleason      pgg45      _cons
lpsa          0          0  1.5072975

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.2797050      0.7193204
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.1007825      1.5072975
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r3  .71932039          0          0          0          0          0

      gleason      pgg45      _cons
r3          0          0  1.5072975

__000001[1,9]
                         o.         o.         o.         o.         o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .71932039          0          0          0          0          0

              o.         o.
        gleason      pgg45      _cons
lpsa          0          0  1.5072975

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.3640141      0.5925572
              svi |       0.0190941      0.6697460
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.9828306      1.5334325
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r4  .59255716          0          0          0  .66974596          0

      gleason      pgg45      _cons
r4          0          0  1.5334325

__000001[1,9]
                         o.         o.         o.                    o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .59255716          0          0          0  .66974596          0

              o.         o.
        gleason      pgg45      _cons
lpsa          0          0  1.5334325

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.4113503      0.5258519
          lweight |       0.0972197      0.6617699
              svi |       0.1811578      0.6656665
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.5310355     -0.7771568
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r5    .5258519   .66176995           0           0    .6656665           0

       gleason       pgg45       _cons
r5           0           0  -.77715676

__000001[1,9]
                                       o.          o.                      o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa    .5258519   .66176995           0           0    .6656665           0

               o.          o.
         gleason       pgg45       _cons
lpsa           0           0  -.77715676

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.4686011      0.5258519
          lweight |       0.3794948      0.6617699
              svi |       0.4234121      0.6656665
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.3769394     -0.7771568
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r6    .5258519   .66176995           0           0    .6656665           0

       gleason       pgg45       _cons
r6           0           0  -.77715676

__000001[1,9]
                                       o.          o.                      o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa    .5258519   .66176995           0           0    .6656665           0

               o.          o.
         gleason       pgg45       _cons
lpsa           0           0  -.77715676

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5000819      0.5234981
          lweight |       0.5144276      0.6152349
              age |      -0.0036627     -0.0190343
             lbph |       0.0468469      0.0954908
              svi |       0.5695171      0.6358643
            pgg45 |       0.0017981      0.0035248
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.0014767      0.5214696
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r7    .5234981   .61523487  -.01903435   .09549075   .63586426           0

       gleason       pgg45       _cons
r7           0   .00352484   .52146955

__000001[1,9]
                                                                           o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa    .5234981   .61523487  -.01903435   .09549075   .63586426           0

               o.
         gleason       pgg45       _cons
lpsa           0   .00352484   .52146955

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5103239      0.5186256
          lweight |       0.5667938      0.6217574
              age |      -0.0114298     -0.0193045
             lbph |       0.0709988      0.0949255
              svi |       0.6047708      0.6427775
          gleason |       0.0126983      0.0422021
            pgg45 |       0.0024330      0.0027656
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1794362      0.2537330
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r8   .51862565   .62175742  -.01930454   .09492549    .6427775           0

       gleason       pgg45       _cons
r8   .04220206   .00276558   .25373297

__000001[1,9]
                                                                           o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .51862565   .62175742  -.01930454   .09492549    .6427775           0


         gleason       pgg45       _cons
lpsa   .04220206   .00276558   .25373297

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5271866      0.5643413
          lweight |       0.5888570      0.6220198
              age |      -0.0151554     -0.0212482
             lbph |       0.0810988      0.0967125
              svi |       0.6551930      0.7616733
              lcp |      -0.0314146     -0.1060509
          gleason |       0.0265810      0.0492279
            pgg45 |       0.0030672      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1877759      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r9   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
r9   .04922792   .00445751   .18156087

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

         gleason       pgg45       _cons
lpsa   .04922792   .00445751   .18156087

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5519564      0.5643413
          lweight |       0.6109655      0.6220198
              age |      -0.0192173     -0.0212482
             lbph |       0.0915080      0.0967125
              svi |       0.7261799      0.7616733
              lcp |      -0.0811722     -0.1060509
          gleason |       0.0416790      0.0492279
            pgg45 |       0.0039941      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1836326      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
         lcavol     lweight         age        lbph         svi         lcp
r10   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

        gleason       pgg45       _cons
r10   .04922792   .00445751   .18156087

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

         gleason       pgg45       _cons
lpsa   .04922792   .00445751   .18156087
r; t=0.15 22:18:13

. *
.
. // replaced lambda=40 with lambda=60
. // lambda=40 in path used beta=zeros from lambda=100
. // as initial beta; would end up at poor solution
. global sqrtlambdalist 100 60 20 10 5 1
r; t=0.00 22:18:13

. * sqrt-lasso
. lasso2 $model, l($sqrtlambdalist) sqrt

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1  100.00000    0     0.00000     31.41226   0.0000  | Added _cons.
     2 |   2   60.00000    1     0.19608      7.56244   0.2540  | Added
      |                                                         | lcavol.
     3 |   3   20.00000    3     1.29325    -44.90045   0.6047  | Added
      |                                                         | lweight svi.
     4 |   4   10.00000    5     1.55017    -43.72266   0.6359  | Added lbph
      |                                                         | pgg45.
     5 |   5    5.00000    7     1.72160    -38.92074   0.6519  | Added age
      |                                                         | gleason.
     6 |   6    1.00000    8     2.09358    -37.38734   0.6626  | Added lcp.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


r; t=0.04 22:18:13

. mat A = e(betas)
r; t=0.00 22:18:13

. local j=1
r; t=0.00 22:18:13

. foreach i of numlist $sqrtlambdalist {
  2.         mat a = A[`j',1..8]
  3.         di `i'
  4.         lasso2 $model, l(`i') sqrt
  5.         mat b = e(betaAll)
  6.         mat b = b[1,1..8]
  7.         comparemat a b
  8.         local j=`j'+1
  9. }
100

------------------+--------------------------------
         Selected |      Sqrt-lasso   Post-est OLS
------------------+--------------------------------
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.4783869      2.4783869
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,8]
     lcavol  lweight      age     lbph      svi      lcp  gleason    pgg45
r1        0        0        0        0        0        0        0        0

__000001[1,8]
            o.       o.       o.       o.       o.       o.       o.       o.
       lcavol  lweight      age     lbph      svi      lcp  gleason    pgg45
lpsa        0        0        0        0        0        0        0        0
60

------------------+--------------------------------
         Selected |      Sqrt-lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.1960797      0.7193204
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.2136774      1.5072975
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,8]
       lcavol    lweight        age       lbph        svi        lcp
r2  .19607973          0          0          0          0          0

      gleason      pgg45
r2          0          0

__000001[1,8]
                         o.         o.         o.         o.         o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .19607973          0          0          0          0          0

              o.         o.
        gleason      pgg45
lpsa          0          0
20

------------------+--------------------------------
         Selected |      Sqrt-lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.4707406      0.5258519
          lweight |       0.3900438      0.6617699
              svi |       0.4324655      0.6656665
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.3338093     -0.7771568
------------------+--------------------------------
mreldif=1.08674657745e-11. tolerance = .01

__000000[1,8]
       lcavol    lweight        age       lbph        svi        lcp
r3  .47074063  .39004382          0          0  .43246549          0

      gleason      pgg45
r3          0          0

__000001[1,8]
                                    o.         o.                    o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .47074063  .39004382          0          0  .43246549          0

              o.         o.
        gleason      pgg45
lpsa          0          0
10

------------------+--------------------------------
         Selected |      Sqrt-lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.4923489      0.5125769
          lweight |       0.4834171      0.5490809
             lbph |       0.0308604      0.0721513
              svi |       0.5422799      0.6496250
            pgg45 |       0.0012605      0.0024450
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.0918135     -0.4136749
------------------+--------------------------------
mreldif=2.64067099047e-11. tolerance = .01

__000000[1,8]
       lcavol    lweight        age       lbph        svi        lcp
r4  .49234893  .48341712          0  .03086044  .54227991          0

      gleason      pgg45
r4          0  .00126054

__000001[1,8]
                                    o.                               o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .49234893  .48341712          0  .03086044  .54227991          0

              o.
        gleason      pgg45
lpsa          0  .00126054
5

------------------+--------------------------------
         Selected |      Sqrt-lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5073760      0.5186256
          lweight |       0.5472761      0.6217574
              age |      -0.0086335     -0.0193045
             lbph |       0.0625023      0.0949255
              svi |       0.5912746      0.6427775
          gleason |       0.0022215      0.0422021
            pgg45 |       0.0023149      0.0027656
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1530532      0.2537330
------------------+--------------------------------
mreldif=9.10298295760e-12. tolerance = .01

__000000[1,8]
        lcavol     lweight         age        lbph         svi         lcp
r5   .50737596   .54727613  -.00863346   .06250233   .59127457           0

       gleason       pgg45
r5    .0022215   .00231491

__000001[1,8]
                                                                           o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .50737596   .54727613  -.00863346   .06250233   .59127457           0


         gleason       pgg45
lpsa    .0022215   .00231491
1

------------------+--------------------------------
         Selected |      Sqrt-lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5478195      0.5643413
          lweight |       0.6072731      0.6220198
              age |      -0.0185389     -0.0212482
             lbph |       0.0897695      0.0967125
              svi |       0.7143242      0.7616733
              lcp |      -0.0728620     -0.1060509
          gleason |       0.0391574      0.0492279
            pgg45 |       0.0038393      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1843246      0.1815609
------------------+--------------------------------
mreldif=3.86617595994e-11. tolerance = .01

__000000[1,8]
        lcavol     lweight         age        lbph         svi         lcp
r6   .54781953   .60727314   -.0185389    .0897695   .71432424  -.07286204

       gleason       pgg45
r6   .03915742   .00383928

__000001[1,8]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .54781953   .60727314   -.0185389    .0897695   .71432424  -.07286204

         gleason       pgg45
lpsa   .03915742   .00383928
r; t=0.10 22:18:14

. *
.
. * post-sqrt-lasso ols
. lasso2 $model, l($sqrtlambdalist) sqrt ols

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1  100.00000    0     0.00000     31.41226   0.0000  | Added _cons.
     2 |   2   60.00000    1     0.71932    -39.21661   0.5394  | Added
      |                                                         | lcavol.
     3 |   3   20.00000    3     1.85329    -52.87859   0.6359  | Added
      |                                                         | lweight svi.
     4 |   4   10.00000    5     1.78588    -46.48560   0.6461  | Added lbph
      |                                                         | pgg45.
     5 |   5    5.00000    7     1.94236    -40.65819   0.6581  | Added age
      |                                                         | gleason.
     6 |   6    1.00000    8     2.22573    -37.60646   0.6634  | Added lcp.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


r; t=0.04 22:18:14

. mat A = e(betas)
r; t=0.00 22:18:14

. local j=1
r; t=0.00 22:18:14

. foreach i of numlist $sqrtlambdalist {
  2.         di "this lambda: `i'"
  3.         mat a = A[`j',1..9]
  4.         lasso2 $model, l(`i') sqrt ols
  5.         mat b = e(betaAllOLS)
  6.         comparemat a b
  7.         local j=`j'+1
  8. }
this lambda: 100

------------------+--------------------------------
         Selected |      Sqrt-lasso   Post-est OLS
------------------+--------------------------------
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.4783869      2.4783869
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r1          0          0          0          0          0          0

      gleason      pgg45      _cons
r1          0          0  2.4783869

__000001[1,9]
              o.         o.         o.         o.         o.         o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa          0          0          0          0          0          0

              o.         o.
        gleason      pgg45      _cons
lpsa          0          0  2.4783869
this lambda: 60

------------------+--------------------------------
         Selected |      Sqrt-lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.1960797      0.7193204
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.2136774      1.5072975
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r2  .71932039          0          0          0          0          0

      gleason      pgg45      _cons
r2          0          0  1.5072975

__000001[1,9]
                         o.         o.         o.         o.         o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .71932039          0          0          0          0          0

              o.         o.
        gleason      pgg45      _cons
lpsa          0          0  1.5072975
this lambda: 20

------------------+--------------------------------
         Selected |      Sqrt-lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.4707406      0.5258519
          lweight |       0.3900438      0.6617699
              svi |       0.4324655      0.6656665
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.3338093     -0.7771568
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r3    .5258519   .66176995           0           0    .6656665           0

       gleason       pgg45       _cons
r3           0           0  -.77715676

__000001[1,9]
                                       o.          o.                      o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa    .5258519   .66176995           0           0    .6656665           0

               o.          o.
         gleason       pgg45       _cons
lpsa           0           0  -.77715676
this lambda: 10

------------------+--------------------------------
         Selected |      Sqrt-lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.4923489      0.5125769
          lweight |       0.4834171      0.5490809
             lbph |       0.0308604      0.0721513
              svi |       0.5422799      0.6496250
            pgg45 |       0.0012605      0.0024450
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.0918135     -0.4136749
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r4   .51257686   .54908093           0   .07215128   .64962503           0

       gleason       pgg45       _cons
r4           0   .00244504  -.41367494

__000001[1,9]
                                       o.                                  o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .51257686   .54908093           0   .07215128   .64962503           0

               o.
         gleason       pgg45       _cons
lpsa           0   .00244504  -.41367494
this lambda: 5

------------------+--------------------------------
         Selected |      Sqrt-lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5073760      0.5186256
          lweight |       0.5472761      0.6217574
              age |      -0.0086335     -0.0193045
             lbph |       0.0625023      0.0949255
              svi |       0.5912746      0.6427775
          gleason |       0.0022215      0.0422021
            pgg45 |       0.0023149      0.0027656
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1530532      0.2537330
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r5   .51862565   .62175742  -.01930454   .09492549    .6427775           0

       gleason       pgg45       _cons
r5   .04220206   .00276558   .25373297

__000001[1,9]
                                                                           o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .51862565   .62175742  -.01930454   .09492549    .6427775           0


         gleason       pgg45       _cons
lpsa   .04220206   .00276558   .25373297
this lambda: 1

------------------+--------------------------------
         Selected |      Sqrt-lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5478195      0.5643413
          lweight |       0.6072731      0.6220198
              age |      -0.0185389     -0.0212482
             lbph |       0.0897695      0.0967125
              svi |       0.7143242      0.7616733
              lcp |      -0.0728620     -0.1060509
          gleason |       0.0391574      0.0492279
            pgg45 |       0.0038393      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1843246      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r6   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
r6   .04922792   .00445751   .18156087

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

         gleason       pgg45       _cons
lpsa   .04922792   .00445751   .18156087
r; t=0.11 22:18:14

. *
.
. * ridge
. lasso2 $model, l($lambdalist) alpha(0)

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1  150.00000    8     1.37766    -37.17937   0.5860  | All
      |                                                         | selected.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


r; t=0.02 22:18:14

. mat A = e(betas)
r; t=0.00 22:18:14

. local j=1
r; t=0.00 22:18:14

. foreach i of numlist $lambdalist {
  2.         mat a = A[`j',1..9]
  3.         lasso2 $model, l(`i') alpha(0)
  4.         mat b = e(betaAll)
  5.         comparemat a b
  6.         local j=`j'+1
  7. }

------------------+--------------------------------
         Selected |           Ridge   Post-est OLS
------------------+--------------------------------
           lcavol |       0.2717595      0.5643413
          lweight |       0.4305476      0.6220198
              age |      -0.0029348     -0.0212482
             lbph |       0.0511156      0.0967125
              svi |       0.4608634      0.7616733
              lcp |       0.0742555     -0.1060509
          gleason |       0.0835739      0.0492279
            pgg45 |       0.0026142      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.0168513      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r1   .27175946   .43054764  -.00293485   .05111558    .4608634   .07425546

       gleason       pgg45       _cons
r1   .08357386   .00261419   .01685126

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .27175946   .43054764  -.00293485   .05111558    .4608634   .07425546

         gleason       pgg45       _cons
lpsa   .08357386   .00261419   .01685126

------------------+--------------------------------
         Selected |           Ridge   Post-est OLS
------------------+--------------------------------
           lcavol |       0.2875968      0.5643413
          lweight |       0.4500114      0.6220198
              age |      -0.0038066     -0.0212482
             lbph |       0.0537524      0.0967125
              svi |       0.4789504      0.7616733
              lcp |       0.0712261     -0.1060509
          gleason |       0.0827387      0.0492279
            pgg45 |       0.0026100      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.0184697      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r2   .28759676   .45001143   -.0038066   .05375238   .47895039   .07122614

       gleason       pgg45       _cons
r2   .08273866   .00261005  -.01846974

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .28759676   .45001143   -.0038066   .05375238   .47895039   .07122614

         gleason       pgg45       _cons
lpsa   .08273866   .00261005  -.01846974

------------------+--------------------------------
         Selected |           Ridge   Post-est OLS
------------------+--------------------------------
           lcavol |       0.3167364      0.5643413
          lweight |       0.4829282      0.6220198
              age |      -0.0055079     -0.0212482
             lbph |       0.0585200      0.0967125
              svi |       0.5106115      0.7616733
              lcp |       0.0634394     -0.1060509
          gleason |       0.0808606      0.0492279
            pgg45 |       0.0026060      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.0645556      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r3   .31673643   .48292819  -.00550791   .05852003   .51061147   .06343935

       gleason       pgg45       _cons
r3   .08086058   .00260602  -.06455558

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .31673643   .48292819  -.00550791   .05852003   .51061147   .06343935

         gleason       pgg45       _cons
lpsa   .08086058   .00260602  -.06455558

------------------+--------------------------------
         Selected |           Ridge   Post-est OLS
------------------+--------------------------------
           lcavol |       0.3413077      0.5643413
          lweight |       0.5077153      0.6220198
              age |      -0.0070156     -0.0212482
             lbph |       0.0624686      0.0967125
              svi |       0.5360463      0.7616733
              lcp |       0.0546821     -0.1060509
          gleason |       0.0790712      0.0492279
            pgg45 |       0.0026164      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.0870313      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r4   .34130767   .50771531  -.00701561   .06246856   .53604631   .05468212

       gleason       pgg45       _cons
r4   .07907124   .00261641  -.08703126

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .34130767   .50771531  -.00701561   .06246856   .53604631   .05468212

         gleason       pgg45       _cons
lpsa   .07907124   .00261641  -.08703126

------------------+--------------------------------
         Selected |           Ridge   Post-est OLS
------------------+--------------------------------
           lcavol |       0.3721392      0.5643413
          lweight |       0.5349928      0.6220198
              age |      -0.0089686     -0.0212482
             lbph |       0.0673490      0.0967125
              svi |       0.5668933      0.7616733
              lcp |       0.0409301     -0.1060509
          gleason |       0.0766599      0.0492279
            pgg45 |       0.0026614      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.0973653      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r5   .37213924   .53499284  -.00896856   .06734896   .56689332   .04093011

       gleason       pgg45       _cons
r5   .07665993   .00266143   -.0973653

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .37213924   .53499284  -.00896856   .06734896   .56689332   .04093011

         gleason       pgg45       _cons
lpsa   .07665993   .00266143   -.0973653

------------------+--------------------------------
         Selected |           Ridge   Post-est OLS
------------------+--------------------------------
           lcavol |       0.4386916      0.5643413
          lweight |       0.5800748      0.6220198
              age |      -0.0132790     -0.0212482
             lbph |       0.0776826      0.0967125
              svi |       0.6321418      0.7616733
              lcp |       0.0012687     -0.1060509
          gleason |       0.0705856      0.0492279
            pgg45 |       0.0029428      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.0636367      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r6   .43869162   .58007476  -.01327905    .0776826   .63214176   .00126873

       gleason       pgg45       _cons
r6   .07058562   .00294275   -.0636367

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .43869162   .58007476  -.01327905    .0776826   .63214176   .00126873

         gleason       pgg45       _cons
lpsa   .07058562   .00294275   -.0636367

------------------+--------------------------------
         Selected |           Ridge   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5105488      0.5643413
          lweight |       0.6100509      0.6220198
              age |      -0.0178941     -0.0212482
             lbph |       0.0886328      0.0967125
              svi |       0.7046133      0.7616733
              lcp |      -0.0554655     -0.1060509
          gleason |       0.0607886      0.0492279
            pgg45 |       0.0036299      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.0477573      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r7   .51054881   .61005089  -.01789412    .0886328   .70461331  -.05546555

       gleason       pgg45       _cons
r7    .0607886   .00362987   .04775726

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .51054881   .61005089  -.01789412    .0886328   .70461331  -.05546555

         gleason       pgg45       _cons
lpsa    .0607886   .00362987   .04775726

------------------+--------------------------------
         Selected |           Ridge   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5352552      0.5643413
          lweight |       0.6165406      0.6220198
              age |      -0.0194474     -0.0212482
             lbph |       0.0923567      0.0967125
              svi |       0.7305082      0.7616733
              lcp |      -0.0779163     -0.1060509
          gleason |       0.0560405      0.0492279
            pgg45 |       0.0039748      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1037009      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r8   .53525516   .61654063  -.01944741   .09235674   .73050821  -.07791626

       gleason       pgg45       _cons
r8   .05604049   .00397477   .10370087

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .53525516   .61654063  -.01944741   .09235674   .73050821  -.07791626

         gleason       pgg45       _cons
lpsa   .05604049   .00397477   .10370087

------------------+--------------------------------
         Selected |           Ridge   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5462894      0.5643413
          lweight |       0.6188823      0.6220198
              age |      -0.0201342     -0.0212482
             lbph |       0.0940129      0.0967125
              svi |       0.7422468      0.7616733
              lcp |      -0.0883812     -0.1060509
          gleason |       0.0536226      0.0492279
            pgg45 |       0.0041480      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1316898      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r9   .54628942   .61888235  -.02013423   .09401291   .74224679  -.08838123

       gleason       pgg45       _cons
r9   .05362263     .004148   .13168984

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .54628942   .61888235  -.02013423   .09401291   .74224679  -.08838123

         gleason       pgg45       _cons
lpsa   .05362263     .004148   .13168984

------------------+--------------------------------
         Selected |           Ridge   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5581068      0.5643413
          lweight |       0.6210308      0.6220198
              age |      -0.0208648     -0.0212482
             lbph |       0.0957816      0.0967125
              svi |       0.7549337      0.7616733
              lcp |      -0.0998734     -0.1060509
          gleason |       0.0508098      0.0492279
            pgg45 |       0.0043469      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1637593      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
         lcavol     lweight         age        lbph         svi         lcp
r10   .55810677   .62103077  -.02086484   .09578159   .75493366   -.0998734

        gleason       pgg45       _cons
r10    .0508098   .00434693   .16375927

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .55810677   .62103077  -.02086484   .09578159   .75493366   -.0998734

         gleason       pgg45       _cons
lpsa    .0508098   .00434693   .16375927
r; t=0.16 22:18:14

. *
.
. * ols ridge
. lasso2 $model, l($lambdalist) alpha(0) ols

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1  150.00000    8     2.22573    -57.25551   0.6634  | All
      |                                                         | selected.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


r; t=0.02 22:18:14

. mat A = e(betas)
r; t=0.00 22:18:14

. local j=1
r; t=0.00 22:18:14

. foreach i of numlist $lambdalist {
  2.         mat a = A[`j',1..9]
  3.         lasso2 $model, l(`i') alpha(0) ols
  4.         mat b = e(betaAllOLS)
  5.         comparemat a b
  6.         local j=`j'+1
  7. }

------------------+--------------------------------
         Selected |           Ridge   Post-est OLS
------------------+--------------------------------
           lcavol |       0.2717595      0.5643413
          lweight |       0.4305476      0.6220198
              age |      -0.0029348     -0.0212482
             lbph |       0.0511156      0.0967125
              svi |       0.4608634      0.7616733
              lcp |       0.0742555     -0.1060509
          gleason |       0.0835739      0.0492279
            pgg45 |       0.0026142      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.0168513      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r1   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
r1   .04922792   .00445751   .18156087

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

         gleason       pgg45       _cons
lpsa   .04922792   .00445751   .18156087

------------------+--------------------------------
         Selected |           Ridge   Post-est OLS
------------------+--------------------------------
           lcavol |       0.2875968      0.5643413
          lweight |       0.4500114      0.6220198
              age |      -0.0038066     -0.0212482
             lbph |       0.0537524      0.0967125
              svi |       0.4789504      0.7616733
              lcp |       0.0712261     -0.1060509
          gleason |       0.0827387      0.0492279
            pgg45 |       0.0026100      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.0184697      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r2   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
r2   .04922792   .00445751   .18156087

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

         gleason       pgg45       _cons
lpsa   .04922792   .00445751   .18156087

------------------+--------------------------------
         Selected |           Ridge   Post-est OLS
------------------+--------------------------------
           lcavol |       0.3167364      0.5643413
          lweight |       0.4829282      0.6220198
              age |      -0.0055079     -0.0212482
             lbph |       0.0585200      0.0967125
              svi |       0.5106115      0.7616733
              lcp |       0.0634394     -0.1060509
          gleason |       0.0808606      0.0492279
            pgg45 |       0.0026060      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.0645556      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r3   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
r3   .04922792   .00445751   .18156087

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

         gleason       pgg45       _cons
lpsa   .04922792   .00445751   .18156087

------------------+--------------------------------
         Selected |           Ridge   Post-est OLS
------------------+--------------------------------
           lcavol |       0.3413077      0.5643413
          lweight |       0.5077153      0.6220198
              age |      -0.0070156     -0.0212482
             lbph |       0.0624686      0.0967125
              svi |       0.5360463      0.7616733
              lcp |       0.0546821     -0.1060509
          gleason |       0.0790712      0.0492279
            pgg45 |       0.0026164      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.0870313      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r4   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
r4   .04922792   .00445751   .18156087

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

         gleason       pgg45       _cons
lpsa   .04922792   .00445751   .18156087

------------------+--------------------------------
         Selected |           Ridge   Post-est OLS
------------------+--------------------------------
           lcavol |       0.3721392      0.5643413
          lweight |       0.5349928      0.6220198
              age |      -0.0089686     -0.0212482
             lbph |       0.0673490      0.0967125
              svi |       0.5668933      0.7616733
              lcp |       0.0409301     -0.1060509
          gleason |       0.0766599      0.0492279
            pgg45 |       0.0026614      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.0973653      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r5   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
r5   .04922792   .00445751   .18156087

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

         gleason       pgg45       _cons
lpsa   .04922792   .00445751   .18156087

------------------+--------------------------------
         Selected |           Ridge   Post-est OLS
------------------+--------------------------------
           lcavol |       0.4386916      0.5643413
          lweight |       0.5800748      0.6220198
              age |      -0.0132790     -0.0212482
             lbph |       0.0776826      0.0967125
              svi |       0.6321418      0.7616733
              lcp |       0.0012687     -0.1060509
          gleason |       0.0705856      0.0492279
            pgg45 |       0.0029428      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.0636367      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r6   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
r6   .04922792   .00445751   .18156087

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

         gleason       pgg45       _cons
lpsa   .04922792   .00445751   .18156087

------------------+--------------------------------
         Selected |           Ridge   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5105488      0.5643413
          lweight |       0.6100509      0.6220198
              age |      -0.0178941     -0.0212482
             lbph |       0.0886328      0.0967125
              svi |       0.7046133      0.7616733
              lcp |      -0.0554655     -0.1060509
          gleason |       0.0607886      0.0492279
            pgg45 |       0.0036299      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.0477573      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r7   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
r7   .04922792   .00445751   .18156087

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

         gleason       pgg45       _cons
lpsa   .04922792   .00445751   .18156087

------------------+--------------------------------
         Selected |           Ridge   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5352552      0.5643413
          lweight |       0.6165406      0.6220198
              age |      -0.0194474     -0.0212482
             lbph |       0.0923567      0.0967125
              svi |       0.7305082      0.7616733
              lcp |      -0.0779163     -0.1060509
          gleason |       0.0560405      0.0492279
            pgg45 |       0.0039748      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1037009      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r8   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
r8   .04922792   .00445751   .18156087

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

         gleason       pgg45       _cons
lpsa   .04922792   .00445751   .18156087

------------------+--------------------------------
         Selected |           Ridge   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5462894      0.5643413
          lweight |       0.6188823      0.6220198
              age |      -0.0201342     -0.0212482
             lbph |       0.0940129      0.0967125
              svi |       0.7422468      0.7616733
              lcp |      -0.0883812     -0.1060509
          gleason |       0.0536226      0.0492279
            pgg45 |       0.0041480      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1316898      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r9   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
r9   .04922792   .00445751   .18156087

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

         gleason       pgg45       _cons
lpsa   .04922792   .00445751   .18156087

------------------+--------------------------------
         Selected |           Ridge   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5581068      0.5643413
          lweight |       0.6210308      0.6220198
              age |      -0.0208648     -0.0212482
             lbph |       0.0957816      0.0967125
              svi |       0.7549337      0.7616733
              lcp |      -0.0998734     -0.1060509
          gleason |       0.0508098      0.0492279
            pgg45 |       0.0043469      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1637593      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
         lcavol     lweight         age        lbph         svi         lcp
r10   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

        gleason       pgg45       _cons
r10   .04922792   .00445751   .18156087

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

         gleason       pgg45       _cons
lpsa   .04922792   .00445751   .18156087
r; t=0.16 22:18:14

. *
.
. * elastic net
. foreach ai of numlist 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 {
  2. lasso2 $model, l($lambdalist) alpha(`ai')
  3. mat A = e(betas)
  4. local j=1
  5. foreach i of numlist $lambdalist {
  6.         mat a = A[`j',1..9]
  7.         lasso2 $model, l(`i') alpha(`ai')
  8.         mat b = e(betaAll)
  9.         comparemat a b
 10.         local j=`j'+1
 11. }
 12. }

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1  150.00000    7     1.18675    -32.67519   0.5594  | Added lcavol
      |                                                         | lweight lbph
      |                                                         | svi lcp
      |                                                         | gleason pgg45
      |                                                         | _cons.
     2 |   4   80.00000    8     1.44244    -37.06972   0.6090  | Added age.
     3 |   6   30.00000    7     1.74769    -43.89086   0.6484  | Removed lcp.
     4 |   7   10.00000    8     1.98102    -39.71132   0.6599  | Added lcp.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.100)
------------------+--------------------------------
           lcavol |       0.2672673      0.5445621
          lweight |       0.3713884      0.5462090
             lbph |       0.0240021      0.0713692
              svi |       0.4109869      0.7435010
              lcp |       0.0632201     -0.0804513
          gleason |       0.0479261      0.0208513
            pgg45 |       0.0019577      0.0033600
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.3184239     -0.6442175
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r1  .26726726  .37138844          0  .02400208  .41098688  .06322008

      gleason      pgg45      _cons
r1  .04792612  .00195771  .31842388

__000001[1,9]
                                    o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .26726726  .37138844          0  .02400208  .41098688  .06322008


        gleason      pgg45      _cons
lpsa  .04792612  .00195771  .31842388

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.100)
------------------+--------------------------------
           lcavol |       0.2844786      0.5445621
          lweight |       0.3941616      0.5462090
             lbph |       0.0280286      0.0713692
              svi |       0.4338634      0.7435010
              lcp |       0.0613338     -0.0804513
          gleason |       0.0489631      0.0208513
            pgg45 |       0.0020009      0.0033600
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1987959     -0.6442175
------------------+--------------------------------
mreldif=6.56460611013e-12. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r2  .28447858  .39416162          0  .02802863  .43386339  .06133384

      gleason      pgg45      _cons
r2  .04896315  .00200087  .19879589

__000001[1,9]
                                    o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .28447858  .39416162          0  .02802863  .43386339  .06133384


        gleason      pgg45      _cons
lpsa  .04896315  .00200087  .19879589

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.100)
------------------+--------------------------------
           lcavol |       0.3153566      0.5445621
          lweight |       0.4309649      0.5462090
             lbph |       0.0348118      0.0713692
              svi |       0.4732650      0.7435010
              lcp |       0.0555076     -0.0804513
          gleason |       0.0497068      0.0208513
            pgg45 |       0.0020597      0.0033600
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.0068425     -0.6442175
------------------+--------------------------------
mreldif=2.28298444101e-11. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r3   .3153566   .4309649          0  .03481182  .47326501  .05550764

      gleason      pgg45      _cons
r3  .04970679  .00205965  .00684249

__000001[1,9]
                                    o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa   .3153566   .4309649          0  .03481182  .47326501  .05550764


        gleason      pgg45      _cons
lpsa  .04970679  .00205965  .00684249

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.100)
------------------+--------------------------------
           lcavol |       0.3406997      0.5643413
          lweight |       0.4573479      0.6220198
              age |      -0.0000828     -0.0212482
             lbph |       0.0400380      0.0967125
              svi |       0.5042953      0.7616733
              lcp |       0.0483672     -0.1060509
          gleason |       0.0495093      0.0492279
            pgg45 |       0.0021035      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.1260811      0.1815609
------------------+--------------------------------
mreldif=4.28156346537e-11. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r4   .34069973    .4573479  -.00008283   .04003796   .50429534   .04836717

       gleason       pgg45       _cons
r4   .04950925   .00210348  -.12608111

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .34069973    .4573479  -.00008283   .04003796   .50429534   .04836717

         gleason       pgg45       _cons
lpsa   .04950925   .00210348  -.12608111

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.100)
------------------+--------------------------------
           lcavol |       0.3733778      0.5643413
          lweight |       0.4942185      0.6220198
              age |      -0.0032851     -0.0212482
             lbph |       0.0490776      0.0967125
              svi |       0.5420292      0.7616733
              lcp |       0.0353586     -0.1060509
          gleason |       0.0520705      0.0492279
            pgg45 |       0.0022691      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.1322223      0.1815609
------------------+--------------------------------
mreldif=4.90669290567e-11. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r5    .3733778   .49421854  -.00328513   .04907764   .54202922   .03535858

       gleason       pgg45       _cons
r5   .05207047   .00226907  -.13222231

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa    .3733778   .49421854  -.00328513   .04907764   .54202922   .03535858

         gleason       pgg45       _cons
lpsa   .05207047   .00226907  -.13222231

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.100)
------------------+--------------------------------
           lcavol |       0.4406092      0.5186256
          lweight |       0.5563393      0.6217574
              age |      -0.0099640     -0.0193045
             lbph |       0.0672552      0.0949255
              svi |       0.6158554      0.6427775
          gleason |       0.0549412      0.0422021
            pgg45 |       0.0027225      0.0027656
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.0764529      0.2537330
------------------+--------------------------------
mreldif=3.85600996562e-11. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r6   .44060915   .55633931  -.00996403   .06725523   .61585541           0

       gleason       pgg45       _cons
r6   .05494124   .00272251  -.07645288

__000001[1,9]
                                                                           o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .44060915   .55633931  -.00996403   .06725523   .61585541           0


         gleason       pgg45       _cons
lpsa   .05494124   .00272251  -.07645288

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.100)
------------------+--------------------------------
           lcavol |       0.5050524      0.5643413
          lweight |       0.6005836      0.6220198
              age |      -0.0163864     -0.0212482
             lbph |       0.0846536      0.0967125
              svi |       0.6795890      0.7616733
              lcp |      -0.0390389     -0.1060509
          gleason |       0.0523956      0.0492279
            pgg45 |       0.0033160      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.0663339      0.1815609
------------------+--------------------------------
mreldif=2.38859332396e-10. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r7   .50505243   .60058357  -.01638644   .08465363   .67958899  -.03903893

       gleason       pgg45       _cons
r7   .05239562   .00331603   .06633394

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .50505243   .60058357  -.01638644   .08465363   .67958899  -.03903893

         gleason       pgg45       _cons
lpsa   .05239562   .00331603   .06633394

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.100)
------------------+--------------------------------
           lcavol |       0.5323704      0.5643413
          lweight |       0.6116607      0.6220198
              age |      -0.0186613     -0.0212482
             lbph |       0.0902992      0.0967125
              svi |       0.7171455      0.7616733
              lcp |      -0.0691902     -0.1060509
          gleason |       0.0516644      0.0492279
            pgg45 |       0.0038091      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1133507      0.1815609
------------------+--------------------------------
mreldif=3.58605598519e-11. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r8   .53237043   .61166074  -.01866125   .09029923   .71714546  -.06919023

       gleason       pgg45       _cons
r8   .05166436   .00380905   .11335067

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .53237043   .61166074  -.01866125   .09029923   .71714546  -.06919023

         gleason       pgg45       _cons
lpsa   .05166436   .00380905   .11335067

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.100)
------------------+--------------------------------
           lcavol |       0.5445260      0.5643413
          lweight |       0.6159159      0.6220198
              age |      -0.0196544     -0.0212482
             lbph |       0.0927615      0.0967125
              svi |       0.7340095      0.7616733
              lcp |      -0.0830163     -0.1060509
          gleason |       0.0509476      0.0492279
            pgg45 |       0.0040464      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1376017      0.1815609
------------------+--------------------------------
mreldif=2.21002360906e-10. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r9   .54452602   .61591592  -.01965442   .09276154   .73400952  -.08301629

       gleason       pgg45       _cons
r9   .05094764   .00404645   .13760173

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .54452602   .61591592  -.01965442   .09276154   .73400952  -.08301629

         gleason       pgg45       _cons
lpsa   .05094764   .00404645   .13760173

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.100)
------------------+--------------------------------
           lcavol |       0.5575084      0.5643413
          lweight |       0.6200283      0.6220198
              age |      -0.0207021     -0.0212482
             lbph |       0.0953588      0.0967125
              svi |       0.7521117      0.7616733
              lcp |      -0.0980410     -0.1060509
          gleason |       0.0499000      0.0492279
            pgg45 |       0.0043124      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1657807      0.1815609
------------------+--------------------------------
mreldif=4.25415020485e-10. tolerance = .01

__000000[1,9]
         lcavol     lweight         age        lbph         svi         lcp
r10   .55750841   .62002831  -.02070213   .09535875   .75211166  -.09804101

        gleason       pgg45       _cons
r10   .04990004   .00431238    .1657807

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .55750841   .62002831  -.02070213   .09535875   .75211166  -.09804101

         gleason       pgg45       _cons
lpsa   .04990004   .00431238    .1657807

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1  150.00000    6     1.00226    -26.75656   0.5235  | Added lcavol
      |                                                         | lweight svi
      |                                                         | lcp gleason
      |                                                         | pgg45 _cons.
     2 |   2  130.00000    7     1.08806    -27.93163   0.5456  | Added lbph.
     3 |   6   30.00000    7     1.67519    -42.25314   0.6443  | Added age.
      |                                                         | Removed lcp.
     4 |   7   10.00000    8     1.90827    -38.91745   0.6582  | Added lcp.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.200)
------------------+--------------------------------
           lcavol |       0.2650913      0.5378499
          lweight |       0.3138154      0.6620155
              svi |       0.3583752      0.6991923
              lcp |       0.0513694     -0.0813594
          gleason |       0.0122505      0.0322875
            pgg45 |       0.0013628      0.0036868
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.7973703     -1.1240093
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r1  .26509133  .31381541          0          0  .35837521  .05136945

      gleason      pgg45      _cons
r1  .01225051  .00136282  .79737034

__000001[1,9]
                                    o.         o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .26509133  .31381541          0          0  .35837521  .05136945


        gleason      pgg45      _cons
lpsa  .01225051  .00136282  .79737034

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.200)
------------------+--------------------------------
           lcavol |       0.2840904      0.5445621
          lweight |       0.3458734      0.5462090
             lbph |       0.0036427      0.0713692
              svi |       0.3859556      0.7435010
              lcp |       0.0502754     -0.0804513
          gleason |       0.0167260      0.0208513
            pgg45 |       0.0014922      0.0033600
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.6154760     -0.6442175
------------------+--------------------------------
mreldif=5.95109086857e-12. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r2  .28409037  .34587336          0  .00364273  .38595556  .05027541

      gleason      pgg45      _cons
r2  .01672599  .00149223  .61547599

__000001[1,9]
                                    o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .28409037  .34587336          0  .00364273  .38595556  .05027541


        gleason      pgg45      _cons
lpsa  .01672599  .00149223  .61547599

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.200)
------------------+--------------------------------
           lcavol |       0.3176495      0.5445621
          lweight |       0.3927202      0.5462090
             lbph |       0.0147312      0.0713692
              svi |       0.4345309      0.7435010
              lcp |       0.0456348     -0.0804513
          gleason |       0.0226487      0.0208513
            pgg45 |       0.0016781      0.0033600
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.3431790     -0.6442175
------------------+--------------------------------
mreldif=8.77480024471e-12. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r3   .3176495  .39272019          0  .01473119  .43453087  .04563481

      gleason      pgg45      _cons
r3  .02264874  .00167811  .34317902

__000001[1,9]
                                    o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa   .3176495  .39272019          0  .01473119  .43453087  .04563481


        gleason      pgg45      _cons
lpsa  .02264874  .00167811  .34317902

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.200)
------------------+--------------------------------
           lcavol |       0.3445597      0.5445621
          lweight |       0.4257647      0.5462090
             lbph |       0.0231009      0.0713692
              svi |       0.4723049      0.7435010
              lcp |       0.0392508     -0.0804513
          gleason |       0.0261731      0.0208513
            pgg45 |       0.0018106      0.0033600
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1497416     -0.6442175
------------------+--------------------------------
mreldif=8.72000126926e-12. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r4  .34455972  .42576467          0  .02310085  .47230493  .03925079

      gleason      pgg45      _cons
r4  .02617314   .0018106  .14974163

__000001[1,9]
                                    o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .34455972  .42576467          0  .02310085  .47230493  .03925079


        gleason      pgg45      _cons
lpsa  .02617314   .0018106  .14974163

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.200)
------------------+--------------------------------
           lcavol |       0.3767183      0.5445621
          lweight |       0.4597658      0.5462090
             lbph |       0.0324772      0.0713692
              svi |       0.5164556      0.7435010
              lcp |       0.0284822     -0.0804513
          gleason |       0.0290940      0.0208513
            pgg45 |       0.0019649      0.0033600
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.0529769     -0.6442175
------------------+--------------------------------
mreldif=6.75393102422e-11. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r5   .37671834   .45976584           0   .03247721   .51645565   .02848217

       gleason       pgg45       _cons
r5   .02909403   .00196487  -.05297691

__000001[1,9]
                                       o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .37671834   .45976584           0   .03247721   .51645565   .02848217


         gleason       pgg45       _cons
lpsa   .02909403   .00196487  -.05297691

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.200)
------------------+--------------------------------
           lcavol |       0.4422907      0.5186256
          lweight |       0.5316341      0.6217574
              age |      -0.0064854     -0.0193045
             lbph |       0.0564157      0.0949255
              svi |       0.5975384      0.6427775
          gleason |       0.0383450      0.0422021
            pgg45 |       0.0024854      0.0027656
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.0883313      0.2537330
------------------+--------------------------------
mreldif=4.54254755524e-10. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r6   .44229072   .53163408  -.00648543   .05641572   .59753838           0

       gleason       pgg45       _cons
r6   .03834503   .00248538  -.08833125

__000001[1,9]
                                                                           o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .44229072   .53163408  -.00648543   .05641572   .59753838           0


         gleason       pgg45       _cons
lpsa   .03834503   .00248538  -.08833126

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.200)
------------------+--------------------------------
           lcavol |       0.4992808      0.5643413
          lweight |       0.5910221      0.6220198
              age |      -0.0148419     -0.0212482
             lbph |       0.0805928      0.0967125
              svi |       0.6536565      0.7616733
              lcp |      -0.0219747     -0.1060509
          gleason |       0.0439151      0.0492279
            pgg45 |       0.0029901      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.0844730      0.1815609
------------------+--------------------------------
mreldif=3.21033505156e-10. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r7   .49928078   .59102213  -.01484186   .08059285    .6536565   -.0219747

       gleason       pgg45       _cons
r7   .04391507   .00299006   .08447302

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .49928078   .59102213  -.01484186   .08059285    .6536565   -.0219747

         gleason       pgg45       _cons
lpsa   .04391507   .00299006   .08447302

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.200)
------------------+--------------------------------
           lcavol |       0.5294057      0.5643413
          lweight |       0.6067575      0.6220198
              age |      -0.0178648     -0.0212482
             lbph |       0.0882190      0.0967125
              svi |       0.7035225      0.7616733
              lcp |      -0.0602810     -0.1060509
          gleason |       0.0472676      0.0492279
            pgg45 |       0.0036398      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1228553      0.1815609
------------------+--------------------------------
mreldif=3.42578293869e-11. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r8   .52940572   .60675754  -.01786484   .08821904   .70352253  -.06028098

       gleason       pgg45       _cons
r8   .04726759    .0036398   .12285529

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .52940572   .60675754  -.01786484   .08821904   .70352253  -.06028098

         gleason       pgg45       _cons
lpsa   .04726759    .0036398   .12285529

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.200)
------------------+--------------------------------
           lcavol |       0.5427320      0.5643413
          lweight |       0.6129412      0.6220198
              age |      -0.0191707     -0.0212482
             lbph |       0.0915016      0.0967125
              svi |       0.7256731      0.7616733
              lcp |      -0.0775815     -0.1060509
          gleason |       0.0482654      0.0492279
            pgg45 |       0.0039435      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1434553      0.1815609
------------------+--------------------------------
mreldif=2.83853427005e-10. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r9   .54273198   .61294117  -.01917074   .09150163   .72567312  -.07758147

       gleason       pgg45       _cons
r9   .04826545   .00394354   .14345528

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .54273198   .61294117  -.01917074   .09150163   .72567312  -.07758147

         gleason       pgg45       _cons
lpsa   .04826545   .00394354   .14345528

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.200)
------------------+--------------------------------
           lcavol |       0.5569064      0.5643413
          lweight |       0.6190249      0.6220198
              age |      -0.0205390     -0.0212482
             lbph |       0.0949349      0.0967125
              svi |       0.7492780      0.7616733
              lcp |      -0.0962004     -0.1060509
          gleason |       0.0489895      0.0492279
            pgg45 |       0.0042777      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1677949      0.1815609
------------------+--------------------------------
mreldif=2.91199893514e-10. tolerance = .01

__000000[1,9]
         lcavol     lweight         age        lbph         svi         lcp
r10   .55690642   .61902493  -.02053897   .09493493   .74927799  -.09620039

        gleason       pgg45       _cons
r10   .04898951   .00427768   .16779492

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .55690642   .61902493  -.02053897   .09493493   .74927799  -.09620039

         gleason       pgg45       _cons
lpsa   .04898951   .00427768   .16779492

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1  150.00000    5     0.83829    -19.76303   0.4816  | Added lcavol
      |                                                         | lweight svi
      |                                                         | lcp pgg45
      |                                                         | _cons.
     2 |   4   80.00000    7     1.21860    -32.01124   0.5821  | Added lbph
      |                                                         | gleason.
     3 |   6   30.00000    7     1.59982    -40.17811   0.6387  | Added age.
      |                                                         | Removed lcp.
     4 |   7   10.00000    8     1.83329    -37.96888   0.6559  | Added lcp.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.300)
------------------+--------------------------------
           lcavol |       0.2629010      0.5414486
          lweight |       0.2275776      0.6588810
              svi |       0.3095110      0.6927932
              lcp |       0.0379029     -0.0809111
            pgg45 |       0.0003998      0.0042772
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.2276458     -0.9123991
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r1  .26290098  .22757755          0          0  .30951102   .0379029

      gleason      pgg45      _cons
r1          0  .00039978  1.2276458

__000001[1,9]
                                    o.         o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .26290098  .22757755          0          0  .30951102   .0379029

              o.
        gleason      pgg45      _cons
lpsa          0  .00039978  1.2276458

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.300)
------------------+--------------------------------
           lcavol |       0.2842664      0.5414486
          lweight |       0.2720924      0.6588810
              svi |       0.3419449      0.6927932
              lcp |       0.0380423     -0.0809111
            pgg45 |       0.0007055      0.0042772
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.0228101     -0.9123991
------------------+--------------------------------
mreldif=2.05953360985e-11. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r2  .28426642  .27209242          0          0  .34194488  .03804232

      gleason      pgg45      _cons
r2          0  .00070549  1.0228101

__000001[1,9]
                                    o.         o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .28426642  .27209242          0          0  .34194488  .03804232

              o.
        gleason      pgg45      _cons
lpsa          0  .00070549  1.0228101

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.300)
------------------+--------------------------------
           lcavol |       0.3209926      0.5414486
          lweight |       0.3456026      0.6588810
              svi |       0.3955148      0.6927932
              lcp |       0.0349605     -0.0809111
            pgg45 |       0.0012059      0.0042772
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.6821139     -0.9123991
------------------+--------------------------------
mreldif=2.10120234884e-11. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r3  .32099263  .34560259          0          0  .39551476  .03496049

      gleason      pgg45      _cons
r3          0   .0012059  .68211387

__000001[1,9]
                                    o.         o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .32099263  .34560259          0          0  .39551476  .03496049

              o.
        gleason      pgg45      _cons
lpsa          0   .0012059  .68211387

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.300)
------------------+--------------------------------
           lcavol |       0.3497214      0.5445621
          lweight |       0.3933840      0.5462090
             lbph |       0.0052270      0.0713692
              svi |       0.4379744      0.7435010
              lcp |       0.0295121     -0.0804513
          gleason |       0.0012396      0.0208513
            pgg45 |       0.0015405      0.0033600
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.4427116     -0.6442175
------------------+--------------------------------
mreldif=2.39052712165e-11. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r4  .34972141  .39338401          0  .00522699  .43797439  .02951208

      gleason      pgg45      _cons
r4  .00123961  .00154048   .4427116

__000001[1,9]
                                    o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .34972141  .39338401          0  .00522699  .43797439  .02951208


        gleason      pgg45      _cons
lpsa  .00123961  .00154048   .4427116

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.300)
------------------+--------------------------------
           lcavol |       0.3829777      0.5445621
          lweight |       0.4347820      0.5462090
             lbph |       0.0185446      0.0713692
              svi |       0.4904274      0.7435010
              lcp |       0.0194609     -0.0804513
          gleason |       0.0087776      0.0208513
            pgg45 |       0.0017926      0.0033600
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1760407     -0.6442175
------------------+--------------------------------
mreldif=4.53397129862e-11. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r5  .38297774    .434782          0  .01854457  .49042743  .01946089

      gleason      pgg45      _cons
r5  .00877762  .00179262  .17604069

__000001[1,9]
                                    o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .38297774    .434782          0  .01854457  .49042743  .01946089


        gleason      pgg45      _cons
lpsa  .00877762  .00179262  .17604069

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.300)
------------------+--------------------------------
           lcavol |       0.4442433      0.5186256
          lweight |       0.5059586      0.6217574
              age |      -0.0028508     -0.0193045
             lbph |       0.0451406      0.0949255
              svi |       0.5784570      0.6427775
          gleason |       0.0209219      0.0422021
            pgg45 |       0.0022489      0.0027656
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.1012433      0.2537330
------------------+--------------------------------
mreldif=4.13837219843e-10. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r6   .44424326   .50595858  -.00285081   .04514064   .57845702           0

       gleason       pgg45       _cons
r6   .02092189   .00224895  -.10124326

__000001[1,9]
                                                                           o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .44424326   .50595858  -.00285081   .04514064   .57845702           0


         gleason       pgg45       _cons
lpsa   .02092189   .00224895  -.10124326

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.300)
------------------+--------------------------------
           lcavol |       0.4932148      0.5643413
          lweight |       0.5813684      0.6220198
              age |      -0.0132588     -0.0212482
             lbph |       0.0764468      0.0967125
              svi |       0.6267666      0.7616733
              lcp |      -0.0042353     -0.1060509
          gleason |       0.0353515      0.0492279
            pgg45 |       0.0026511      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1020996      0.1815609
------------------+--------------------------------
mreldif=1.21064622713e-10. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r7   .49321477   .58136836  -.01325877    .0764468   .62676656  -.00423527

       gleason       pgg45       _cons
r7   .03535148   .00265111   .10209959

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .49321477   .58136836  -.01325877    .0764468   .62676656  -.00423527

         gleason       pgg45       _cons
lpsa   .03535148   .00265111   .10209959

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.300)
------------------+--------------------------------
           lcavol |       0.5263580      0.5643413
          lweight |       0.6018314      0.6220198
              age |      -0.0170579     -0.0212482
             lbph |       0.0861156      0.0967125
              svi |       0.6896319      0.7616733
              lcp |      -0.0511827     -0.1060509
          gleason |       0.0428511      0.0492279
            pgg45 |       0.0034669      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1322019      0.1815609
------------------+--------------------------------
mreldif=3.82532158646e-11. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r8   .52635803   .60183141  -.01705794   .08611562    .6896319  -.05118271

       gleason       pgg45       _cons
r8   .04285107   .00346686   .13220191

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .52635803   .60183141  -.01705794   .08611562    .6896319  -.05118271

         gleason       pgg45       _cons
lpsa   .04285107   .00346686   .13220191

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.300)
------------------+--------------------------------
           lcavol |       0.5409066      0.5643413
          lweight |       0.6099582      0.6220198
              age |      -0.0186832     -0.0212482
             lbph |       0.0902331      0.0967125
              svi |       0.7172358      0.7616733
              lcp |      -0.0720754     -0.1060509
          gleason |       0.0455763      0.0492279
            pgg45 |       0.0038392      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1492474      0.1815609
------------------+--------------------------------
mreldif=3.20358984118e-10. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r9   .54090659    .6099582  -.01868315   .09023306   .71723584   -.0720754

       gleason       pgg45       _cons
r9   .04557631   .00383924   .14924736

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .54090659    .6099582  -.01868315   .09023306   .71723584   -.0720754

         gleason       pgg45       _cons
lpsa   .04557631   .00383924   .14924736

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.300)
------------------+--------------------------------
           lcavol |       0.5563008      0.5643413
          lweight |       0.6180206      0.6220198
              age |      -0.0203754     -0.0212482
             lbph |       0.0945101      0.0967125
              svi |       0.7464326      0.7616733
              lcp |      -0.0943515     -0.1060509
          gleason |       0.0480782      0.0492279
            pgg45 |       0.0042428      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1698018      0.1815609
------------------+--------------------------------
mreldif=4.24018371255e-10. tolerance = .01

__000000[1,9]
         lcavol     lweight         age        lbph         svi         lcp
r10   .55630077   .61802064  -.02037536    .0945101   .74643258  -.09435148

        gleason       pgg45       _cons
r10   .04807823   .00424281   .16980179

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .55630077   .61802064  -.02037536    .0945101   .74643258  -.09435148

         gleason       pgg45       _cons
lpsa   .04807823   .00424281   .16980179

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1  150.00000    4     0.66121    -12.54268   0.4314  | Added lcavol
      |                                                         | lweight svi
      |                                                         | lcp _cons.
     2 |   3  100.00000    5     0.98715    -26.74931   0.5307  | Added pgg45.
     3 |   5   60.00000    6     1.27774    -35.54290   0.5958  | Added lbph.
     4 |   6   30.00000    6     1.52785    -41.97379   0.6324  | Added
      |                                                         | gleason.
      |                                                         | Removed lcp.
     5 |   7   10.00000    7     1.79412    -41.33142   0.6546  | Added age.
     6 |   8    5.00000    8     1.97940    -37.91709   0.6605  | Added lcp.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.400)
------------------+--------------------------------
           lcavol |       0.2597063      0.5418601
          lweight |       0.1326293      0.6589198
              svi |       0.2509815      0.7099563
              lcp |       0.0178939     -0.0300823
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.5953502     -0.8034092
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r1  .25970625  .13262929          0          0  .25098155  .01789386

      gleason      pgg45      _cons
r1          0          0  1.5953502

__000001[1,9]
                                    o.         o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .25970625  .13262929          0          0  .25098155  .01789386

              o.         o.
        gleason      pgg45      _cons
lpsa          0          0  1.5953502

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.400)
------------------+--------------------------------
           lcavol |       0.2841969      0.5418601
          lweight |       0.1879116      0.6589198
              svi |       0.2940350      0.7099563
              lcp |       0.0217765     -0.0300823
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.3530468     -0.8034092
------------------+--------------------------------
mreldif=2.66826817224e-11. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r2  .28419686  .18791161          0          0  .29403502  .02177651

      gleason      pgg45      _cons
r2          0          0  1.3530468

__000001[1,9]
                                    o.         o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .28419686  .18791161          0          0  .29403502  .02177651

              o.         o.
        gleason      pgg45      _cons
lpsa          0          0  1.3530468

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.400)
------------------+--------------------------------
           lcavol |       0.3245636      0.5414486
          lweight |       0.2783259      0.6588810
              svi |       0.3613748      0.6927932
              lcp |       0.0225271     -0.0809111
            pgg45 |       0.0003571      0.0042772
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.9472930     -0.9123991
------------------+--------------------------------
mreldif=2.49348519889e-11. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r3  .32456361  .27832589          0          0  .36137482  .02252713

      gleason      pgg45      _cons
r3          0  .00035708  .94729298

__000001[1,9]
                                    o.         o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .32456361  .27832589          0          0  .36137482  .02252713

              o.
        gleason      pgg45      _cons
lpsa          0  .00035708  .94729298

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.400)
------------------+--------------------------------
           lcavol |       0.3547745      0.5414486
          lweight |       0.3442395      0.6588810
              svi |       0.4090443      0.6927932
              lcp |       0.0179382     -0.0809111
            pgg45 |       0.0008864      0.0042772
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.6432628     -0.9123991
------------------+--------------------------------
mreldif=4.38146481906e-11. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r4  .35477454  .34423947          0          0  .40904435  .01793815

      gleason      pgg45      _cons
r4          0  .00088638  .64326283

__000001[1,9]
                                    o.         o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .35477454  .34423947          0          0  .40904435  .01793815

              o.
        gleason      pgg45      _cons
lpsa          0  .00088638  .64326283

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.400)
------------------+--------------------------------
           lcavol |       0.3893435      0.5469201
          lweight |       0.4103556      0.5434709
             lbph |       0.0036270      0.0718135
              svi |       0.4638803      0.7396583
              lcp |       0.0090656     -0.0801571
            pgg45 |       0.0014642      0.0037380
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.3287477     -0.5050395
------------------+--------------------------------
mreldif=5.07301544521e-11. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r5  .38934346  .41035562          0    .003627   .4638803   .0090656

      gleason      pgg45      _cons
r5          0  .00146419  .32874773

__000001[1,9]
                                    o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .38934346  .41035562          0    .003627   .4638803   .0090656

              o.
        gleason      pgg45      _cons
lpsa          0  .00146419  .32874773

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.400)
------------------+--------------------------------
           lcavol |       0.4468911      0.5105023
          lweight |       0.4825017      0.5513850
             lbph |       0.0344772      0.0717813
              svi |       0.5581976      0.6525584
          gleason |       0.0037420      0.0174147
            pgg45 |       0.0020440      0.0021254
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.0753013     -0.5296341
------------------+--------------------------------
mreldif=2.82422721631e-10. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r6   .44689112   .48250165           0   .03447724   .55819762           0

       gleason       pgg45       _cons
r6   .00374203   .00204396  -.07530129

__000001[1,9]
                                       o.                                  o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .44689112   .48250165           0   .03447724   .55819762           0


         gleason       pgg45       _cons
lpsa   .00374203   .00204396  -.07530129

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.400)
------------------+--------------------------------
           lcavol |       0.4927792      0.5186256
          lweight |       0.5718474      0.6217574
              age |      -0.0118795     -0.0193045
             lbph |       0.0723928      0.0949255
              svi |       0.6146470      0.6427775
          gleason |       0.0280621      0.0422021
            pgg45 |       0.0025137      0.0027656
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1055094      0.2537330
------------------+--------------------------------
mreldif=4.82991422924e-10. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r7   .49277921   .57184739  -.01187945   .07239283   .61464704           0

       gleason       pgg45       _cons
r7   .02806215    .0025137   .10550938

__000001[1,9]
                                                                           o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .49277921   .57184739  -.01187945   .07239283   .61464704           0


         gleason       pgg45       _cons
lpsa   .02806215    .0025137   .10550938

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.400)
------------------+--------------------------------
           lcavol |       0.5232242      0.5643413
          lweight |       0.5968828      0.6220198
              age |      -0.0162403     -0.0212482
             lbph |       0.0839884      0.0967125
              svi |       0.6754658      0.7616733
              lcp |      -0.0418893     -0.1060509
          gleason |       0.0384158      0.0492279
            pgg45 |       0.0032901      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1413769      0.1815609
------------------+--------------------------------
mreldif=1.85946966085e-10. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r8   .52322423   .59688278  -.01624028   .08398838   .67546576  -.04188934

       gleason       pgg45       _cons
r8   .03841584   .00329011   .14137685

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .52322423   .59688278  -.01624028   .08398838   .67546576  -.04188934

         gleason       pgg45       _cons
lpsa   .03841584   .00329011   .14137685

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.400)
------------------+--------------------------------
           lcavol |       0.5390491      0.5643413
          lweight |       0.6069671      0.6220198
              age |      -0.0181916     -0.0212482
             lbph |       0.0889557      0.0967125
              svi |       0.7086959      0.7616733
              lcp |      -0.0664967     -0.1060509
          gleason |       0.0428805      0.0492279
            pgg45 |       0.0037335      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1549747      0.1815609
------------------+--------------------------------
mreldif=2.89556745585e-10. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r9   .53904911   .60696711  -.01819159   .08895568   .70869588  -.06649667

       gleason       pgg45       _cons
r9   .04288047   .00373351   .15497467

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .53904911   .60696711  -.01819159   .08895568   .70869588  -.06649667

         gleason       pgg45       _cons
lpsa   .04288047   .00373351   .15497467

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.400)
------------------+--------------------------------
           lcavol |       0.5556914      0.5643413
          lweight |       0.6170154      0.6220198
              age |      -0.0202113     -0.0212482
             lbph |       0.0940843      0.0967125
              svi |       0.7435754      0.7616733
              lcp |      -0.0924942     -0.1060509
          gleason |       0.0471662      0.0492279
            pgg45 |       0.0042078      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1718012      0.1815609
------------------+--------------------------------
mreldif=4.09276040850e-10. tolerance = .01

__000000[1,9]
         lcavol     lweight         age        lbph         svi         lcp
r10   .55569144   .61701545   -.0202113   .09408428   .74357536  -.09249422

        gleason       pgg45       _cons
r10    .0471662   .00420778   .17180117

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .55569144   .61701545   -.0202113   .09408428   .74357536  -.09249422

         gleason       pgg45       _cons
lpsa    .0471662   .00420778   .17180117

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1  150.00000    3     0.45826     -4.28052   0.3714  | Added lcavol
      |                                                         | lweight svi
      |                                                         | _cons.
     2 |   3  100.00000    4     0.86041    -23.24177   0.5020  | Added lcp.
     3 |   4   80.00000    5     1.03361    -28.17269   0.5457  | Added pgg45.
     4 |   5   60.00000    4     1.20680    -38.55093   0.5842  | Removed lcp.
     5 |   6   30.00000    5     1.48491    -44.05987   0.6287  | Added lbph.
     6 |   7   10.00000    7     1.76584    -40.76492   0.6535  | Added age
      |                                                         | gleason.
     7 |   8    5.00000    8     1.93964    -37.48054   0.6596  | Added lcp.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.2549167      0.5258519
          lweight |       0.0268516      0.6617699
              svi |       0.1764878      0.6656665
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.9985955     -0.7771568
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r1  .25491669  .02685155          0          0  .17648776          0

      gleason      pgg45      _cons
r1          0          0  1.9985955

__000001[1,9]
                                    o.         o.                    o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .25491669  .02685155          0          0  .17648776          0

              o.         o.
        gleason      pgg45      _cons
lpsa          0          0  1.9985955

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.2841548      0.5258519
          lweight |       0.0949696      0.6617699
              svi |       0.2352477      0.6656665
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.6992059     -0.7771568
------------------+--------------------------------
mreldif=2.01950421587e-12. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r2  .28415481  .09496964          0          0  .23524767          0

      gleason      pgg45      _cons
r2          0          0  1.6992059

__000001[1,9]
                                    o.         o.                    o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .28415481  .09496964          0          0  .23524767          0

              o.         o.
        gleason      pgg45      _cons
lpsa          0          0  1.6992059

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.3290858      0.5418601
          lweight |       0.2051364      0.6589198
              svi |       0.3213515      0.7099563
              lcp |       0.0048328     -0.0300823
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.2209855     -0.8034092
------------------+--------------------------------
mreldif=5.64265034780e-12. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r3  .32908582  .20513641          0          0  .32135155   .0048328

      gleason      pgg45      _cons
r3          0          0  1.2209855

__000001[1,9]
                                    o.         o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .32908582  .20513641          0          0  .32135155   .0048328

              o.         o.
        gleason      pgg45      _cons
lpsa          0          0  1.2209855

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.3616710      0.5414486
          lweight |       0.2846361      0.6588810
              svi |       0.3816404      0.6927932
              lcp |       0.0055112     -0.0809111
            pgg45 |       0.0001504      0.0042772
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.8718987     -0.9123991
------------------+--------------------------------
mreldif=1.00540709437e-11. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r4  .36167097  .28463608          0          0  .38164039  .00551119

      gleason      pgg45      _cons
r4          0  .00015037  .87189869

__000001[1,9]
                                    o.         o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .36167097  .28463608          0          0  .38164039  .00551119

              o.
        gleason      pgg45      _cons
lpsa          0  .00015037  .87189869

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.3958396      0.5067548
          lweight |       0.3695804      0.6650921
              svi |       0.4404819      0.6016864
            pgg45 |       0.0008990      0.0029746
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.4855319     -0.8221054
------------------+--------------------------------
mreldif=2.67320711887e-11. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r5  .39583962  .36958042          0          0   .4404819          0

      gleason      pgg45      _cons
r5          0  .00089902  .48553193

__000001[1,9]
                                    o.         o.                    o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .39583962  .36958042          0          0   .4404819          0

              o.
        gleason      pgg45      _cons
lpsa          0  .00089902  .48553193

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.4499190      0.5125769
          lweight |       0.4697457      0.5490809
             lbph |       0.0265646      0.0721513
              svi |       0.5369207      0.6496250
            pgg45 |       0.0017593      0.0024450
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.0045115     -0.4136749
------------------+--------------------------------
mreldif=6.01001196266e-11. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r6  .44991896  .46974567          0  .02656458  .53692071          0

      gleason      pgg45      _cons
r6          0  .00175928  .00451154

__000001[1,9]
                                    o.                               o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .44991896  .46974567          0  .02656458  .53692071          0

              o.
        gleason      pgg45      _cons
lpsa          0  .00175928  .00451154

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.4941626      0.5186256
          lweight |       0.5622500      0.6217574
              age |      -0.0105501     -0.0193045
             lbph |       0.0683305      0.0949255
              svi |       0.6070730      0.6427775
          gleason |       0.0210338      0.0422021
            pgg45 |       0.0024411      0.0027656
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1048456      0.2537330
------------------+--------------------------------
mreldif=5.89360580301e-10. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r7   .49416259   .56225004  -.01055008   .06833045   .60707302           0

       gleason       pgg45       _cons
r7   .02103381   .00244109   .10484564

__000001[1,9]
                                                                           o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .49416259   .56225004  -.01055008   .06833045   .60707302           0


         gleason       pgg45       _cons
lpsa   .02103381   .00244109   .10484564

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.5200010      0.5643413
          lweight |       0.5919121      0.6220198
              age |      -0.0154116     -0.0212482
             lbph |       0.0818367      0.0967125
              svi |       0.6610160      0.7616733
              lcp |      -0.0323945     -0.1060509
          gleason |       0.0339630      0.0492279
            pgg45 |       0.0031094      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1503654      0.1815609
------------------+--------------------------------
mreldif=2.44451748217e-10. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r8   .52000102   .59191212  -.01541163   .08183674   .66101602  -.03239455

       gleason       pgg45       _cons
r8   .03396302   .00310939    .1503654

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .52000102   .59191212  -.01541163   .08183674   .66101602  -.03239455

         gleason       pgg45       _cons
lpsa   .03396302   .00310939    .1503654

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.5371588      0.5643413
          lweight |       0.6039680      0.6220198
              age |      -0.0176960     -0.0212482
             lbph |       0.0876694      0.0967125
              svi |       0.7000514      0.7616733
              lcp |      -0.0608438     -0.1060509
          gleason |       0.0401782      0.0492279
            pgg45 |       0.0036263      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1606338      0.1815609
------------------+--------------------------------
mreldif=4.24195391403e-10. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r9   .53715879   .60396802    -.017696   .08766937   .70005137  -.06084383

       gleason       pgg45       _cons
r9   .04017821   .00362633   .16063379

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .53715879   .60396802    -.017696   .08766937   .70005137  -.06084383

         gleason       pgg45       _cons
lpsa   .04017821   .00362633   .16063379

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.5550784      0.5643413
          lweight |       0.6160094      0.6220198
              age |      -0.0200468     -0.0212482
             lbph |       0.0936574      0.0967125
              svi |       0.7407063      0.7616733
              lcp |      -0.0906286     -0.1060509
          gleason |       0.0462534      0.0492279
            pgg45 |       0.0041726      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1737929      0.1815609
------------------+--------------------------------
mreldif=3.57014989392e-10. tolerance = .01

__000000[1,9]
         lcavol     lweight         age        lbph         svi         lcp
r10    .5550784   .61600935  -.02004678   .09365744   .74070625  -.09062855

        gleason       pgg45       _cons
r10   .04625343   .00417259   .17379294

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa    .5550784   .61600935  -.02004678   .09365744   .74070625  -.09062855

         gleason       pgg45       _cons
lpsa   .04625343   .00417259   .17379294

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1  150.00000    2     0.30473      0.86078   0.3178  | Added lcavol
      |                                                         | svi _cons.
     2 |   3  100.00000    3     0.70600    -19.13410   0.4693  | Added
      |                                                         | lweight.
     3 |   5   60.00000    4     1.12955    -34.88963   0.5706  | Added pgg45.
     4 |   6   30.00000    5     1.44504    -42.50540   0.6243  | Added lbph.
     5 |   7   10.00000    7     1.73706    -40.13340   0.6522  | Added age
      |                                                         | gleason.
     6 |   8    5.00000    8     1.89922    -36.99825   0.6586  | Added lcp.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.600)
------------------+--------------------------------
           lcavol |       0.2374897      0.5925572
              svi |       0.0672390      0.6697460
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.1432166      1.5334325
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r1  .23748972          0          0          0  .06723896          0

      gleason      pgg45      _cons
r1          0          0  2.1432166

__000001[1,9]
                         o.         o.         o.                    o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .23748972          0          0          0  .06723896          0

              o.         o.
        gleason      pgg45      _cons
lpsa          0          0  2.1432166

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.600)
------------------+--------------------------------
           lcavol |       0.2757126      0.5925572
              svi |       0.1416246      0.6697460
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.0755112      1.5334325
------------------+--------------------------------
mreldif=9.54840753465e-12. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r2  .27571263          0          0          0  .14162461          0

      gleason      pgg45      _cons
r2          0          0  2.0755112

__000001[1,9]
                         o.         o.         o.                    o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .27571263          0          0          0  .14162461          0

              o.         o.
        gleason      pgg45      _cons
lpsa          0          0  2.0755112

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.600)
------------------+--------------------------------
           lcavol |       0.3273349      0.5258519
          lweight |       0.1253771      0.6617699
              svi |       0.2532906      0.6656665
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.5266593     -0.7771568
------------------+--------------------------------
mreldif=8.01292374492e-13. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r3  .32733486   .1253771          0          0  .25329065          0

      gleason      pgg45      _cons
r3          0          0  1.5266593

__000001[1,9]
                                    o.         o.                    o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .32733486   .1253771          0          0  .25329065          0

              o.         o.
        gleason      pgg45      _cons
lpsa          0          0  1.5266593

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.600)
------------------+--------------------------------
           lcavol |       0.3632987      0.5258519
          lweight |       0.2205992      0.6617699
              svi |       0.3306765      0.6656665
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.1157987     -0.7771568
------------------+--------------------------------
mreldif=2.89654258319e-12. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r4  .36329868  .22059917          0          0  .33067654          0

      gleason      pgg45      _cons
r4          0          0  1.1157987

__000001[1,9]
                                    o.         o.                    o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .36329868  .22059917          0          0  .33067654          0

              o.         o.
        gleason      pgg45      _cons
lpsa          0          0  1.1157987

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.600)
------------------+--------------------------------
           lcavol |       0.4001517      0.5067548
          lweight |       0.3213520      0.6650921
              svi |       0.4079072      0.6016864
            pgg45 |       0.0001380      0.0029746
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.6803354     -0.8221054
------------------+--------------------------------
mreldif=1.31402135978e-11. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r5  .40015172  .32135195          0          0   .4079072          0

      gleason      pgg45      _cons
r5          0  .00013803  .68033535

__000001[1,9]
                                    o.         o.                    o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .40015172  .32135195          0          0   .4079072          0

              o.
        gleason      pgg45      _cons
lpsa          0  .00013803  .68033535

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.600)
------------------+--------------------------------
           lcavol |       0.4528646      0.5125769
          lweight |       0.4573361      0.5490809
             lbph |       0.0183331      0.0721513
              svi |       0.5151046      0.6496250
            pgg45 |       0.0014040      0.0024450
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.0597809     -0.4136749
------------------+--------------------------------
mreldif=5.21581642930e-11. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r6  .45286464  .45733609          0  .01833309  .51510459          0

      gleason      pgg45      _cons
r6          0  .00140396  .05978093

__000001[1,9]
                                    o.                               o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .45286464  .45733609          0  .01833309  .51510459          0

              o.
        gleason      pgg45      _cons
lpsa          0  .00140396  .05978093

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.600)
------------------+--------------------------------
           lcavol |       0.4956051      0.5186256
          lweight |       0.5524971      0.6217574
              age |      -0.0091982     -0.0193045
             lbph |       0.0642069      0.0949255
              svi |       0.5993467      0.6427775
          gleason |       0.0138383      0.0422021
            pgg45 |       0.0023697      0.0027656
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1043694      0.2537330
------------------+--------------------------------
mreldif=9.16053887040e-11. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r7   .49560506    .5524971  -.00919825   .06420691   .59934666           0

       gleason       pgg45       _cons
r7   .01383828   .00236973   .10436938

__000001[1,9]
                                                                           o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .49560506    .5524971  -.00919825   .06420691   .59934666           0


         gleason       pgg45       _cons
lpsa   .01383828   .00236973   .10436938

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.600)
------------------+--------------------------------
           lcavol |       0.5166849      0.5643413
          lweight |       0.5869199      0.6220198
              age |      -0.0145717     -0.0212482
             lbph |       0.0796601      0.0967125
              svi |       0.6462742      0.7616733
              lcp |      -0.0226917     -0.1060509
          gleason |       0.0294938      0.0492279
            pgg45 |       0.0029245      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1591518      0.1815609
------------------+--------------------------------
mreldif=2.49739302778e-10. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r8   .51668495   .58691994  -.01457171   .07966006   .64627424  -.02269172

       gleason       pgg45       _cons
r8   .02949384   .00292454   .15915183

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .51668495   .58691994  -.01457171   .07966006   .64627424  -.02269172

         gleason       pgg45       _cons
lpsa   .02949384   .00292454   .15915183

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.600)
------------------+--------------------------------
           lcavol |       0.5352349      0.5643413
          lweight |       0.6009610      0.6220198
              age |      -0.0171963     -0.0212482
             lbph |       0.0863740      0.0967125
              svi |       0.6913004      0.7616733
              lcp |      -0.0551154     -0.1060509
          gleason |       0.0374698      0.0492279
            pgg45 |       0.0035177      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1662212      0.1815609
------------------+--------------------------------
mreldif=2.40509050914e-10. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r9   .53523485   .60096105  -.01719632   .08637399   .69130045  -.05511541

       gleason       pgg45       _cons
r9   .03746979   .00351765   .16622116

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .53523485   .60096105  -.01719632   .08637399   .69130045  -.05511541

         gleason       pgg45       _cons
lpsa   .03746979   .00351765   .16622116

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.600)
------------------+--------------------------------
           lcavol |       0.5544616      0.5643413
          lweight |       0.6150024      0.6220198
              age |      -0.0198818     -0.0212482
             lbph |       0.0932296      0.0967125
              svi |       0.7378252      0.7616733
              lcp |      -0.0887544     -0.1060509
          gleason |       0.0453399      0.0492279
            pgg45 |       0.0041372      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1757769      0.1815609
------------------+--------------------------------
mreldif=3.03077376370e-10. tolerance = .01

__000000[1,9]
         lcavol     lweight         age        lbph         svi         lcp
r10   .55446161   .61500236   -.0198818   .09322959   .73782519  -.08875443

        gleason       pgg45       _cons
r10   .04533994   .00413722   .17577695

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .55446161   .61500236   -.0198818   .09322959   .73782519  -.08875443

         gleason       pgg45       _cons
lpsa   .04533994   .00413722   .17577695

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1  150.00000    1     0.20920      4.84573   0.2681  | Added lcavol
      |                                                         | _cons.
     2 |   2  130.00000    2     0.29397     -0.20381   0.3300  | Added svi.
     3 |   3  100.00000    3     0.53488    -11.71060   0.4304  | Added
      |                                                         | lweight.
     4 |   6   30.00000    5     1.40425    -40.74651   0.6191  | Added lbph
      |                                                         | pgg45.
     5 |   7   10.00000    7     1.70776    -39.43466   0.6507  | Added age
      |                                                         | gleason.
     6 |   8    5.00000    8     1.85811    -36.46831   0.6574  | Added lcp.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.700)
------------------+--------------------------------
           lcavol |       0.2091987      0.7193204
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.1959666      1.5072975
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r1  .20919872          0          0          0          0          0

      gleason      pgg45      _cons
r1          0          0  2.1959666

__000001[1,9]
                         o.         o.         o.         o.         o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .20919872          0          0          0          0          0

              o.         o.
        gleason      pgg45      _cons
lpsa          0          0  2.1959666

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.700)
------------------+--------------------------------
           lcavol |       0.2605663      0.5925572
              svi |       0.0334028      0.6697460
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.1193883      1.5334325
------------------+--------------------------------
mreldif=4.03506922759e-12. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r2   .2605663          0          0          0  .03340283          0

      gleason      pgg45      _cons
r2          0          0  2.1193883

__000001[1,9]
                         o.         o.         o.                    o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa   .2605663          0          0          0  .03340283          0

              o.         o.
        gleason      pgg45      _cons
lpsa          0          0  2.1193883

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.700)
------------------+--------------------------------
           lcavol |       0.3249644      0.5258519
          lweight |       0.0384537      0.6617699
              svi |       0.1714581      0.6656665
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.8630157     -0.7771568
------------------+--------------------------------
mreldif=3.06817284551e-12. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r3  .32496445   .0384537          0          0  .17145813          0

      gleason      pgg45      _cons
r3          0          0  1.8630157

__000001[1,9]
                                    o.         o.                    o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .32496445   .0384537          0          0  .17145813          0

              o.         o.
        gleason      pgg45      _cons
lpsa          0          0  1.8630157

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.700)
------------------+--------------------------------
           lcavol |       0.3627543      0.5258519
          lweight |       0.1518351      0.6617699
              svi |       0.2642920      0.6656665
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.3804462     -0.7771568
------------------+--------------------------------
mreldif=1.20413376123e-11. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r4  .36275435  .15183512          0          0  .26429199          0

      gleason      pgg45      _cons
r4          0          0  1.3804462

__000001[1,9]
                                    o.         o.                    o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .36275435  .15183512          0          0  .26429199          0

              o.         o.
        gleason      pgg45      _cons
lpsa          0          0  1.3804462

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.700)
------------------+--------------------------------
           lcavol |       0.4017014      0.5258519
          lweight |       0.2704236      0.6617699
              svi |       0.3599900      0.6656665
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.8767984     -0.7771568
------------------+--------------------------------
mreldif=1.09170009341e-12. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r5  .40170137  .27042362          0          0  .35999004          0

      gleason      pgg45      _cons
r5          0          0  .87679839

__000001[1,9]
                                    o.         o.                    o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .40170137  .27042362          0          0  .35999004          0

              o.         o.
        gleason      pgg45      _cons
lpsa          0          0  .87679839

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.700)
------------------+--------------------------------
           lcavol |       0.4561836      0.5125769
          lweight |       0.4448450      0.5490809
             lbph |       0.0098522      0.0721513
              svi |       0.4923263      0.6496250
            pgg45 |       0.0010389      0.0024450
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1153119     -0.4136749
------------------+--------------------------------
mreldif=1.36746002582e-10. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r6   .4561836  .44484504          0  .00985217  .49232626          0

      gleason      pgg45      _cons
r6          0  .00103894  .11531191

__000001[1,9]
                                    o.                               o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa   .4561836  .44484504          0  .00985217  .49232626          0

              o.
        gleason      pgg45      _cons
lpsa          0  .00103894  .11531191

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.700)
------------------+--------------------------------
           lcavol |       0.4971093      0.5186256
          lweight |       0.5425838      0.6217574
              age |      -0.0078234     -0.0193045
             lbph |       0.0600208      0.0949255
              svi |       0.5914607      0.6427775
          gleason |       0.0064666      0.0422021
            pgg45 |       0.0022998      0.0027656
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1041173      0.2537330
------------------+--------------------------------
mreldif=1.48615313318e-10. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r7   .4971093   .5425838  -.0078234  .06002079  .59146069          0

      gleason      pgg45      _cons
r7  .00646665   .0022998  .10411733

__000001[1,9]
                                                                     o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa   .4971093   .5425838  -.0078234  .06002079  .59146069          0


        gleason      pgg45      _cons
lpsa  .00646665   .0022998  .10411733

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.700)
------------------+--------------------------------
           lcavol |       0.5132724      0.5643413
          lweight |       0.5819068      0.6220198
              age |      -0.0137202     -0.0212482
             lbph |       0.0774577      0.0967125
              svi |       0.6312317      0.7616733
              lcp |      -0.0127740     -0.1060509
          gleason |       0.0250097      0.0492279
            pgg45 |       0.0027354      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1677192      0.1815609
------------------+--------------------------------
mreldif=4.15337321704e-10. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r8    .5132724   .58190682  -.01372025   .07745771   .63123166  -.01277395

       gleason       pgg45       _cons
r8   .02500968   .00273539   .16771922

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa    .5132724   .58190682  -.01372025   .07745771   .63123166  -.01277395

         gleason       pgg45       _cons
lpsa   .02500968   .00273539   .16771923

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.700)
------------------+--------------------------------
           lcavol |       0.5332765      0.5643413
          lweight |       0.5979463      0.6220198
              age |      -0.0166925     -0.0212482
             lbph |       0.0850694      0.0967125
              svi |       0.6824412      0.7616733
              lcp |      -0.0493099     -0.1060509
          gleason |       0.0347555      0.0492279
            pgg45 |       0.0034074      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1717330      0.1815609
------------------+--------------------------------
mreldif=3.35013543385e-10. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r9    .5332765   .59794632  -.01669248   .08506939   .68244116  -.04930986

       gleason       pgg45       _cons
r9   .03475554   .00340744   .17173305

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa    .5332765   .59794632  -.01669248   .08506939   .68244116  -.04930986

         gleason       pgg45       _cons
lpsa   .03475554   .00340744   .17173305

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.700)
------------------+--------------------------------
           lcavol |       0.5538410      0.5643413
          lweight |       0.6139945      0.6220198
              age |      -0.0197164     -0.0212482
             lbph |       0.0928007      0.0967125
              svi |       0.7349321      0.7616733
              lcp |      -0.0868718     -0.1060509
          gleason |       0.0444257      0.0492279
            pgg45 |       0.0041017      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1777531      0.1815609
------------------+--------------------------------
mreldif=3.63554181556e-10. tolerance = .01

__000000[1,9]
         lcavol     lweight         age        lbph         svi         lcp
r10   .55384104   .61399448  -.01971636   .09280073    .7349321  -.08687178

        gleason       pgg45       _cons
r10   .04442573   .00410169   .17775306

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .55384104   .61399448  -.01971636   .09280073    .7349321  -.08687178

         gleason       pgg45       _cons
lpsa   .04442573   .00410169   .17775306

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1  150.00000    1     0.16610     11.22918   0.2204  | Added lcavol
      |                                                         | _cons.
     2 |   3  100.00000    2     0.39862     -9.18735   0.3943  | Added svi.
     3 |   4   80.00000    3     0.63278    -17.90388   0.4707  | Added
      |                                                         | lweight.
     4 |   6   30.00000    5     1.36246    -38.77562   0.6130  | Added lbph
      |                                                         | pgg45.
     5 |   7   10.00000    6     1.67920    -43.07342   0.6489  | Added age.
     6 |   8    5.00000    8     1.81629    -35.88875   0.6560  | Added lcp
      |                                                         | gleason.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.800)
------------------+--------------------------------
           lcavol |       0.1660968      0.7193204
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.2541546      1.5072975
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r1  .16609682          0          0          0          0          0

      gleason      pgg45      _cons
r1          0          0  2.2541546

__000001[1,9]
                         o.         o.         o.         o.         o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .16609682          0          0          0          0          0

              o.         o.
        gleason      pgg45      _cons
lpsa          0          0  2.2541546

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.800)
------------------+--------------------------------
           lcavol |       0.2311425      0.7193204
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.1663423      1.5072975
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r2   .2311425          0          0          0          0          0

      gleason      pgg45      _cons
r2          0          0  2.1663423

__000001[1,9]
                         o.         o.         o.         o.         o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa   .2311425          0          0          0          0          0

              o.         o.
        gleason      pgg45      _cons
lpsa          0          0  2.1663423

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.800)
------------------+--------------------------------
           lcavol |       0.3197343      0.5925572
              svi |       0.0788894      0.6697460
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.0296633      1.5334325
------------------+--------------------------------
mreldif=1.42956257492e-11. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r3  .31973432          0          0          0  .07888937          0

      gleason      pgg45      _cons
r3          0          0  2.0296633

__000001[1,9]
                         o.         o.         o.                    o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .31973432          0          0          0  .07888937          0

              o.         o.
        gleason      pgg45      _cons
lpsa          0          0  2.0296633

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.800)
------------------+--------------------------------
           lcavol |       0.3638282      0.5258519
          lweight |       0.0775849      0.6617699
              svi |       0.1913713      0.6656665
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.6642333     -0.7771568
------------------+--------------------------------
mreldif=3.43383930744e-12. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r4  .36382817  .07758491          0          0  .19137129          0

      gleason      pgg45      _cons
r4          0          0  1.6642333

__000001[1,9]
                                    o.         o.                    o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .36382817  .07758491          0          0  .19137129          0

              o.         o.
        gleason      pgg45      _cons
lpsa          0          0  1.6642333

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.800)
------------------+--------------------------------
           lcavol |       0.4034879      0.5258519
          lweight |       0.2163874      0.6617699
              svi |       0.3053574      0.6656665
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.0823086     -0.7771568
------------------+--------------------------------
mreldif=7.37619899235e-12. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r5  .40348785  .21638742          0          0  .30535737          0

      gleason      pgg45      _cons
r5          0          0  1.0823086

__000001[1,9]
                                    o.         o.                    o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .40348785  .21638742          0          0  .30535737          0

              o.         o.
        gleason      pgg45      _cons
lpsa          0          0  1.0823086

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.800)
------------------+--------------------------------
           lcavol |       0.4599140      0.5125769
          lweight |       0.4322772      0.5490809
             lbph |       0.0011077      0.0721513
              svi |       0.4684949      0.6496250
            pgg45 |       0.0006637      0.0024450
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1710684     -0.4136749
------------------+--------------------------------
mreldif=5.92473674376e-11. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r6    .459914   .4322772          0   .0011077  .46849493          0

      gleason      pgg45      _cons
r6          0  .00066375  .17106843

__000001[1,9]
                                    o.                               o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa    .459914   .4322772          0   .0011077  .46849493          0

              o.
        gleason      pgg45      _cons
lpsa          0  .00066375  .17106843

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.800)
------------------+--------------------------------
           lcavol |       0.4985532      0.5234981
          lweight |       0.5326719      0.6152349
              age |      -0.0064321     -0.0190343
             lbph |       0.0557559      0.0954908
              svi |       0.5835750      0.6358643
            pgg45 |       0.0022121      0.0035248
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.0972199      0.5214696
------------------+--------------------------------
mreldif=8.33115109037e-12. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r7    .4985532    .5326719  -.00643209   .05575592   .58357496           0

       gleason       pgg45       _cons
r7           0   .00221212   .09721991

__000001[1,9]
                                                                           o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa    .4985532    .5326719  -.00643209   .05575592   .58357496           0

               o.
         gleason       pgg45       _cons
lpsa           0   .00221212   .09721991

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.800)
------------------+--------------------------------
           lcavol |       0.5097596      0.5643413
          lweight |       0.5768734      0.6220198
              age |      -0.0128569     -0.0212482
             lbph |       0.0752290      0.0967125
              svi |       0.6158792      0.7616733
              lcp |      -0.0026340     -0.1060509
          gleason |       0.0205120      0.0492279
            pgg45 |       0.0025418      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1760495      0.1815609
------------------+--------------------------------
mreldif=3.58019777098e-10. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r8   .50975955   .57687339  -.01285694     .075229   .61587917  -.00263401

       gleason       pgg45       _cons
r8   .02051204   .00254177   .17604948

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .50975955   .57687339  -.01285694     .075229   .61587917  -.00263401

         gleason       pgg45       _cons
lpsa   .02051204   .00254177   .17604948

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.800)
------------------+--------------------------------
           lcavol |       0.5312829      0.5643413
          lweight |       0.5949240      0.6220198
              age |      -0.0161844     -0.0212482
             lbph |       0.0837554      0.0967125
              svi |       0.6734715      0.7616733
              lcp |      -0.0434256     -0.1060509
          gleason |       0.0320358      0.0492279
            pgg45 |       0.0032957      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1771655      0.1815609
------------------+--------------------------------
mreldif=4.44585468021e-10. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r9   .53128291   .59492397  -.01618444   .08375543   .67347152  -.04342562

       gleason       pgg45       _cons
r9   .03203576   .00329566   .17716555

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .53128291   .59492397  -.01618444   .08375543   .67347152  -.04342562

         gleason       pgg45       _cons
lpsa   .03203576   .00329566   .17716555

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.800)
------------------+--------------------------------
           lcavol |       0.5532167      0.5643413
          lweight |       0.6129857      0.6220198
              age |      -0.0195505     -0.0212482
             lbph |       0.0923708      0.0967125
              svi |       0.7320269      0.7616733
              lcp |      -0.0849806     -0.1060509
          gleason |       0.0435108      0.0492279
            pgg45 |       0.0040660      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1797211      0.1815609
------------------+--------------------------------
mreldif=4.27206771077e-10. tolerance = .01

__000000[1,9]
         lcavol     lweight         age        lbph         svi         lcp
r10   .55321667   .61298571  -.01955047   .09237083   .73202691  -.08498056

        gleason       pgg45       _cons
r10   .04351083   .00406599   .17972113

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .55321667   .61298571  -.01955047   .09237083   .73202691  -.08498056

         gleason       pgg45       _cons
lpsa   .04351083   .00406599   .17972113

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1  150.00000    1     0.11681     18.63445   0.1610  | Added lcavol
      |                                                         | _cons.
     2 |   4   80.00000    2     0.47721    -15.68365   0.4372  | Added svi.
     3 |   5   60.00000    3     0.81144    -27.08016   0.5224  | Added
      |                                                         | lweight.
     4 |   6   30.00000    4     1.32070    -41.40696   0.6076  | Added pgg45.
     5 |   7   10.00000    6     1.65790    -42.34952   0.6470  | Added age
      |                                                         | lbph.
     6 |   8    5.00000    7     1.79442    -40.00945   0.6552  | Added
      |                                                         | gleason.
     7 |   9    3.00000    8     1.95360    -36.79348   0.6601  | Added lcp.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.900)
------------------+--------------------------------
           lcavol |       0.1168080      0.7193204
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.3206949      1.5072975
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r1  .11680803          0          0          0          0          0

      gleason      pgg45      _cons
r1          0          0  2.3206949

__000001[1,9]
                         o.         o.         o.         o.         o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .11680803          0          0          0          0          0

              o.         o.
        gleason      pgg45      _cons
lpsa          0          0  2.3206949

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.900)
------------------+--------------------------------
           lcavol |       0.1920978      0.7193204
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.2190530      1.5072975
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r2  .19209782          0          0          0          0          0

      gleason      pgg45      _cons
r2          0          0   2.219053

__000001[1,9]
                         o.         o.         o.         o.         o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .19209782          0          0          0          0          0

              o.         o.
        gleason      pgg45      _cons
lpsa          0          0   2.219053

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.900)
------------------+--------------------------------
           lcavol |       0.3078005      0.7193204
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.0628532      1.5072975
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r3  .30780051          0          0          0          0          0

      gleason      pgg45      _cons
r3          0          0  2.0628532

__000001[1,9]
                         o.         o.         o.         o.         o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .30780051          0          0          0          0          0

              o.         o.
        gleason      pgg45      _cons
lpsa          0          0  2.0628532

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.900)
------------------+--------------------------------
           lcavol |       0.3667702      0.5925572
              svi |       0.1104371      0.6697460
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.9593345      1.5334325
------------------+--------------------------------
mreldif=4.53847598714e-11. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r4  .36677024          0          0          0  .11043714          0

      gleason      pgg45      _cons
r4          0          0  1.9593345

__000001[1,9]
                         o.         o.         o.                    o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .36677024          0          0          0  .11043714          0

              o.         o.
        gleason      pgg45      _cons
lpsa          0          0  1.9593345

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.900)
------------------+--------------------------------
           lcavol |       0.4065927      0.5258519
          lweight |       0.1588047      0.6617699
              svi |       0.2460381      0.6656665
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.2999237     -0.7771568
------------------+--------------------------------
mreldif=2.77195329435e-12. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r5  .40659273   .1588047          0          0  .24603807          0

      gleason      pgg45      _cons
r5          0          0  1.2999237

__000001[1,9]
                                    o.         o.                    o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .40659273   .1588047          0          0  .24603807          0

              o.         o.
        gleason      pgg45      _cons
lpsa          0          0  1.2999237

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.900)
------------------+--------------------------------
           lcavol |       0.4647115      0.5067548
          lweight |       0.4071305      0.6650921
              svi |       0.4486335      0.6016864
            pgg45 |       0.0002217      0.0029746
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.2710372     -0.8221054
------------------+--------------------------------
mreldif=1.98729611197e-11. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r6  .46471147  .40713053          0          0  .44863355          0

      gleason      pgg45      _cons
r6          0  .00022167  .27103716

__000001[1,9]
                                    o.         o.                    o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .46471147  .40713053          0          0  .44863355          0

              o.
        gleason      pgg45      _cons
lpsa          0  .00022167  .27103716

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.900)
------------------+--------------------------------
           lcavol |       0.4992975      0.5234981
          lweight |       0.5236155      0.6152349
              age |      -0.0050595     -0.0190343
             lbph |       0.0513361      0.0954908
              svi |       0.5765816      0.6358643
            pgg45 |       0.0020069      0.0035248
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.0483824      0.5214696
------------------+--------------------------------
mreldif=4.77124343450e-11. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r7   .49929752   .52361547  -.00505955   .05133606   .57658161           0

       gleason       pgg45       _cons
r7           0   .00200692    .0483824

__000001[1,9]
                                                                           o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .49929752   .52361547  -.00505955   .05133606   .57658161           0

               o.
         gleason       pgg45       _cons
lpsa           0   .00200692    .0483824

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.900)
------------------+--------------------------------
           lcavol |       0.5094681      0.5186256
          lweight |       0.5718488      0.6217574
              age |      -0.0121225     -0.0193045
             lbph |       0.0731007      0.0949255
              svi |       0.6088734      0.6427775
          gleason |       0.0165361      0.0422021
            pgg45 |       0.0024663      0.0027656
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1786606      0.2537330
------------------+--------------------------------
mreldif=8.83083985573e-11. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r8   .50946814   .57184883  -.01212249   .07310073   .60887345           0

       gleason       pgg45       _cons
r8   .01653605   .00246633   .17866059

__000001[1,9]
                                                                           o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .50946814   .57184883  -.01212249   .07310073   .60887345           0


         gleason       pgg45       _cons
lpsa   .01653605   .00246633   .17866059

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.900)
------------------+--------------------------------
           lcavol |       0.5292532      0.5643413
          lweight |       0.5918941      0.6220198
              age |      -0.0156721     -0.0212482
             lbph |       0.0824320      0.0967125
              svi |       0.6643895      0.7616733
              lcp |      -0.0374611     -0.1060509
          gleason |       0.0293108      0.0492279
            pgg45 |       0.0031823      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1825146      0.1815609
------------------+--------------------------------
mreldif=3.72183473891e-10. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r9   .52925323   .59189414  -.01567211   .08243195   .66438951  -.03746109

       gleason       pgg45       _cons
r9   .02931081   .00318226    .1825146

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .52925323   .59189414  -.01567211   .08243195   .66438951  -.03746109

         gleason       pgg45       _cons
lpsa   .02931081   .00318226    .1825146

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.900)
------------------+--------------------------------
           lcavol |       0.5525885      0.5643413
          lweight |       0.6119761      0.6220198
              age |      -0.0193841     -0.0212482
             lbph |       0.0919399      0.0967125
              svi |       0.7291095      0.7616733
              lcp |      -0.0830807     -0.1060509
          gleason |       0.0425952      0.0492279
            pgg45 |       0.0040301      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1816810      0.1815609
------------------+--------------------------------
mreldif=4.93965768723e-10. tolerance = .01

__000000[1,9]
         lcavol     lweight         age        lbph         svi         lcp
r10   .55258846   .61197606   -.0193841   .09193991   .72910953  -.08308071

        gleason       pgg45       _cons
r10   .04259523   .00403012   .18168101

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .55258846   .61197606   -.0193841   .09193991   .72910953  -.08308071

         gleason       pgg45       _cons
lpsa   .04259523   .00403012   .18168101
r; t=1.65 22:18:16

. *
.
. * elastic net with ols
. foreach ai of numlist 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 {
  2. lasso2 $model, l($lambdalist) alpha(`ai') ols
  3. mat A = e(betas)
  4. local j=1
  5. foreach i of numlist $lambdalist {
  6.         mat a = A[`j',1..9]
  7.         lasso2 $model, l(`i') alpha(`ai') ols
  8.         mat b = e(betaAllOLS)
  9.         comparemat a b
 10.         local j=`j'+1
 11. }
 12. }

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1  150.00000    7     2.01030    -54.81377   0.6493  | Added lcavol
      |                                                         | lweight lbph
      |                                                         | svi lcp
      |                                                         | gleason pgg45
      |                                                         | _cons.
     2 |   4   80.00000    8     2.22573    -51.60707   0.6634  | Added age.
     3 |   6   30.00000    7     1.94236    -46.58154   0.6581  | Removed lcp.
     4 |   7   10.00000    8     2.22573    -40.71494   0.6634  | Added lcp.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.100)
------------------+--------------------------------
           lcavol |       0.2672673      0.5445621
          lweight |       0.3713884      0.5462090
             lbph |       0.0240021      0.0713692
              svi |       0.4109869      0.7435010
              lcp |       0.0632201     -0.0804513
          gleason |       0.0479261      0.0208513
            pgg45 |       0.0019577      0.0033600
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.3184239     -0.6442175
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r1   .54456215     .546209           0   .07136924   .74350101  -.08045129

       gleason       pgg45       _cons
r1   .02085131   .00336003  -.64421754

__000001[1,9]
                                       o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .54456215     .546209           0   .07136924   .74350101  -.08045129


         gleason       pgg45       _cons
lpsa   .02085131   .00336003  -.64421754

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.100)
------------------+--------------------------------
           lcavol |       0.2844786      0.5445621
          lweight |       0.3941616      0.5462090
             lbph |       0.0280286      0.0713692
              svi |       0.4338634      0.7435010
              lcp |       0.0613338     -0.0804513
          gleason |       0.0489631      0.0208513
            pgg45 |       0.0020009      0.0033600
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1987959     -0.6442175
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r2   .54456215     .546209           0   .07136924   .74350101  -.08045129

       gleason       pgg45       _cons
r2   .02085131   .00336003  -.64421754

__000001[1,9]
                                       o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .54456215     .546209           0   .07136924   .74350101  -.08045129


         gleason       pgg45       _cons
lpsa   .02085131   .00336003  -.64421754

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.100)
------------------+--------------------------------
           lcavol |       0.3153566      0.5445621
          lweight |       0.4309649      0.5462090
             lbph |       0.0348118      0.0713692
              svi |       0.4732650      0.7435010
              lcp |       0.0555076     -0.0804513
          gleason |       0.0497068      0.0208513
            pgg45 |       0.0020597      0.0033600
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.0068425     -0.6442175
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r3   .54456215     .546209           0   .07136924   .74350101  -.08045129

       gleason       pgg45       _cons
r3   .02085131   .00336003  -.64421754

__000001[1,9]
                                       o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .54456215     .546209           0   .07136924   .74350101  -.08045129


         gleason       pgg45       _cons
lpsa   .02085131   .00336003  -.64421754

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.100)
------------------+--------------------------------
           lcavol |       0.3406997      0.5643413
          lweight |       0.4573479      0.6220198
              age |      -0.0000828     -0.0212482
             lbph |       0.0400380      0.0967125
              svi |       0.5042953      0.7616733
              lcp |       0.0483672     -0.1060509
          gleason |       0.0495093      0.0492279
            pgg45 |       0.0021035      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.1260811      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r4   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
r4   .04922792   .00445751   .18156087

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

         gleason       pgg45       _cons
lpsa   .04922792   .00445751   .18156087

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.100)
------------------+--------------------------------
           lcavol |       0.3733778      0.5643413
          lweight |       0.4942185      0.6220198
              age |      -0.0032851     -0.0212482
             lbph |       0.0490776      0.0967125
              svi |       0.5420292      0.7616733
              lcp |       0.0353586     -0.1060509
          gleason |       0.0520705      0.0492279
            pgg45 |       0.0022691      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.1322223      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r5   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
r5   .04922792   .00445751   .18156087

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

         gleason       pgg45       _cons
lpsa   .04922792   .00445751   .18156087

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.100)
------------------+--------------------------------
           lcavol |       0.4406092      0.5186256
          lweight |       0.5563393      0.6217574
              age |      -0.0099640     -0.0193045
             lbph |       0.0672552      0.0949255
              svi |       0.6158554      0.6427775
          gleason |       0.0549412      0.0422021
            pgg45 |       0.0027225      0.0027656
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.0764529      0.2537330
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r6   .51862565   .62175742  -.01930454   .09492549    .6427775           0

       gleason       pgg45       _cons
r6   .04220206   .00276558   .25373297

__000001[1,9]
                                                                           o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .51862565   .62175742  -.01930454   .09492549    .6427775           0


         gleason       pgg45       _cons
lpsa   .04220206   .00276558   .25373297

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.100)
------------------+--------------------------------
           lcavol |       0.5050524      0.5643413
          lweight |       0.6005836      0.6220198
              age |      -0.0163864     -0.0212482
             lbph |       0.0846536      0.0967125
              svi |       0.6795890      0.7616733
              lcp |      -0.0390389     -0.1060509
          gleason |       0.0523956      0.0492279
            pgg45 |       0.0033160      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.0663339      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r7   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
r7   .04922792   .00445751   .18156087

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

         gleason       pgg45       _cons
lpsa   .04922792   .00445751   .18156087

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.100)
------------------+--------------------------------
           lcavol |       0.5323704      0.5643413
          lweight |       0.6116607      0.6220198
              age |      -0.0186613     -0.0212482
             lbph |       0.0902992      0.0967125
              svi |       0.7171455      0.7616733
              lcp |      -0.0691902     -0.1060509
          gleason |       0.0516644      0.0492279
            pgg45 |       0.0038091      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1133507      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r8   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
r8   .04922792   .00445751   .18156087

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

         gleason       pgg45       _cons
lpsa   .04922792   .00445751   .18156087

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.100)
------------------+--------------------------------
           lcavol |       0.5445260      0.5643413
          lweight |       0.6159159      0.6220198
              age |      -0.0196544     -0.0212482
             lbph |       0.0927615      0.0967125
              svi |       0.7340095      0.7616733
              lcp |      -0.0830163     -0.1060509
          gleason |       0.0509476      0.0492279
            pgg45 |       0.0040464      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1376017      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r9   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
r9   .04922792   .00445751   .18156087

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

         gleason       pgg45       _cons
lpsa   .04922792   .00445751   .18156087

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.100)
------------------+--------------------------------
           lcavol |       0.5575084      0.5643413
          lweight |       0.6200283      0.6220198
              age |      -0.0207021     -0.0212482
             lbph |       0.0953588      0.0967125
              svi |       0.7521117      0.7616733
              lcp |      -0.0980410     -0.1060509
          gleason |       0.0499000      0.0492279
            pgg45 |       0.0043124      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1657807      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
         lcavol     lweight         age        lbph         svi         lcp
r10   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

        gleason       pgg45       _cons
r10   .04922792   .00445751   .18156087

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

         gleason       pgg45       _cons
lpsa   .04922792   .00445751   .18156087

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1  150.00000    6     2.01639    -54.82742   0.6432  | Added lcavol
      |                                                         | lweight svi
      |                                                         | lcp gleason
      |                                                         | pgg45 _cons.
     2 |   2  130.00000    7     2.01030    -53.06035   0.6493  | Added lbph.
     3 |   6   30.00000    7     1.94236    -46.07148   0.6581  | Added age.
      |                                                         | Removed lcp.
     4 |   7   10.00000    8     2.22573    -40.40804   0.6634  | Added lcp.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.200)
------------------+--------------------------------
           lcavol |       0.2650913      0.5378499
          lweight |       0.3138154      0.6620155
              svi |       0.3583752      0.6991923
              lcp |       0.0513694     -0.0813594
          gleason |       0.0122505      0.0322875
            pgg45 |       0.0013628      0.0036868
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.7973703     -1.1240093
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r1   .53784985   .66201545           0           0   .69919229  -.08135944

       gleason       pgg45       _cons
r1   .03228749   .00368679  -1.1240093

__000001[1,9]
                                       o.          o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .53784985   .66201545           0           0   .69919229  -.08135944


         gleason       pgg45       _cons
lpsa   .03228749   .00368679  -1.1240093

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.200)
------------------+--------------------------------
           lcavol |       0.2840904      0.5445621
          lweight |       0.3458734      0.5462090
             lbph |       0.0036427      0.0713692
              svi |       0.3859556      0.7435010
              lcp |       0.0502754     -0.0804513
          gleason |       0.0167260      0.0208513
            pgg45 |       0.0014922      0.0033600
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.6154760     -0.6442175
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r2   .54456215     .546209           0   .07136924   .74350101  -.08045129

       gleason       pgg45       _cons
r2   .02085131   .00336003  -.64421754

__000001[1,9]
                                       o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .54456215     .546209           0   .07136924   .74350101  -.08045129


         gleason       pgg45       _cons
lpsa   .02085131   .00336003  -.64421754

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.200)
------------------+--------------------------------
           lcavol |       0.3176495      0.5445621
          lweight |       0.3927202      0.5462090
             lbph |       0.0147312      0.0713692
              svi |       0.4345309      0.7435010
              lcp |       0.0456348     -0.0804513
          gleason |       0.0226487      0.0208513
            pgg45 |       0.0016781      0.0033600
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.3431790     -0.6442175
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r3   .54456215     .546209           0   .07136924   .74350101  -.08045129

       gleason       pgg45       _cons
r3   .02085131   .00336003  -.64421754

__000001[1,9]
                                       o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .54456215     .546209           0   .07136924   .74350101  -.08045129


         gleason       pgg45       _cons
lpsa   .02085131   .00336003  -.64421754

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.200)
------------------+--------------------------------
           lcavol |       0.3445597      0.5445621
          lweight |       0.4257647      0.5462090
             lbph |       0.0231009      0.0713692
              svi |       0.4723049      0.7435010
              lcp |       0.0392508     -0.0804513
          gleason |       0.0261731      0.0208513
            pgg45 |       0.0018106      0.0033600
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1497416     -0.6442175
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r4   .54456215     .546209           0   .07136924   .74350101  -.08045129

       gleason       pgg45       _cons
r4   .02085131   .00336003  -.64421754

__000001[1,9]
                                       o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .54456215     .546209           0   .07136924   .74350101  -.08045129


         gleason       pgg45       _cons
lpsa   .02085131   .00336003  -.64421754

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.200)
------------------+--------------------------------
           lcavol |       0.3767183      0.5445621
          lweight |       0.4597658      0.5462090
             lbph |       0.0324772      0.0713692
              svi |       0.5164556      0.7435010
              lcp |       0.0284822     -0.0804513
          gleason |       0.0290940      0.0208513
            pgg45 |       0.0019649      0.0033600
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.0529769     -0.6442175
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r5   .54456215     .546209           0   .07136924   .74350101  -.08045129

       gleason       pgg45       _cons
r5   .02085131   .00336003  -.64421754

__000001[1,9]
                                       o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .54456215     .546209           0   .07136924   .74350101  -.08045129


         gleason       pgg45       _cons
lpsa   .02085131   .00336003  -.64421754

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.200)
------------------+--------------------------------
           lcavol |       0.4422907      0.5186256
          lweight |       0.5316341      0.6217574
              age |      -0.0064854     -0.0193045
             lbph |       0.0564157      0.0949255
              svi |       0.5975384      0.6427775
          gleason |       0.0383450      0.0422021
            pgg45 |       0.0024854      0.0027656
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.0883313      0.2537330
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r6   .51862565   .62175742  -.01930454   .09492549    .6427775           0

       gleason       pgg45       _cons
r6   .04220206   .00276558   .25373297

__000001[1,9]
                                                                           o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .51862565   .62175742  -.01930454   .09492549    .6427775           0


         gleason       pgg45       _cons
lpsa   .04220206   .00276558   .25373297

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.200)
------------------+--------------------------------
           lcavol |       0.4992808      0.5643413
          lweight |       0.5910221      0.6220198
              age |      -0.0148419     -0.0212482
             lbph |       0.0805928      0.0967125
              svi |       0.6536565      0.7616733
              lcp |      -0.0219747     -0.1060509
          gleason |       0.0439151      0.0492279
            pgg45 |       0.0029901      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.0844730      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r7   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
r7   .04922792   .00445751   .18156087

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

         gleason       pgg45       _cons
lpsa   .04922792   .00445751   .18156087

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.200)
------------------+--------------------------------
           lcavol |       0.5294057      0.5643413
          lweight |       0.6067575      0.6220198
              age |      -0.0178648     -0.0212482
             lbph |       0.0882190      0.0967125
              svi |       0.7035225      0.7616733
              lcp |      -0.0602810     -0.1060509
          gleason |       0.0472676      0.0492279
            pgg45 |       0.0036398      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1228553      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r8   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
r8   .04922792   .00445751   .18156087

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

         gleason       pgg45       _cons
lpsa   .04922792   .00445751   .18156087

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.200)
------------------+--------------------------------
           lcavol |       0.5427320      0.5643413
          lweight |       0.6129412      0.6220198
              age |      -0.0191707     -0.0212482
             lbph |       0.0915016      0.0967125
              svi |       0.7256731      0.7616733
              lcp |      -0.0775815     -0.1060509
          gleason |       0.0482654      0.0492279
            pgg45 |       0.0039435      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1434553      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r9   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
r9   .04922792   .00445751   .18156087

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

         gleason       pgg45       _cons
lpsa   .04922792   .00445751   .18156087

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.200)
------------------+--------------------------------
           lcavol |       0.5569064      0.5643413
          lweight |       0.6190249      0.6220198
              age |      -0.0205390     -0.0212482
             lbph |       0.0949349      0.0967125
              svi |       0.7492780      0.7616733
              lcp |      -0.0962004     -0.1060509
          gleason |       0.0489895      0.0492279
            pgg45 |       0.0042777      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1677949      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
         lcavol     lweight         age        lbph         svi         lcp
r10   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

        gleason       pgg45       _cons
r10   .04922792   .00445751   .18156087

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

         gleason       pgg45       _cons
lpsa   .04922792   .00445751   .18156087

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1  150.00000    5     1.97831    -55.95476   0.6430  | Added lcavol
      |                                                         | lweight svi
      |                                                         | lcp pgg45
      |                                                         | _cons.
     2 |   4   80.00000    7     2.01030    -49.01718   0.6493  | Added lbph
      |                                                         | gleason.
     3 |   6   30.00000    7     1.94236    -45.53343   0.6581  | Added age.
      |                                                         | Removed lcp.
     4 |   7   10.00000    8     2.22573    -40.09268   0.6634  | Added lcp.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.300)
------------------+--------------------------------
           lcavol |       0.2629010      0.5414486
          lweight |       0.2275776      0.6588810
              svi |       0.3095110      0.6927932
              lcp |       0.0379029     -0.0809111
            pgg45 |       0.0003998      0.0042772
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.2276458     -0.9123991
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r1   .54144863   .65888102           0           0   .69279316  -.08091111

       gleason       pgg45       _cons
r1           0   .00427722   -.9123991

__000001[1,9]
                                       o.          o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .54144863   .65888102           0           0   .69279316  -.08091111

               o.
         gleason       pgg45       _cons
lpsa           0   .00427722   -.9123991

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.300)
------------------+--------------------------------
           lcavol |       0.2842664      0.5414486
          lweight |       0.2720924      0.6588810
              svi |       0.3419449      0.6927932
              lcp |       0.0380423     -0.0809111
            pgg45 |       0.0007055      0.0042772
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.0228101     -0.9123991
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r2   .54144863   .65888102           0           0   .69279316  -.08091111

       gleason       pgg45       _cons
r2           0   .00427722   -.9123991

__000001[1,9]
                                       o.          o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .54144863   .65888102           0           0   .69279316  -.08091111

               o.
         gleason       pgg45       _cons
lpsa           0   .00427722   -.9123991

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.300)
------------------+--------------------------------
           lcavol |       0.3209926      0.5414486
          lweight |       0.3456026      0.6588810
              svi |       0.3955148      0.6927932
              lcp |       0.0349605     -0.0809111
            pgg45 |       0.0012059      0.0042772
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.6821139     -0.9123991
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r3   .54144863   .65888102           0           0   .69279316  -.08091111

       gleason       pgg45       _cons
r3           0   .00427722   -.9123991

__000001[1,9]
                                       o.          o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .54144863   .65888102           0           0   .69279316  -.08091111

               o.
         gleason       pgg45       _cons
lpsa           0   .00427722   -.9123991

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.300)
------------------+--------------------------------
           lcavol |       0.3497214      0.5445621
          lweight |       0.3933840      0.5462090
             lbph |       0.0052270      0.0713692
              svi |       0.4379744      0.7435010
              lcp |       0.0295121     -0.0804513
          gleason |       0.0012396      0.0208513
            pgg45 |       0.0015405      0.0033600
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.4427116     -0.6442175
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r4   .54456215     .546209           0   .07136924   .74350101  -.08045129

       gleason       pgg45       _cons
r4   .02085131   .00336003  -.64421754

__000001[1,9]
                                       o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .54456215     .546209           0   .07136924   .74350101  -.08045129


         gleason       pgg45       _cons
lpsa   .02085131   .00336003  -.64421754

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.300)
------------------+--------------------------------
           lcavol |       0.3829777      0.5445621
          lweight |       0.4347820      0.5462090
             lbph |       0.0185446      0.0713692
              svi |       0.4904274      0.7435010
              lcp |       0.0194609     -0.0804513
          gleason |       0.0087776      0.0208513
            pgg45 |       0.0017926      0.0033600
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1760407     -0.6442175
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r5   .54456215     .546209           0   .07136924   .74350101  -.08045129

       gleason       pgg45       _cons
r5   .02085131   .00336003  -.64421754

__000001[1,9]
                                       o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .54456215     .546209           0   .07136924   .74350101  -.08045129


         gleason       pgg45       _cons
lpsa   .02085131   .00336003  -.64421754

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.300)
------------------+--------------------------------
           lcavol |       0.4442433      0.5186256
          lweight |       0.5059586      0.6217574
              age |      -0.0028508     -0.0193045
             lbph |       0.0451406      0.0949255
              svi |       0.5784570      0.6427775
          gleason |       0.0209219      0.0422021
            pgg45 |       0.0022489      0.0027656
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.1012433      0.2537330
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r6   .51862565   .62175742  -.01930454   .09492549    .6427775           0

       gleason       pgg45       _cons
r6   .04220206   .00276558   .25373297

__000001[1,9]
                                                                           o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .51862565   .62175742  -.01930454   .09492549    .6427775           0


         gleason       pgg45       _cons
lpsa   .04220206   .00276558   .25373297

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.300)
------------------+--------------------------------
           lcavol |       0.4932148      0.5643413
          lweight |       0.5813684      0.6220198
              age |      -0.0132588     -0.0212482
             lbph |       0.0764468      0.0967125
              svi |       0.6267666      0.7616733
              lcp |      -0.0042353     -0.1060509
          gleason |       0.0353515      0.0492279
            pgg45 |       0.0026511      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1020996      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r7   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
r7   .04922792   .00445751   .18156087

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

         gleason       pgg45       _cons
lpsa   .04922792   .00445751   .18156087

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.300)
------------------+--------------------------------
           lcavol |       0.5263580      0.5643413
          lweight |       0.6018314      0.6220198
              age |      -0.0170579     -0.0212482
             lbph |       0.0861156      0.0967125
              svi |       0.6896319      0.7616733
              lcp |      -0.0511827     -0.1060509
          gleason |       0.0428511      0.0492279
            pgg45 |       0.0034669      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1322019      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r8   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
r8   .04922792   .00445751   .18156087

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

         gleason       pgg45       _cons
lpsa   .04922792   .00445751   .18156087

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.300)
------------------+--------------------------------
           lcavol |       0.5409066      0.5643413
          lweight |       0.6099582      0.6220198
              age |      -0.0186832     -0.0212482
             lbph |       0.0902331      0.0967125
              svi |       0.7172358      0.7616733
              lcp |      -0.0720754     -0.1060509
          gleason |       0.0455763      0.0492279
            pgg45 |       0.0038392      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1492474      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r9   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
r9   .04922792   .00445751   .18156087

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

         gleason       pgg45       _cons
lpsa   .04922792   .00445751   .18156087

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.300)
------------------+--------------------------------
           lcavol |       0.5563008      0.5643413
          lweight |       0.6180206      0.6220198
              age |      -0.0203754     -0.0212482
             lbph |       0.0945101      0.0967125
              svi |       0.7464326      0.7616733
              lcp |      -0.0943515     -0.1060509
          gleason |       0.0480782      0.0492279
            pgg45 |       0.0042428      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1698018      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
         lcavol     lweight         age        lbph         svi         lcp
r10   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

        gleason       pgg45       _cons
r10   .04922792   .00445751   .18156087

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

         gleason       pgg45       _cons
lpsa   .04922792   .00445751   .18156087

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1  150.00000    4     1.94082    -55.93377   0.6365  | Added lcavol
      |                                                         | lweight svi
      |                                                         | lcp _cons.
     2 |   3  100.00000    5     1.97831    -53.28935   0.6430  | Added pgg45.
     3 |   5   60.00000    6     1.98576    -49.29530   0.6493  | Added lbph.
     4 |   6   30.00000    6     1.80577    -45.68388   0.6462  | Added
      |                                                         | gleason.
      |                                                         | Removed lcp.
     5 |   7   10.00000    7     1.94236    -42.30125   0.6581  | Added age.
     6 |   8    5.00000    8     2.22573    -38.73726   0.6634  | Added lcp.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.400)
------------------+--------------------------------
           lcavol |       0.2597063      0.5418601
          lweight |       0.1326293      0.6589198
              svi |       0.2509815      0.7099563
              lcp |       0.0178939     -0.0300823
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.5953502     -0.8034092
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r1   .54186011    .6589198           0           0   .70995629  -.03008229

       gleason       pgg45       _cons
r1           0           0  -.80340922

__000001[1,9]
                                       o.          o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .54186011    .6589198           0           0   .70995629  -.03008229

               o.          o.
         gleason       pgg45       _cons
lpsa           0           0  -.80340922

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.400)
------------------+--------------------------------
           lcavol |       0.2841969      0.5418601
          lweight |       0.1879116      0.6589198
              svi |       0.2940350      0.7099563
              lcp |       0.0217765     -0.0300823
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.3530468     -0.8034092
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r2   .54186011    .6589198           0           0   .70995629  -.03008229

       gleason       pgg45       _cons
r2           0           0  -.80340922

__000001[1,9]
                                       o.          o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .54186011    .6589198           0           0   .70995629  -.03008229

               o.          o.
         gleason       pgg45       _cons
lpsa           0           0  -.80340922

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.400)
------------------+--------------------------------
           lcavol |       0.3245636      0.5414486
          lweight |       0.2783259      0.6588810
              svi |       0.3613748      0.6927932
              lcp |       0.0225271     -0.0809111
            pgg45 |       0.0003571      0.0042772
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.9472930     -0.9123991
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r3   .54144863   .65888102           0           0   .69279316  -.08091111

       gleason       pgg45       _cons
r3           0   .00427722   -.9123991

__000001[1,9]
                                       o.          o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .54144863   .65888102           0           0   .69279316  -.08091111

               o.
         gleason       pgg45       _cons
lpsa           0   .00427722   -.9123991

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.400)
------------------+--------------------------------
           lcavol |       0.3547745      0.5414486
          lweight |       0.3442395      0.6588810
              svi |       0.4090443      0.6927932
              lcp |       0.0179382     -0.0809111
            pgg45 |       0.0008864      0.0042772
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.6432628     -0.9123991
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r4   .54144863   .65888102           0           0   .69279316  -.08091111

       gleason       pgg45       _cons
r4           0   .00427722   -.9123991

__000001[1,9]
                                       o.          o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .54144863   .65888102           0           0   .69279316  -.08091111

               o.
         gleason       pgg45       _cons
lpsa           0   .00427722   -.9123991

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.400)
------------------+--------------------------------
           lcavol |       0.3893435      0.5469201
          lweight |       0.4103556      0.5434709
             lbph |       0.0036270      0.0718135
              svi |       0.4638803      0.7396583
              lcp |       0.0090656     -0.0801571
            pgg45 |       0.0014642      0.0037380
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.3287477     -0.5050395
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r5   .54692009   .54347088           0   .07181346   .73965834  -.08015709

       gleason       pgg45       _cons
r5           0     .003738  -.50503951

__000001[1,9]
                                       o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .54692009   .54347088           0   .07181346   .73965834  -.08015709

               o.
         gleason       pgg45       _cons
lpsa           0     .003738  -.50503951

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.400)
------------------+--------------------------------
           lcavol |       0.4468911      0.5105023
          lweight |       0.4825017      0.5513850
             lbph |       0.0344772      0.0717813
              svi |       0.5581976      0.6525584
          gleason |       0.0037420      0.0174147
            pgg45 |       0.0020440      0.0021254
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.0753013     -0.5296341
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r6   .51050227   .55138496           0   .07178131   .65255839           0

       gleason       pgg45       _cons
r6   .01741467   .00212541  -.52963406

__000001[1,9]
                                       o.                                  o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .51050227   .55138496           0   .07178131   .65255839           0


         gleason       pgg45       _cons
lpsa   .01741467   .00212541  -.52963406

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.400)
------------------+--------------------------------
           lcavol |       0.4927792      0.5186256
          lweight |       0.5718474      0.6217574
              age |      -0.0118795     -0.0193045
             lbph |       0.0723928      0.0949255
              svi |       0.6146470      0.6427775
          gleason |       0.0280621      0.0422021
            pgg45 |       0.0025137      0.0027656
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1055094      0.2537330
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r7   .51862565   .62175742  -.01930454   .09492549    .6427775           0

       gleason       pgg45       _cons
r7   .04220206   .00276558   .25373297

__000001[1,9]
                                                                           o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .51862565   .62175742  -.01930454   .09492549    .6427775           0


         gleason       pgg45       _cons
lpsa   .04220206   .00276558   .25373297

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.400)
------------------+--------------------------------
           lcavol |       0.5232242      0.5643413
          lweight |       0.5968828      0.6220198
              age |      -0.0162403     -0.0212482
             lbph |       0.0839884      0.0967125
              svi |       0.6754658      0.7616733
              lcp |      -0.0418893     -0.1060509
          gleason |       0.0384158      0.0492279
            pgg45 |       0.0032901      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1413769      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r8   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
r8   .04922792   .00445751   .18156087

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

         gleason       pgg45       _cons
lpsa   .04922792   .00445751   .18156087

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.400)
------------------+--------------------------------
           lcavol |       0.5390491      0.5643413
          lweight |       0.6069671      0.6220198
              age |      -0.0181916     -0.0212482
             lbph |       0.0889557      0.0967125
              svi |       0.7086959      0.7616733
              lcp |      -0.0664967     -0.1060509
          gleason |       0.0428805      0.0492279
            pgg45 |       0.0037335      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1549747      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r9   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
r9   .04922792   .00445751   .18156087

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

         gleason       pgg45       _cons
lpsa   .04922792   .00445751   .18156087

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.400)
------------------+--------------------------------
           lcavol |       0.5556914      0.5643413
          lweight |       0.6170154      0.6220198
              age |      -0.0202113     -0.0212482
             lbph |       0.0940843      0.0967125
              svi |       0.7435754      0.7616733
              lcp |      -0.0924942     -0.1060509
          gleason |       0.0471662      0.0492279
            pgg45 |       0.0042078      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1718012      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
         lcavol     lweight         age        lbph         svi         lcp
r10   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

        gleason       pgg45       _cons
r10   .04922792   .00445751   .18156087

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

         gleason       pgg45       _cons
lpsa   .04922792   .00445751   .18156087

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1  150.00000    3     1.85329    -57.26369   0.6359  | Added lcavol
      |                                                         | lweight svi
      |                                                         | _cons.
     2 |   3  100.00000    4     1.94082    -53.78654   0.6365  | Added lcp.
     3 |   4   80.00000    5     1.97831    -51.55918   0.6430  | Added pgg45.
     4 |   5   60.00000    4     1.77651    -52.48240   0.6399  | Removed lcp.
     5 |   6   30.00000    5     1.78588    -48.73497   0.6461  | Added lbph.
     6 |   7   10.00000    7     1.94236    -42.04472   0.6581  | Added age
      |                                                         | gleason.
     7 |   8    5.00000    8     2.22573    -38.55618   0.6634  | Added lcp.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.2549167      0.5258519
          lweight |       0.0268516      0.6617699
              svi |       0.1764878      0.6656665
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.9985955     -0.7771568
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r1    .5258519   .66176995           0           0    .6656665           0

       gleason       pgg45       _cons
r1           0           0  -.77715676

__000001[1,9]
                                       o.          o.                      o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa    .5258519   .66176995           0           0    .6656665           0

               o.          o.
         gleason       pgg45       _cons
lpsa           0           0  -.77715676

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.2841548      0.5258519
          lweight |       0.0949696      0.6617699
              svi |       0.2352477      0.6656665
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.6992059     -0.7771568
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r2    .5258519   .66176995           0           0    .6656665           0

       gleason       pgg45       _cons
r2           0           0  -.77715676

__000001[1,9]
                                       o.          o.                      o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa    .5258519   .66176995           0           0    .6656665           0

               o.          o.
         gleason       pgg45       _cons
lpsa           0           0  -.77715676

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.3290858      0.5418601
          lweight |       0.2051364      0.6589198
              svi |       0.3213515      0.7099563
              lcp |       0.0048328     -0.0300823
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.2209855     -0.8034092
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r3   .54186011    .6589198           0           0   .70995629  -.03008229

       gleason       pgg45       _cons
r3           0           0  -.80340922

__000001[1,9]
                                       o.          o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .54186011    .6589198           0           0   .70995629  -.03008229

               o.          o.
         gleason       pgg45       _cons
lpsa           0           0  -.80340922

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.3616710      0.5414486
          lweight |       0.2846361      0.6588810
              svi |       0.3816404      0.6927932
              lcp |       0.0055112     -0.0809111
            pgg45 |       0.0001504      0.0042772
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.8718987     -0.9123991
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r4   .54144863   .65888102           0           0   .69279316  -.08091111

       gleason       pgg45       _cons
r4           0   .00427722   -.9123991

__000001[1,9]
                                       o.          o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .54144863   .65888102           0           0   .69279316  -.08091111

               o.
         gleason       pgg45       _cons
lpsa           0   .00427722   -.9123991

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.3958396      0.5067548
          lweight |       0.3695804      0.6650921
              svi |       0.4404819      0.6016864
            pgg45 |       0.0008990      0.0029746
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.4855319     -0.8221054
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r5   .50675482   .66509213           0           0   .60168637           0

       gleason       pgg45       _cons
r5           0   .00297461  -.82210539

__000001[1,9]
                                       o.          o.                      o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .50675482   .66509213           0           0   .60168637           0

               o.
         gleason       pgg45       _cons
lpsa           0   .00297461  -.82210539

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.4499190      0.5125769
          lweight |       0.4697457      0.5490809
             lbph |       0.0265646      0.0721513
              svi |       0.5369207      0.6496250
            pgg45 |       0.0017593      0.0024450
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.0045115     -0.4136749
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r6   .51257686   .54908093           0   .07215128   .64962503           0

       gleason       pgg45       _cons
r6           0   .00244504  -.41367494

__000001[1,9]
                                       o.                                  o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .51257686   .54908093           0   .07215128   .64962503           0

               o.
         gleason       pgg45       _cons
lpsa           0   .00244504  -.41367494

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.4941626      0.5186256
          lweight |       0.5622500      0.6217574
              age |      -0.0105501     -0.0193045
             lbph |       0.0683305      0.0949255
              svi |       0.6070730      0.6427775
          gleason |       0.0210338      0.0422021
            pgg45 |       0.0024411      0.0027656
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1048456      0.2537330
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r7   .51862565   .62175742  -.01930454   .09492549    .6427775           0

       gleason       pgg45       _cons
r7   .04220206   .00276558   .25373297

__000001[1,9]
                                                                           o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .51862565   .62175742  -.01930454   .09492549    .6427775           0


         gleason       pgg45       _cons
lpsa   .04220206   .00276558   .25373297

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.5200010      0.5643413
          lweight |       0.5919121      0.6220198
              age |      -0.0154116     -0.0212482
             lbph |       0.0818367      0.0967125
              svi |       0.6610160      0.7616733
              lcp |      -0.0323945     -0.1060509
          gleason |       0.0339630      0.0492279
            pgg45 |       0.0031094      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1503654      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r8   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
r8   .04922792   .00445751   .18156087

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

         gleason       pgg45       _cons
lpsa   .04922792   .00445751   .18156087

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.5371588      0.5643413
          lweight |       0.6039680      0.6220198
              age |      -0.0176960     -0.0212482
             lbph |       0.0876694      0.0967125
              svi |       0.7000514      0.7616733
              lcp |      -0.0608438     -0.1060509
          gleason |       0.0401782      0.0492279
            pgg45 |       0.0036263      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1606338      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r9   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
r9   .04922792   .00445751   .18156087

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

         gleason       pgg45       _cons
lpsa   .04922792   .00445751   .18156087

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.5550784      0.5643413
          lweight |       0.6160094      0.6220198
              age |      -0.0200468     -0.0212482
             lbph |       0.0936574      0.0967125
              svi |       0.7407063      0.7616733
              lcp |      -0.0906286     -0.1060509
          gleason |       0.0462534      0.0492279
            pgg45 |       0.0041726      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1737929      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
         lcavol     lweight         age        lbph         svi         lcp
r10   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

        gleason       pgg45       _cons
r10   .04922792   .00445751   .18156087

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

         gleason       pgg45       _cons
lpsa   .04922792   .00445751   .18156087

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1  150.00000    2     1.26230    -46.27481   0.5804  | Added lcavol
      |                                                         | svi _cons.
     2 |   3  100.00000    3     1.85329    -55.70031   0.6359  | Added
      |                                                         | lweight.
     3 |   5   60.00000    4     1.77651    -51.96174   0.6399  | Added pgg45.
     4 |   6   30.00000    5     1.78588    -48.32995   0.6461  | Added lbph.
     5 |   7   10.00000    7     1.94236    -41.78171   0.6581  | Added age
      |                                                         | gleason.
     6 |   8    5.00000    8     2.22573    -38.37225   0.6634  | Added lcp.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.600)
------------------+--------------------------------
           lcavol |       0.2374897      0.5925572
              svi |       0.0672390      0.6697460
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.1432166      1.5334325
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r1  .59255716          0          0          0  .66974596          0

      gleason      pgg45      _cons
r1          0          0  1.5334325

__000001[1,9]
                         o.         o.         o.                    o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .59255716          0          0          0  .66974596          0

              o.         o.
        gleason      pgg45      _cons
lpsa          0          0  1.5334325

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.600)
------------------+--------------------------------
           lcavol |       0.2757126      0.5925572
              svi |       0.1416246      0.6697460
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.0755112      1.5334325
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r2  .59255716          0          0          0  .66974596          0

      gleason      pgg45      _cons
r2          0          0  1.5334325

__000001[1,9]
                         o.         o.         o.                    o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .59255716          0          0          0  .66974596          0

              o.         o.
        gleason      pgg45      _cons
lpsa          0          0  1.5334325

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.600)
------------------+--------------------------------
           lcavol |       0.3273349      0.5258519
          lweight |       0.1253771      0.6617699
              svi |       0.2532906      0.6656665
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.5266593     -0.7771568
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r3    .5258519   .66176995           0           0    .6656665           0

       gleason       pgg45       _cons
r3           0           0  -.77715676

__000001[1,9]
                                       o.          o.                      o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa    .5258519   .66176995           0           0    .6656665           0

               o.          o.
         gleason       pgg45       _cons
lpsa           0           0  -.77715676

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.600)
------------------+--------------------------------
           lcavol |       0.3632987      0.5258519
          lweight |       0.2205992      0.6617699
              svi |       0.3306765      0.6656665
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.1157987     -0.7771568
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r4    .5258519   .66176995           0           0    .6656665           0

       gleason       pgg45       _cons
r4           0           0  -.77715676

__000001[1,9]
                                       o.          o.                      o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa    .5258519   .66176995           0           0    .6656665           0

               o.          o.
         gleason       pgg45       _cons
lpsa           0           0  -.77715676

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.600)
------------------+--------------------------------
           lcavol |       0.4001517      0.5067548
          lweight |       0.3213520      0.6650921
              svi |       0.4079072      0.6016864
            pgg45 |       0.0001380      0.0029746
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.6803354     -0.8221054
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r5   .50675482   .66509213           0           0   .60168637           0

       gleason       pgg45       _cons
r5           0   .00297461  -.82210539

__000001[1,9]
                                       o.          o.                      o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .50675482   .66509213           0           0   .60168637           0

               o.
         gleason       pgg45       _cons
lpsa           0   .00297461  -.82210539

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.600)
------------------+--------------------------------
           lcavol |       0.4528646      0.5125769
          lweight |       0.4573361      0.5490809
             lbph |       0.0183331      0.0721513
              svi |       0.5151046      0.6496250
            pgg45 |       0.0014040      0.0024450
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.0597809     -0.4136749
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r6   .51257686   .54908093           0   .07215128   .64962503           0

       gleason       pgg45       _cons
r6           0   .00244504  -.41367494

__000001[1,9]
                                       o.                                  o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .51257686   .54908093           0   .07215128   .64962503           0

               o.
         gleason       pgg45       _cons
lpsa           0   .00244504  -.41367494

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.600)
------------------+--------------------------------
           lcavol |       0.4956051      0.5186256
          lweight |       0.5524971      0.6217574
              age |      -0.0091982     -0.0193045
             lbph |       0.0642069      0.0949255
              svi |       0.5993467      0.6427775
          gleason |       0.0138383      0.0422021
            pgg45 |       0.0023697      0.0027656
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1043694      0.2537330
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r7   .51862565   .62175742  -.01930454   .09492549    .6427775           0

       gleason       pgg45       _cons
r7   .04220206   .00276558   .25373297

__000001[1,9]
                                                                           o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .51862565   .62175742  -.01930454   .09492549    .6427775           0


         gleason       pgg45       _cons
lpsa   .04220206   .00276558   .25373297

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.600)
------------------+--------------------------------
           lcavol |       0.5166849      0.5643413
          lweight |       0.5869199      0.6220198
              age |      -0.0145717     -0.0212482
             lbph |       0.0796601      0.0967125
              svi |       0.6462742      0.7616733
              lcp |      -0.0226917     -0.1060509
          gleason |       0.0294938      0.0492279
            pgg45 |       0.0029245      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1591518      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r8   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
r8   .04922792   .00445751   .18156087

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

         gleason       pgg45       _cons
lpsa   .04922792   .00445751   .18156087

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.600)
------------------+--------------------------------
           lcavol |       0.5352349      0.5643413
          lweight |       0.6009610      0.6220198
              age |      -0.0171963     -0.0212482
             lbph |       0.0863740      0.0967125
              svi |       0.6913004      0.7616733
              lcp |      -0.0551154     -0.1060509
          gleason |       0.0374698      0.0492279
            pgg45 |       0.0035177      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1662212      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r9   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
r9   .04922792   .00445751   .18156087

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

         gleason       pgg45       _cons
lpsa   .04922792   .00445751   .18156087

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.600)
------------------+--------------------------------
           lcavol |       0.5544616      0.5643413
          lweight |       0.6150024      0.6220198
              age |      -0.0198818     -0.0212482
             lbph |       0.0932296      0.0967125
              svi |       0.7378252      0.7616733
              lcp |      -0.0887544     -0.1060509
          gleason |       0.0453399      0.0492279
            pgg45 |       0.0041372      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1757769      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
         lcavol     lweight         age        lbph         svi         lcp
r10   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

        gleason       pgg45       _cons
r10   .04922792   .00445751   .18156087

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

         gleason       pgg45       _cons
lpsa   .04922792   .00445751   .18156087

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1  150.00000    1     0.71932    -40.07796   0.5394  | Added lcavol
      |                                                         | _cons.
     2 |   2  130.00000    2     1.26230    -45.59019   0.5804  | Added svi.
     3 |   3  100.00000    3     1.85329    -55.13169   0.6359  | Added
      |                                                         | lweight.
     4 |   6   30.00000    5     1.78588    -47.90443   0.6461  | Added lbph
      |                                                         | pgg45.
     5 |   7   10.00000    7     1.94236    -41.51191   0.6581  | Added age
      |                                                         | gleason.
     6 |   8    5.00000    8     2.22573    -38.18541   0.6634  | Added lcp.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.700)
------------------+--------------------------------
           lcavol |       0.2091987      0.7193204
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.1959666      1.5072975
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r1  .71932039          0          0          0          0          0

      gleason      pgg45      _cons
r1          0          0  1.5072975

__000001[1,9]
                         o.         o.         o.         o.         o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .71932039          0          0          0          0          0

              o.         o.
        gleason      pgg45      _cons
lpsa          0          0  1.5072975

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.700)
------------------+--------------------------------
           lcavol |       0.2605663      0.5925572
              svi |       0.0334028      0.6697460
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.1193883      1.5334325
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r2  .59255716          0          0          0  .66974596          0

      gleason      pgg45      _cons
r2          0          0  1.5334325

__000001[1,9]
                         o.         o.         o.                    o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .59255716          0          0          0  .66974596          0

              o.         o.
        gleason      pgg45      _cons
lpsa          0          0  1.5334325

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.700)
------------------+--------------------------------
           lcavol |       0.3249644      0.5258519
          lweight |       0.0384537      0.6617699
              svi |       0.1714581      0.6656665
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.8630157     -0.7771568
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r3    .5258519   .66176995           0           0    .6656665           0

       gleason       pgg45       _cons
r3           0           0  -.77715676

__000001[1,9]
                                       o.          o.                      o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa    .5258519   .66176995           0           0    .6656665           0

               o.          o.
         gleason       pgg45       _cons
lpsa           0           0  -.77715676

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.700)
------------------+--------------------------------
           lcavol |       0.3627543      0.5258519
          lweight |       0.1518351      0.6617699
              svi |       0.2642920      0.6656665
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.3804462     -0.7771568
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r4    .5258519   .66176995           0           0    .6656665           0

       gleason       pgg45       _cons
r4           0           0  -.77715676

__000001[1,9]
                                       o.          o.                      o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa    .5258519   .66176995           0           0    .6656665           0

               o.          o.
         gleason       pgg45       _cons
lpsa           0           0  -.77715676

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.700)
------------------+--------------------------------
           lcavol |       0.4017014      0.5258519
          lweight |       0.2704236      0.6617699
              svi |       0.3599900      0.6656665
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.8767984     -0.7771568
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r5    .5258519   .66176995           0           0    .6656665           0

       gleason       pgg45       _cons
r5           0           0  -.77715676

__000001[1,9]
                                       o.          o.                      o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa    .5258519   .66176995           0           0    .6656665           0

               o.          o.
         gleason       pgg45       _cons
lpsa           0           0  -.77715676

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.700)
------------------+--------------------------------
           lcavol |       0.4561836      0.5125769
          lweight |       0.4448450      0.5490809
             lbph |       0.0098522      0.0721513
              svi |       0.4923263      0.6496250
            pgg45 |       0.0010389      0.0024450
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1153119     -0.4136749
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r6   .51257686   .54908093           0   .07215128   .64962503           0

       gleason       pgg45       _cons
r6           0   .00244504  -.41367494

__000001[1,9]
                                       o.                                  o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .51257686   .54908093           0   .07215128   .64962503           0

               o.
         gleason       pgg45       _cons
lpsa           0   .00244504  -.41367494

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.700)
------------------+--------------------------------
           lcavol |       0.4971093      0.5186256
          lweight |       0.5425838      0.6217574
              age |      -0.0078234     -0.0193045
             lbph |       0.0600208      0.0949255
              svi |       0.5914607      0.6427775
          gleason |       0.0064666      0.0422021
            pgg45 |       0.0022998      0.0027656
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1041173      0.2537330
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r7   .51862565   .62175742  -.01930454   .09492549    .6427775           0

       gleason       pgg45       _cons
r7   .04220206   .00276558   .25373297

__000001[1,9]
                                                                           o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .51862565   .62175742  -.01930454   .09492549    .6427775           0


         gleason       pgg45       _cons
lpsa   .04220206   .00276558   .25373297

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.700)
------------------+--------------------------------
           lcavol |       0.5132724      0.5643413
          lweight |       0.5819068      0.6220198
              age |      -0.0137202     -0.0212482
             lbph |       0.0774577      0.0967125
              svi |       0.6312317      0.7616733
              lcp |      -0.0127740     -0.1060509
          gleason |       0.0250097      0.0492279
            pgg45 |       0.0027354      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1677192      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r8   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
r8   .04922792   .00445751   .18156087

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

         gleason       pgg45       _cons
lpsa   .04922792   .00445751   .18156087

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.700)
------------------+--------------------------------
           lcavol |       0.5332765      0.5643413
          lweight |       0.5979463      0.6220198
              age |      -0.0166925     -0.0212482
             lbph |       0.0850694      0.0967125
              svi |       0.6824412      0.7616733
              lcp |      -0.0493099     -0.1060509
          gleason |       0.0347555      0.0492279
            pgg45 |       0.0034074      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1717330      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r9   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
r9   .04922792   .00445751   .18156087

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

         gleason       pgg45       _cons
lpsa   .04922792   .00445751   .18156087

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.700)
------------------+--------------------------------
           lcavol |       0.5538410      0.5643413
          lweight |       0.6139945      0.6220198
              age |      -0.0197164     -0.0212482
             lbph |       0.0928007      0.0967125
              svi |       0.7349321      0.7616733
              lcp |      -0.0868718     -0.1060509
          gleason |       0.0444257      0.0492279
            pgg45 |       0.0041017      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1777531      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
         lcavol     lweight         age        lbph         svi         lcp
r10   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

        gleason       pgg45       _cons
r10   .04922792   .00445751   .18156087

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

         gleason       pgg45       _cons
lpsa   .04922792   .00445751   .18156087

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1  150.00000    1     0.71932    -39.82930   0.5394  | Added lcavol
      |                                                         | _cons.
     2 |   3  100.00000    2     1.26230    -44.79587   0.5804  | Added svi.
     3 |   4   80.00000    3     1.85329    -54.20250   0.6359  | Added
      |                                                         | lweight.
     4 |   6   30.00000    5     1.78588    -47.45659   0.6461  | Added lbph
      |                                                         | pgg45.
     5 |   7   10.00000    6     1.89265    -45.55761   0.6578  | Added age.
     6 |   8    5.00000    8     2.22573    -37.99556   0.6634  | Added lcp
      |                                                         | gleason.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.800)
------------------+--------------------------------
           lcavol |       0.1660968      0.7193204
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.2541546      1.5072975
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r1  .71932039          0          0          0          0          0

      gleason      pgg45      _cons
r1          0          0  1.5072975

__000001[1,9]
                         o.         o.         o.         o.         o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .71932039          0          0          0          0          0

              o.         o.
        gleason      pgg45      _cons
lpsa          0          0  1.5072975

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.800)
------------------+--------------------------------
           lcavol |       0.2311425      0.7193204
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.1663423      1.5072975
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r2  .71932039          0          0          0          0          0

      gleason      pgg45      _cons
r2          0          0  1.5072975

__000001[1,9]
                         o.         o.         o.         o.         o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .71932039          0          0          0          0          0

              o.         o.
        gleason      pgg45      _cons
lpsa          0          0  1.5072975

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.800)
------------------+--------------------------------
           lcavol |       0.3197343      0.5925572
              svi |       0.0788894      0.6697460
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.0296633      1.5334325
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r3  .59255716          0          0          0  .66974596          0

      gleason      pgg45      _cons
r3          0          0  1.5334325

__000001[1,9]
                         o.         o.         o.                    o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .59255716          0          0          0  .66974596          0

              o.         o.
        gleason      pgg45      _cons
lpsa          0          0  1.5334325

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.800)
------------------+--------------------------------
           lcavol |       0.3638282      0.5258519
          lweight |       0.0775849      0.6617699
              svi |       0.1913713      0.6656665
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.6642333     -0.7771568
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r4    .5258519   .66176995           0           0    .6656665           0

       gleason       pgg45       _cons
r4           0           0  -.77715676

__000001[1,9]
                                       o.          o.                      o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa    .5258519   .66176995           0           0    .6656665           0

               o.          o.
         gleason       pgg45       _cons
lpsa           0           0  -.77715676

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.800)
------------------+--------------------------------
           lcavol |       0.4034879      0.5258519
          lweight |       0.2163874      0.6617699
              svi |       0.3053574      0.6656665
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.0823086     -0.7771568
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r5    .5258519   .66176995           0           0    .6656665           0

       gleason       pgg45       _cons
r5           0           0  -.77715676

__000001[1,9]
                                       o.          o.                      o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa    .5258519   .66176995           0           0    .6656665           0

               o.          o.
         gleason       pgg45       _cons
lpsa           0           0  -.77715676

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.800)
------------------+--------------------------------
           lcavol |       0.4599140      0.5125769
          lweight |       0.4322772      0.5490809
             lbph |       0.0011077      0.0721513
              svi |       0.4684949      0.6496250
            pgg45 |       0.0006637      0.0024450
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1710684     -0.4136749
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r6   .51257686   .54908093           0   .07215128   .64962503           0

       gleason       pgg45       _cons
r6           0   .00244504  -.41367494

__000001[1,9]
                                       o.                                  o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .51257686   .54908093           0   .07215128   .64962503           0

               o.
         gleason       pgg45       _cons
lpsa           0   .00244504  -.41367494

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.800)
------------------+--------------------------------
           lcavol |       0.4985532      0.5234981
          lweight |       0.5326719      0.6152349
              age |      -0.0064321     -0.0190343
             lbph |       0.0557559      0.0954908
              svi |       0.5835750      0.6358643
            pgg45 |       0.0022121      0.0035248
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.0972199      0.5214696
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r7    .5234981   .61523487  -.01903435   .09549075   .63586426           0

       gleason       pgg45       _cons
r7           0   .00352484   .52146955

__000001[1,9]
                                                                           o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa    .5234981   .61523487  -.01903435   .09549075   .63586426           0

               o.
         gleason       pgg45       _cons
lpsa           0   .00352484   .52146955

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.800)
------------------+--------------------------------
           lcavol |       0.5097596      0.5643413
          lweight |       0.5768734      0.6220198
              age |      -0.0128569     -0.0212482
             lbph |       0.0752290      0.0967125
              svi |       0.6158792      0.7616733
              lcp |      -0.0026340     -0.1060509
          gleason |       0.0205120      0.0492279
            pgg45 |       0.0025418      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1760495      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r8   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
r8   .04922792   .00445751   .18156087

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

         gleason       pgg45       _cons
lpsa   .04922792   .00445751   .18156087

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.800)
------------------+--------------------------------
           lcavol |       0.5312829      0.5643413
          lweight |       0.5949240      0.6220198
              age |      -0.0161844     -0.0212482
             lbph |       0.0837554      0.0967125
              svi |       0.6734715      0.7616733
              lcp |      -0.0434256     -0.1060509
          gleason |       0.0320358      0.0492279
            pgg45 |       0.0032957      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1771655      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r9   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
r9   .04922792   .00445751   .18156087

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

         gleason       pgg45       _cons
lpsa   .04922792   .00445751   .18156087

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.800)
------------------+--------------------------------
           lcavol |       0.5532167      0.5643413
          lweight |       0.6129857      0.6220198
              age |      -0.0195505     -0.0212482
             lbph |       0.0923708      0.0967125
              svi |       0.7320269      0.7616733
              lcp |      -0.0849806     -0.1060509
          gleason |       0.0435108      0.0492279
            pgg45 |       0.0040660      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1797211      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
         lcavol     lweight         age        lbph         svi         lcp
r10   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

        gleason       pgg45       _cons
r10   .04922792   .00445751   .18156087

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

         gleason       pgg45       _cons
lpsa   .04922792   .00445751   .18156087

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1  150.00000    1     0.71932    -39.54494   0.5394  | Added lcavol
      |                                                         | _cons.
     2 |   4   80.00000    2     1.26230    -44.16768   0.5804  | Added svi.
     3 |   5   60.00000    3     1.85329    -53.41499   0.6359  | Added
      |                                                         | lweight.
     4 |   6   30.00000    4     1.77651    -49.73624   0.6399  | Added pgg45.
     5 |   7   10.00000    6     1.89265    -45.35705   0.6578  | Added age
      |                                                         | lbph.
     6 |   8    5.00000    7     1.94236    -40.80538   0.6581  | Added
      |                                                         | gleason.
     7 |   9    3.00000    8     2.22573    -37.72454   0.6634  | Added lcp.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.900)
------------------+--------------------------------
           lcavol |       0.1168080      0.7193204
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.3206949      1.5072975
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r1  .71932039          0          0          0          0          0

      gleason      pgg45      _cons
r1          0          0  1.5072975

__000001[1,9]
                         o.         o.         o.         o.         o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .71932039          0          0          0          0          0

              o.         o.
        gleason      pgg45      _cons
lpsa          0          0  1.5072975

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.900)
------------------+--------------------------------
           lcavol |       0.1920978      0.7193204
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.2190530      1.5072975
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r2  .71932039          0          0          0          0          0

      gleason      pgg45      _cons
r2          0          0  1.5072975

__000001[1,9]
                         o.         o.         o.         o.         o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .71932039          0          0          0          0          0

              o.         o.
        gleason      pgg45      _cons
lpsa          0          0  1.5072975

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.900)
------------------+--------------------------------
           lcavol |       0.3078005      0.7193204
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.0628532      1.5072975
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r3  .71932039          0          0          0          0          0

      gleason      pgg45      _cons
r3          0          0  1.5072975

__000001[1,9]
                         o.         o.         o.         o.         o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .71932039          0          0          0          0          0

              o.         o.
        gleason      pgg45      _cons
lpsa          0          0  1.5072975

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.900)
------------------+--------------------------------
           lcavol |       0.3667702      0.5925572
              svi |       0.1104371      0.6697460
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.9593345      1.5334325
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
       lcavol    lweight        age       lbph        svi        lcp
r4  .59255716          0          0          0  .66974596          0

      gleason      pgg45      _cons
r4          0          0  1.5334325

__000001[1,9]
                         o.         o.         o.                    o.
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .59255716          0          0          0  .66974596          0

              o.         o.
        gleason      pgg45      _cons
lpsa          0          0  1.5334325

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.900)
------------------+--------------------------------
           lcavol |       0.4065927      0.5258519
          lweight |       0.1588047      0.6617699
              svi |       0.2460381      0.6656665
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.2999237     -0.7771568
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r5    .5258519   .66176995           0           0    .6656665           0

       gleason       pgg45       _cons
r5           0           0  -.77715676

__000001[1,9]
                                       o.          o.                      o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa    .5258519   .66176995           0           0    .6656665           0

               o.          o.
         gleason       pgg45       _cons
lpsa           0           0  -.77715676

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.900)
------------------+--------------------------------
           lcavol |       0.4647115      0.5067548
          lweight |       0.4071305      0.6650921
              svi |       0.4486335      0.6016864
            pgg45 |       0.0002217      0.0029746
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.2710372     -0.8221054
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r6   .50675482   .66509213           0           0   .60168637           0

       gleason       pgg45       _cons
r6           0   .00297461  -.82210539

__000001[1,9]
                                       o.          o.                      o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .50675482   .66509213           0           0   .60168637           0

               o.
         gleason       pgg45       _cons
lpsa           0   .00297461  -.82210539

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.900)
------------------+--------------------------------
           lcavol |       0.4992975      0.5234981
          lweight |       0.5236155      0.6152349
              age |      -0.0050595     -0.0190343
             lbph |       0.0513361      0.0954908
              svi |       0.5765816      0.6358643
            pgg45 |       0.0020069      0.0035248
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.0483824      0.5214696
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r7    .5234981   .61523487  -.01903435   .09549075   .63586426           0

       gleason       pgg45       _cons
r7           0   .00352484   .52146955

__000001[1,9]
                                                                           o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa    .5234981   .61523487  -.01903435   .09549075   .63586426           0

               o.
         gleason       pgg45       _cons
lpsa           0   .00352484   .52146955

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.900)
------------------+--------------------------------
           lcavol |       0.5094681      0.5186256
          lweight |       0.5718488      0.6217574
              age |      -0.0121225     -0.0193045
             lbph |       0.0731007      0.0949255
              svi |       0.6088734      0.6427775
          gleason |       0.0165361      0.0422021
            pgg45 |       0.0024663      0.0027656
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1786606      0.2537330
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r8   .51862565   .62175742  -.01930454   .09492549    .6427775           0

       gleason       pgg45       _cons
r8   .04220206   .00276558   .25373297

__000001[1,9]
                                                                           o.
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .51862565   .62175742  -.01930454   .09492549    .6427775           0


         gleason       pgg45       _cons
lpsa   .04220206   .00276558   .25373297

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.900)
------------------+--------------------------------
           lcavol |       0.5292532      0.5643413
          lweight |       0.5918941      0.6220198
              age |      -0.0156721     -0.0212482
             lbph |       0.0824320      0.0967125
              svi |       0.6643895      0.7616733
              lcp |      -0.0374611     -0.1060509
          gleason |       0.0293108      0.0492279
            pgg45 |       0.0031823      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1825146      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
r9   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
r9   .04922792   .00445751   .18156087

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

         gleason       pgg45       _cons
lpsa   .04922792   .00445751   .18156087

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.900)
------------------+--------------------------------
           lcavol |       0.5525885      0.5643413
          lweight |       0.6119761      0.6220198
              age |      -0.0193841     -0.0212482
             lbph |       0.0919399      0.0967125
              svi |       0.7291095      0.7616733
              lcp |      -0.0830807     -0.1060509
          gleason |       0.0425952      0.0492279
            pgg45 |       0.0040301      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1816810      0.1815609
------------------+--------------------------------
mreldif=0. tolerance = .01

__000000[1,9]
         lcavol     lweight         age        lbph         svi         lcp
r10   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

        gleason       pgg45       _cons
r10   .04922792   .00445751   .18156087

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

         gleason       pgg45       _cons
lpsa   .04922792   .00445751   .18156087
r; t=1.81 22:18:18

. *
.
.
. ********************************************************************************
. *** pre-estimation standardisation vs std on the fly                                             ***
. ********************************************************************************
.
. // lasso
. // standardisation using penalty loadings (default)
. lasso2 $model, l(10)

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5000819      0.5234981
          lweight |       0.5144276      0.6152349
              age |      -0.0036627     -0.0190343
             lbph |       0.0468469      0.0954908
              svi |       0.5695171      0.6358643
            pgg45 |       0.0017981      0.0035248
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.0014767      0.5214696
------------------+--------------------------------
r; t=0.02 22:18:18

. mat A = e(beta)
r; t=0.00 22:18:18

. // pre-estimation standardisation of data
. lasso2 $model, l(10) prestd

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5000819      0.5234981
          lweight |       0.5144276      0.6152349
              age |      -0.0036627     -0.0190343
             lbph |       0.0468469      0.0954908
              svi |       0.5695171      0.6358643
            pgg45 |       0.0017981      0.0035248
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.0014767      0.5214696
------------------+--------------------------------
r; t=0.04 22:18:18

. mat B = e(beta)
r; t=0.00 22:18:18

. comparemat A B , tol(10e-6)
mreldif=2.18252874506e-16. tolerance = .00001

__000000[1,7]
          lcavol     lweight         age        lbph         svi       pgg45
lpsa   .50008192    .5144276  -.00366265   .04684694   .56951709   .00179809

           _cons
lpsa  -.00147665

__000001[1,7]
          lcavol     lweight         age        lbph         svi       pgg45
lpsa   .50008192    .5144276  -.00366265   .04684694   .56951709   .00179809

           _cons
lpsa  -.00147665
r; t=0.00 22:18:18

.
. // lasso [nocons]
. // standardisation using penalty loadings (default)
. lasso2 $model, l(10)  nocons

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5001030      0.5160584
          lweight |       0.5142093      0.6923228
              age |      -0.0036739     -0.0150717
             lbph |       0.0468951      0.0784921
              svi |       0.5695416      0.6272147
            pgg45 |       0.0017982      0.0034776
------------------+--------------------------------
r; t=0.04 22:18:18

. mat A = e(beta)
r; t=0.00 22:18:18

. // pre-estimation standardisation of data
. lasso2 $model, l(10) prestd nocons

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5001030      0.5160584
          lweight |       0.5142093      0.6923228
              age |      -0.0036739     -0.0150717
             lbph |       0.0468951      0.0784921
              svi |       0.5695416      0.6272147
            pgg45 |       0.0017982      0.0034776
------------------+--------------------------------
r; t=0.03 22:18:18

. mat B = e(beta)
r; t=0.00 22:18:18

. comparemat A B , tol(10e-6)
mreldif=1.06103244263e-15. tolerance = .00001

__000000[1,6]
          lcavol     lweight         age        lbph         svi       pgg45
lpsa   .50010299   .51420931  -.00367387   .04689508   .56954158   .00179822

__000001[1,6]
          lcavol     lweight         age        lbph         svi       pgg45
lpsa   .50010299   .51420931  -.00367387   .04689508   .56954158   .00179822
r; t=0.00 22:18:18

.
. // sqrt lasso
. // standardisation using penalty loadings (default)
. lasso2 $model, l(10) sqrt

------------------+--------------------------------
         Selected |      Sqrt-lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.4923489      0.5125769
          lweight |       0.4834171      0.5490809
             lbph |       0.0308604      0.0721513
              svi |       0.5422799      0.6496250
            pgg45 |       0.0012605      0.0024450
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.0918135     -0.4136749
------------------+--------------------------------
r; t=0.02 22:18:18

. mat A = e(beta)
r; t=0.00 22:18:18

. // pre-estimation standardisation of data
. lasso2 $model, l(10) sqrt prestd

------------------+--------------------------------
         Selected |      Sqrt-lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.4923489      0.5125769
          lweight |       0.4834171      0.5490809
             lbph |       0.0308604      0.0721513
              svi |       0.5422799      0.6496250
            pgg45 |       0.0012605      0.0024450
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.0918135     -0.4136749
------------------+--------------------------------
r; t=0.03 22:18:18

. mat B = e(beta)
r; t=0.00 22:18:18

. comparemat A B , tol(10e-6)
mreldif=3.37594188305e-12. tolerance = .00001

__000000[1,6]
          lcavol     lweight        lbph         svi       pgg45       _cons
lpsa   .49234893   .48341712   .03086044   .54227991   .00126054  -.09181347

__000001[1,6]
          lcavol     lweight        lbph         svi       pgg45       _cons
lpsa   .49234893   .48341712   .03086044   .54227991   .00126054  -.09181347
r; t=0.00 22:18:18

.
. // sqrt lasso [nocons]
. // standardisation using penalty loadings (default)
. lasso2 $model, l(10) sqrt nocons

------------------+--------------------------------
         Selected |      Sqrt-lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.4937813      0.5191166
          lweight |       0.4579070      0.4340615
             lbph |       0.0342311      0.0875188
              svi |       0.5454255      0.6642009
            pgg45 |       0.0012099      0.0022203
------------------+--------------------------------
r; t=0.06 22:18:18

. mat A = e(beta)
r; t=0.00 22:18:18

. // pre-estimation standardisation of data
. lasso2 $model, l(10) sqrt prestd nocons

------------------+--------------------------------
         Selected |      Sqrt-lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.4937813      0.5191166
          lweight |       0.4579070      0.4340615
             lbph |       0.0342311      0.0875188
              svi |       0.5454255      0.6642009
            pgg45 |       0.0012099      0.0022203
------------------+--------------------------------
r; t=0.06 22:18:18

. mat B = e(beta)
r; t=0.00 22:18:18

. comparemat A B , tol(10e-6)
mreldif=1.93614128357e-12. tolerance = .00001

__000000[1,5]
         lcavol    lweight       lbph        svi      pgg45
lpsa   .4937813  .45790698  .03423105  .54542548  .00120989

__000001[1,5]
         lcavol    lweight       lbph        svi      pgg45
lpsa   .4937813  .45790698  .03423105  .54542548  .00120989
r; t=0.00 22:18:18

.
. // elastic net
. foreach lam of numlist 1 10 50 150 160 {
  2. foreach ai of numlist 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 {
  3.         // in original units
.         // standardisation using penalty loadings (default)
.         lasso2 $model, l(`lam')  alpha(`ai')
  4.         mat A = e(beta)
  5.
.         // pre-estimation standardisation of data
.         lasso2 $model, l(`lam') prestd alpha(`ai')
  6.         mat B = e(beta)
  7.         comparemat A B , tol(10e-6)
  8. }
  9. }

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.100)
------------------+--------------------------------
           lcavol |       0.5575084      0.5643413
          lweight |       0.6200283      0.6220198
              age |      -0.0207021     -0.0212482
             lbph |       0.0953588      0.0967125
              svi |       0.7521117      0.7616733
              lcp |      -0.0980410     -0.1060509
          gleason |       0.0499000      0.0492279
            pgg45 |       0.0043124      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1657807      0.1815609
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.100)
------------------+--------------------------------
           lcavol |       0.5575084      0.5643413
          lweight |       0.6200283      0.6220198
              age |      -0.0207021     -0.0212482
             lbph |       0.0953588      0.0967125
              svi |       0.7521117      0.7616733
              lcp |      -0.0980410     -0.1060509
          gleason |       0.0499000      0.0492279
            pgg45 |       0.0043124      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1657807      0.1815609
------------------+--------------------------------
mreldif=8.57108647517e-16. tolerance = .00001

__000000[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .55750841   .62002831  -.02070213   .09535875   .75211166  -.09804101

         gleason       pgg45       _cons
lpsa   .04990004   .00431238    .1657807

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .55750841   .62002831  -.02070213   .09535875   .75211166  -.09804101

         gleason       pgg45       _cons
lpsa   .04990004   .00431238    .1657807

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.200)
------------------+--------------------------------
           lcavol |       0.5569064      0.5643413
          lweight |       0.6190249      0.6220198
              age |      -0.0205390     -0.0212482
             lbph |       0.0949349      0.0967125
              svi |       0.7492780      0.7616733
              lcp |      -0.0962004     -0.1060509
          gleason |       0.0489895      0.0492279
            pgg45 |       0.0042777      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1677949      0.1815609
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.200)
------------------+--------------------------------
           lcavol |       0.5569064      0.5643413
          lweight |       0.6190249      0.6220198
              age |      -0.0205390     -0.0212482
             lbph |       0.0949349      0.0967125
              svi |       0.7492780      0.7616733
              lcp |      -0.0962004     -0.1060509
          gleason |       0.0489895      0.0492279
            pgg45 |       0.0042777      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1677949      0.1815609
------------------+--------------------------------
mreldif=2.16284326676e-15. tolerance = .00001

__000000[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .55690642   .61902493  -.02053897   .09493493   .74927799  -.09620039

         gleason       pgg45       _cons
lpsa   .04898951   .00427768   .16779492

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .55690642   .61902493  -.02053897   .09493493   .74927799  -.09620039

         gleason       pgg45       _cons
lpsa   .04898951   .00427768   .16779492

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.300)
------------------+--------------------------------
           lcavol |       0.5563008      0.5643413
          lweight |       0.6180206      0.6220198
              age |      -0.0203754     -0.0212482
             lbph |       0.0945101      0.0967125
              svi |       0.7464326      0.7616733
              lcp |      -0.0943515     -0.1060509
          gleason |       0.0480782      0.0492279
            pgg45 |       0.0042428      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1698018      0.1815609
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.300)
------------------+--------------------------------
           lcavol |       0.5563008      0.5643413
          lweight |       0.6180206      0.6220198
              age |      -0.0203754     -0.0212482
             lbph |       0.0945101      0.0967125
              svi |       0.7464326      0.7616733
              lcp |      -0.0943515     -0.1060509
          gleason |       0.0480782      0.0492279
            pgg45 |       0.0042428      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1698018      0.1815609
------------------+--------------------------------
mreldif=1.35242382490e-15. tolerance = .00001

__000000[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .55630077   .61802064  -.02037536    .0945101   .74643258  -.09435148

         gleason       pgg45       _cons
lpsa   .04807823   .00424281   .16980179

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .55630077   .61802064  -.02037536    .0945101   .74643258  -.09435148

         gleason       pgg45       _cons
lpsa   .04807823   .00424281   .16980179

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.400)
------------------+--------------------------------
           lcavol |       0.5556914      0.5643413
          lweight |       0.6170154      0.6220198
              age |      -0.0202113     -0.0212482
             lbph |       0.0940843      0.0967125
              svi |       0.7435754      0.7616733
              lcp |      -0.0924942     -0.1060509
          gleason |       0.0471662      0.0492279
            pgg45 |       0.0042078      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1718012      0.1815609
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.400)
------------------+--------------------------------
           lcavol |       0.5556914      0.5643413
          lweight |       0.6170154      0.6220198
              age |      -0.0202113     -0.0212482
             lbph |       0.0940843      0.0967125
              svi |       0.7435754      0.7616733
              lcp |      -0.0924942     -0.1060509
          gleason |       0.0471662      0.0492279
            pgg45 |       0.0042078      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1718012      0.1815609
------------------+--------------------------------
mreldif=2.06070375337e-15. tolerance = .00001

__000000[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .55569144   .61701545   -.0202113   .09408428   .74357536  -.09249422

         gleason       pgg45       _cons
lpsa    .0471662   .00420778   .17180117

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .55569144   .61701545   -.0202113   .09408428   .74357536  -.09249422

         gleason       pgg45       _cons
lpsa    .0471662   .00420778   .17180117

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.5550784      0.5643413
          lweight |       0.6160094      0.6220198
              age |      -0.0200468     -0.0212482
             lbph |       0.0936574      0.0967125
              svi |       0.7407063      0.7616733
              lcp |      -0.0906286     -0.1060509
          gleason |       0.0462534      0.0492279
            pgg45 |       0.0041726      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1737929      0.1815609
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.5550784      0.5643413
          lweight |       0.6160094      0.6220198
              age |      -0.0200468     -0.0212482
             lbph |       0.0936574      0.0967125
              svi |       0.7407063      0.7616733
              lcp |      -0.0906286     -0.1060509
          gleason |       0.0462534      0.0492279
            pgg45 |       0.0041726      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1737929      0.1815609
------------------+--------------------------------
mreldif=1.22959500099e-15. tolerance = .00001

__000000[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa    .5550784   .61600935  -.02004678   .09365744   .74070625  -.09062855

         gleason       pgg45       _cons
lpsa   .04625343   .00417259   .17379294

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa    .5550784   .61600935  -.02004678   .09365744   .74070625  -.09062855

         gleason       pgg45       _cons
lpsa   .04625343   .00417259   .17379294

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.600)
------------------+--------------------------------
           lcavol |       0.5544616      0.5643413
          lweight |       0.6150024      0.6220198
              age |      -0.0198818     -0.0212482
             lbph |       0.0932296      0.0967125
              svi |       0.7378252      0.7616733
              lcp |      -0.0887544     -0.1060509
          gleason |       0.0453399      0.0492279
            pgg45 |       0.0041372      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1757769      0.1815609
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.600)
------------------+--------------------------------
           lcavol |       0.5544616      0.5643413
          lweight |       0.6150024      0.6220198
              age |      -0.0198818     -0.0212482
             lbph |       0.0932296      0.0967125
              svi |       0.7378252      0.7616733
              lcp |      -0.0887544     -0.1060509
          gleason |       0.0453399      0.0492279
            pgg45 |       0.0041372      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1757769      0.1815609
------------------+--------------------------------
mreldif=1.88849258486e-15. tolerance = .00001

__000000[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .55446161   .61500236   -.0198818   .09322959   .73782519  -.08875443

         gleason       pgg45       _cons
lpsa   .04533994   .00413722   .17577695

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .55446161   .61500236   -.0198818   .09322959   .73782519  -.08875443

         gleason       pgg45       _cons
lpsa   .04533994   .00413722   .17577695

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.700)
------------------+--------------------------------
           lcavol |       0.5538410      0.5643413
          lweight |       0.6139945      0.6220198
              age |      -0.0197164     -0.0212482
             lbph |       0.0928007      0.0967125
              svi |       0.7349321      0.7616733
              lcp |      -0.0868718     -0.1060509
          gleason |       0.0444257      0.0492279
            pgg45 |       0.0041017      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1777531      0.1815609
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.700)
------------------+--------------------------------
           lcavol |       0.5538410      0.5643413
          lweight |       0.6139945      0.6220198
              age |      -0.0197164     -0.0212482
             lbph |       0.0928007      0.0967125
              svi |       0.7349321      0.7616733
              lcp |      -0.0868718     -0.1060509
          gleason |       0.0444257      0.0492279
            pgg45 |       0.0041017      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1777531      0.1815609
------------------+--------------------------------
mreldif=7.30563030719e-16. tolerance = .00001

__000000[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .55384104   .61399448  -.01971636   .09280073    .7349321  -.08687178

         gleason       pgg45       _cons
lpsa   .04442573   .00410169   .17775306

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .55384104   .61399448  -.01971636   .09280073    .7349321  -.08687178

         gleason       pgg45       _cons
lpsa   .04442573   .00410169   .17775306

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.800)
------------------+--------------------------------
           lcavol |       0.5532167      0.5643413
          lweight |       0.6129857      0.6220198
              age |      -0.0195505     -0.0212482
             lbph |       0.0923708      0.0967125
              svi |       0.7320269      0.7616733
              lcp |      -0.0849806     -0.1060509
          gleason |       0.0435108      0.0492279
            pgg45 |       0.0040660      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1797211      0.1815609
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.800)
------------------+--------------------------------
           lcavol |       0.5532167      0.5643413
          lweight |       0.6129857      0.6220198
              age |      -0.0195505     -0.0212482
             lbph |       0.0923708      0.0967125
              svi |       0.7320269      0.7616733
              lcp |      -0.0849806     -0.1060509
          gleason |       0.0435108      0.0492279
            pgg45 |       0.0040660      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1797211      0.1815609
------------------+--------------------------------
mreldif=1.17636172472e-15. tolerance = .00001

__000000[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .55321667   .61298571  -.01955047   .09237083   .73202691  -.08498056

         gleason       pgg45       _cons
lpsa   .04351083   .00406599   .17972113

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .55321667   .61298571  -.01955047   .09237083   .73202691  -.08498056

         gleason       pgg45       _cons
lpsa   .04351083   .00406599   .17972113

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.900)
------------------+--------------------------------
           lcavol |       0.5525885      0.5643413
          lweight |       0.6119761      0.6220198
              age |      -0.0193841     -0.0212482
             lbph |       0.0919399      0.0967125
              svi |       0.7291095      0.7616733
              lcp |      -0.0830807     -0.1060509
          gleason |       0.0425952      0.0492279
            pgg45 |       0.0040301      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1816810      0.1815609
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.900)
------------------+--------------------------------
           lcavol |       0.5525885      0.5643413
          lweight |       0.6119761      0.6220198
              age |      -0.0193841     -0.0212482
             lbph |       0.0919399      0.0967125
              svi |       0.7291095      0.7616733
              lcp |      -0.0830807     -0.1060509
          gleason |       0.0425952      0.0492279
            pgg45 |       0.0040301      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1816810      0.1815609
------------------+--------------------------------
mreldif=2.30184490043e-15. tolerance = .00001

__000000[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .55258846   .61197606   -.0193841   .09193991   .72910953  -.08308071

         gleason       pgg45       _cons
lpsa   .04259523   .00403012   .18168101

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .55258846   .61197606   -.0193841   .09193991   .72910953  -.08308071

         gleason       pgg45       _cons
lpsa   .04259523   .00403012   .18168101

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.100)
------------------+--------------------------------
           lcavol |       0.5050524      0.5643413
          lweight |       0.6005836      0.6220198
              age |      -0.0163864     -0.0212482
             lbph |       0.0846536      0.0967125
              svi |       0.6795890      0.7616733
              lcp |      -0.0390389     -0.1060509
          gleason |       0.0523956      0.0492279
            pgg45 |       0.0033160      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.0663339      0.1815609
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.100)
------------------+--------------------------------
           lcavol |       0.5050524      0.5643413
          lweight |       0.6005836      0.6220198
              age |      -0.0163864     -0.0212482
             lbph |       0.0846536      0.0967125
              svi |       0.6795890      0.7616733
              lcp |      -0.0390389     -0.1060509
          gleason |       0.0523956      0.0492279
            pgg45 |       0.0033160      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.0663339      0.1815609
------------------+--------------------------------
mreldif=1.13226025287e-15. tolerance = .00001

__000000[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .50505243   .60058357  -.01638644   .08465363   .67958899  -.03903893

         gleason       pgg45       _cons
lpsa   .05239562   .00331603   .06633394

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .50505243   .60058357  -.01638644   .08465363   .67958899  -.03903893

         gleason       pgg45       _cons
lpsa   .05239562   .00331603   .06633394

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.200)
------------------+--------------------------------
           lcavol |       0.4992808      0.5643413
          lweight |       0.5910221      0.6220198
              age |      -0.0148419     -0.0212482
             lbph |       0.0805928      0.0967125
              svi |       0.6536565      0.7616733
              lcp |      -0.0219747     -0.1060509
          gleason |       0.0439151      0.0492279
            pgg45 |       0.0029901      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.0844730      0.1815609
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.200)
------------------+--------------------------------
           lcavol |       0.4992808      0.5643413
          lweight |       0.5910221      0.6220198
              age |      -0.0148419     -0.0212482
             lbph |       0.0805928      0.0967125
              svi |       0.6536565      0.7616733
              lcp |      -0.0219747     -0.1060509
          gleason |       0.0439151      0.0492279
            pgg45 |       0.0029901      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.0844730      0.1815609
------------------+--------------------------------
mreldif=2.26503417278e-15. tolerance = .00001

__000000[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .49928078   .59102213  -.01484186   .08059285    .6536565   -.0219747

         gleason       pgg45       _cons
lpsa   .04391507   .00299006   .08447302

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .49928078   .59102213  -.01484186   .08059285    .6536565   -.0219747

         gleason       pgg45       _cons
lpsa   .04391507   .00299006   .08447302

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.300)
------------------+--------------------------------
           lcavol |       0.4932148      0.5643413
          lweight |       0.5813684      0.6220198
              age |      -0.0132588     -0.0212482
             lbph |       0.0764468      0.0967125
              svi |       0.6267666      0.7616733
              lcp |      -0.0042353     -0.1060509
          gleason |       0.0353515      0.0492279
            pgg45 |       0.0026511      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1020996      0.1815609
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.300)
------------------+--------------------------------
           lcavol |       0.4932148      0.5643413
          lweight |       0.5813684      0.6220198
              age |      -0.0132588     -0.0212482
             lbph |       0.0764468      0.0967125
              svi |       0.6267666      0.7616733
              lcp |      -0.0042353     -0.1060509
          gleason |       0.0353515      0.0492279
            pgg45 |       0.0026511      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1020996      0.1815609
------------------+--------------------------------
mreldif=2.14066310586e-15. tolerance = .00001

__000000[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .49321477   .58136836  -.01325877    .0764468   .62676656  -.00423527

         gleason       pgg45       _cons
lpsa   .03535148   .00265111   .10209959

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .49321477   .58136836  -.01325877    .0764468   .62676656  -.00423527

         gleason       pgg45       _cons
lpsa   .03535148   .00265111   .10209959

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.400)
------------------+--------------------------------
           lcavol |       0.4927792      0.5186256
          lweight |       0.5718474      0.6217574
              age |      -0.0118795     -0.0193045
             lbph |       0.0723928      0.0949255
              svi |       0.6146470      0.6427775
          gleason |       0.0280621      0.0422021
            pgg45 |       0.0025137      0.0027656
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1055094      0.2537330
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.400)
------------------+--------------------------------
           lcavol |       0.4927792      0.5186256
          lweight |       0.5718474      0.6217574
              age |      -0.0118795     -0.0193045
             lbph |       0.0723928      0.0949255
              svi |       0.6146470      0.6427775
          gleason |       0.0280621      0.0422021
            pgg45 |       0.0025137      0.0027656
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1055094      0.2537330
------------------+--------------------------------
mreldif=1.49384236397e-15. tolerance = .00001

__000000[1,8]
          lcavol     lweight         age        lbph         svi     gleason
lpsa   .49277921   .57184739  -.01187945   .07239283   .61464704   .02806215

           pgg45       _cons
lpsa    .0025137   .10550938

__000001[1,8]
          lcavol     lweight         age        lbph         svi     gleason
lpsa   .49277921   .57184739  -.01187945   .07239283   .61464704   .02806215

           pgg45       _cons
lpsa    .0025137   .10550938

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.4941626      0.5186256
          lweight |       0.5622500      0.6217574
              age |      -0.0105501     -0.0193045
             lbph |       0.0683305      0.0949255
              svi |       0.6070730      0.6427775
          gleason |       0.0210338      0.0422021
            pgg45 |       0.0024411      0.0027656
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1048456      0.2537330
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.4941626      0.5186256
          lweight |       0.5622500      0.6217574
              age |      -0.0105501     -0.0193045
             lbph |       0.0683305      0.0949255
              svi |       0.6070730      0.6427775
          gleason |       0.0210338      0.0422021
            pgg45 |       0.0024411      0.0027656
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1048456      0.2537330
------------------+--------------------------------
mreldif=3.76825160549e-15. tolerance = .00001

__000000[1,8]
          lcavol     lweight         age        lbph         svi     gleason
lpsa   .49416259   .56225004  -.01055008   .06833045   .60707302   .02103381

           pgg45       _cons
lpsa   .00244109   .10484564

__000001[1,8]
          lcavol     lweight         age        lbph         svi     gleason
lpsa   .49416259   .56225004  -.01055008   .06833045   .60707302   .02103381

           pgg45       _cons
lpsa   .00244109   .10484564

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.600)
------------------+--------------------------------
           lcavol |       0.4956051      0.5186256
          lweight |       0.5524971      0.6217574
              age |      -0.0091982     -0.0193045
             lbph |       0.0642069      0.0949255
              svi |       0.5993467      0.6427775
          gleason |       0.0138383      0.0422021
            pgg45 |       0.0023697      0.0027656
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1043694      0.2537330
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.600)
------------------+--------------------------------
           lcavol |       0.4956051      0.5186256
          lweight |       0.5524971      0.6217574
              age |      -0.0091982     -0.0193045
             lbph |       0.0642069      0.0949255
              svi |       0.5993467      0.6427775
          gleason |       0.0138383      0.0422021
            pgg45 |       0.0023697      0.0027656
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1043694      0.2537330
------------------+--------------------------------
mreldif=1.64617946853e-15. tolerance = .00001

__000000[1,8]
          lcavol     lweight         age        lbph         svi     gleason
lpsa   .49560506    .5524971  -.00919825   .06420691   .59934666   .01383828

           pgg45       _cons
lpsa   .00236973   .10436938

__000001[1,8]
          lcavol     lweight         age        lbph         svi     gleason
lpsa   .49560506    .5524971  -.00919825   .06420691   .59934666   .01383828

           pgg45       _cons
lpsa   .00236973   .10436938

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.700)
------------------+--------------------------------
           lcavol |       0.4971093      0.5186256
          lweight |       0.5425838      0.6217574
              age |      -0.0078234     -0.0193045
             lbph |       0.0600208      0.0949255
              svi |       0.5914607      0.6427775
          gleason |       0.0064666      0.0422021
            pgg45 |       0.0022998      0.0027656
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1041173      0.2537330
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.700)
------------------+--------------------------------
           lcavol |       0.4971093      0.5186256
          lweight |       0.5425838      0.6217574
              age |      -0.0078234     -0.0193045
             lbph |       0.0600208      0.0949255
              svi |       0.5914607      0.6427775
          gleason |       0.0064666      0.0422021
            pgg45 |       0.0022998      0.0027656
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1041173      0.2537330
------------------+--------------------------------
mreldif=7.91854823730e-16. tolerance = .00001

__000000[1,8]
         lcavol    lweight        age       lbph        svi    gleason
lpsa   .4971093   .5425838  -.0078234  .06002079  .59146069  .00646665

          pgg45      _cons
lpsa   .0022998  .10411733

__000001[1,8]
         lcavol    lweight        age       lbph        svi    gleason
lpsa   .4971093   .5425838  -.0078234  .06002079  .59146069  .00646665

          pgg45      _cons
lpsa   .0022998  .10411733

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.800)
------------------+--------------------------------
           lcavol |       0.4985532      0.5234981
          lweight |       0.5326719      0.6152349
              age |      -0.0064321     -0.0190343
             lbph |       0.0557559      0.0954908
              svi |       0.5835750      0.6358643
            pgg45 |       0.0022121      0.0035248
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.0972199      0.5214696
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.800)
------------------+--------------------------------
           lcavol |       0.4985532      0.5234981
          lweight |       0.5326719      0.6152349
              age |      -0.0064321     -0.0190343
             lbph |       0.0557559      0.0954908
              svi |       0.5835750      0.6358643
            pgg45 |       0.0022121      0.0035248
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.0972199      0.5214696
------------------+--------------------------------
mreldif=6.19758718503e-16. tolerance = .00001

__000000[1,7]
          lcavol     lweight         age        lbph         svi       pgg45
lpsa    .4985532    .5326719  -.00643209   .05575592   .58357496   .00221212

           _cons
lpsa   .09721991

__000001[1,7]
          lcavol     lweight         age        lbph         svi       pgg45
lpsa    .4985532    .5326719  -.00643209   .05575592   .58357496   .00221212

           _cons
lpsa   .09721991

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.900)
------------------+--------------------------------
           lcavol |       0.4992975      0.5234981
          lweight |       0.5236155      0.6152349
              age |      -0.0050595     -0.0190343
             lbph |       0.0513361      0.0954908
              svi |       0.5765816      0.6358643
            pgg45 |       0.0020069      0.0035248
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.0483824      0.5214696
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.900)
------------------+--------------------------------
           lcavol |       0.4992975      0.5234981
          lweight |       0.5236155      0.6152349
              age |      -0.0050595     -0.0190343
             lbph |       0.0513361      0.0954908
              svi |       0.5765816      0.6358643
            pgg45 |       0.0020069      0.0035248
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.0483824      0.5214696
------------------+--------------------------------
mreldif=1.40839271056e-16. tolerance = .00001

__000000[1,7]
          lcavol     lweight         age        lbph         svi       pgg45
lpsa   .49929752   .52361547  -.00505955   .05133606   .57658161   .00200692

           _cons
lpsa    .0483824

__000001[1,7]
          lcavol     lweight         age        lbph         svi       pgg45
lpsa   .49929752   .52361547  -.00505955   .05133606   .57658161   .00200692

           _cons
lpsa    .0483824

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.100)
------------------+--------------------------------
           lcavol |       0.3929498      0.5643413
          lweight |       0.5140716      0.6220198
              age |      -0.0052163     -0.0212482
             lbph |       0.0543877      0.0967125
              svi |       0.5642286      0.7616733
              lcp |       0.0258548     -0.1060509
          gleason |       0.0533416      0.0492279
            pgg45 |       0.0023869      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.1258522      0.1815609
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.100)
------------------+--------------------------------
           lcavol |       0.3929498      0.5643413
          lweight |       0.5140716      0.6220198
              age |      -0.0052163     -0.0212482
             lbph |       0.0543877      0.0967125
              svi |       0.5642286      0.7616733
              lcp |       0.0258548     -0.1060509
          gleason |       0.0533416      0.0492279
            pgg45 |       0.0023869      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.1258522      0.1815609
------------------+--------------------------------
mreldif=1.23264735000e-15. tolerance = .00001

__000000[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .39294978   .51407159  -.00521634   .05438768    .5642286   .02585484

         gleason       pgg45       _cons
lpsa   .05334158   .00238694  -.12585224

__000001[1,9]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .39294978   .51407159  -.00521634   .05438768    .5642286   .02585484

         gleason       pgg45       _cons
lpsa   .05334158   .00238694  -.12585224

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.200)
------------------+--------------------------------
           lcavol |       0.3954770      0.5445621
          lweight |       0.4768243      0.5462090
             lbph |       0.0376346      0.0713692
              svi |       0.5418757      0.7435010
              lcp |       0.0206265     -0.0804513
          gleason |       0.0301816      0.0208513
            pgg45 |       0.0020595      0.0033600
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.1572859     -0.6442175
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.200)
------------------+--------------------------------
           lcavol |       0.3954770      0.5445621
          lweight |       0.4768243      0.5462090
             lbph |       0.0376346      0.0713692
              svi |       0.5418757      0.7435010
              lcp |       0.0206265     -0.0804513
          gleason |       0.0301816      0.0208513
            pgg45 |       0.0020595      0.0033600
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.1572859     -0.6442175
------------------+--------------------------------
mreldif=3.35766697729e-16. tolerance = .00001

__000000[1,8]
          lcavol     lweight        lbph         svi         lcp     gleason
lpsa   .39547696   .47682429   .03763458   .54187569   .02062652   .03018157

           pgg45       _cons
lpsa   .00205949  -.15728588

__000001[1,8]
          lcavol     lweight        lbph         svi         lcp     gleason
lpsa   .39547696   .47682429   .03763458   .54187569   .02062652   .03018157

           pgg45       _cons
lpsa   .00205949  -.15728588

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.300)
------------------+--------------------------------
           lcavol |       0.4020345      0.5445621
          lweight |       0.4555687      0.5462090
             lbph |       0.0258024      0.0713692
              svi |       0.5202679      0.7435010
              lcp |       0.0120385     -0.0804513
          gleason |       0.0123741      0.0208513
            pgg45 |       0.0019366      0.0033600
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.0385640     -0.6442175
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.300)
------------------+--------------------------------
           lcavol |       0.4020345      0.5445621
          lweight |       0.4555687      0.5462090
             lbph |       0.0258024      0.0713692
              svi |       0.5202679      0.7435010
              lcp |       0.0120385     -0.0804513
          gleason |       0.0123741      0.0208513
            pgg45 |       0.0019366      0.0033600
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.0385640     -0.6442175
------------------+--------------------------------
mreldif=3.54105657032e-16. tolerance = .00001

__000000[1,8]
         lcavol    lweight       lbph        svi        lcp    gleason
lpsa  .40203449  .45556869  .02580237  .52026785  .01203846  .01237409

          pgg45      _cons
lpsa  .00193661  .03856397

__000001[1,8]
         lcavol    lweight       lbph        svi        lcp    gleason
lpsa  .40203449  .45556869  .02580237  .52026785  .01203846  .01237409

          pgg45      _cons
lpsa  .00193661  .03856397

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.400)
------------------+--------------------------------
           lcavol |       0.4090691      0.5469201
          lweight |       0.4344112      0.5434709
             lbph |       0.0133167      0.0718135
              svi |       0.4981474      0.7396583
              lcp |       0.0024463     -0.0801571
            pgg45 |       0.0017425      0.0037380
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1984569     -0.5050395
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.400)
------------------+--------------------------------
           lcavol |       0.4090691      0.5469201
          lweight |       0.4344112      0.5434709
             lbph |       0.0133167      0.0718135
              svi |       0.4981474      0.7396583
              lcp |       0.0024463     -0.0801571
            pgg45 |       0.0017425      0.0037380
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1984569     -0.5050395
------------------+--------------------------------
mreldif=8.10579977631e-16. tolerance = .00001

__000000[1,7]
         lcavol    lweight       lbph        svi        lcp      pgg45
lpsa  .40906915  .43441123  .01331671  .49814739  .00244634  .00174253

          _cons
lpsa  .19845687

__000001[1,7]
         lcavol    lweight       lbph        svi        lcp      pgg45
lpsa  .40906915  .43441123  .01331671  .49814739  .00244634  .00174253

          _cons
lpsa  .19845687

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.4126838      0.5067548
          lweight |       0.4142979      0.6650921
              svi |       0.4673642      0.6016864
            pgg45 |       0.0012381      0.0029746
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.2864229     -0.8221054
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.4126838      0.5067548
          lweight |       0.4142979      0.6650921
              svi |       0.4673642      0.6016864
            pgg45 |       0.0012381      0.0029746
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.2864286     -0.8221054
------------------+--------------------------------
mreldif=4.44221616811e-06. tolerance = .00001

__000000[1,5]
         lcavol    lweight        svi      pgg45      _cons
lpsa  .41268384  .41429785   .4673642  .00123808  .28642286

__000001[1,5]
         lcavol    lweight        svi      pgg45      _cons
lpsa  .41268384  .41429785   .4673642  .00123808  .28642858

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.600)
------------------+--------------------------------
           lcavol |       0.4169250      0.5067548
          lweight |       0.3741641      0.6650921
              svi |       0.4397408      0.6016864
            pgg45 |       0.0005924      0.0029746
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.4480694     -0.8221054
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.600)
------------------+--------------------------------
           lcavol |       0.4169250      0.5067548
          lweight |       0.3741641      0.6650921
              svi |       0.4397408      0.6016864
            pgg45 |       0.0005924      0.0029746
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.4480694     -0.8221054
------------------+--------------------------------
mreldif=5.75018894008e-16. tolerance = .00001

__000000[1,5]
         lcavol    lweight        svi      pgg45      _cons
lpsa  .41692501  .37416414  .43974084  .00059237  .44806941

__000001[1,5]
         lcavol    lweight        svi      pgg45      _cons
lpsa  .41692501  .37416414  .43974084  .00059237  .44806941

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.700)
------------------+--------------------------------
           lcavol |       0.4216208      0.5258519
          lweight |       0.3317963      0.6617699
              svi |       0.4089544      0.6656665
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.6165884     -0.7771568
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.700)
------------------+--------------------------------
           lcavol |       0.4216208      0.5258519
          lweight |       0.3317963      0.6617699
              svi |       0.4089544      0.6656665
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.6165884     -0.7771568
------------------+--------------------------------
mreldif=1.23618442499e-15. tolerance = .00001

__000000[1,4]
         lcavol    lweight        svi      _cons
lpsa  .42162078  .33179632  .40895437  .61658843

__000001[1,4]
         lcavol    lweight        svi      _cons
lpsa  .42162078  .33179632  .40895437  .61658843

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.800)
------------------+--------------------------------
           lcavol |       0.4235371      0.5258519
          lweight |       0.2875129      0.6617699
              svi |       0.3634430      0.6656665
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.7845566     -0.7771568
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.800)
------------------+--------------------------------
           lcavol |       0.4235371      0.5258519
          lweight |       0.2875129      0.6617699
              svi |       0.3634430      0.6656665
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.7845566     -0.7771568
------------------+--------------------------------
mreldif=8.70979529614e-16. tolerance = .00001

__000000[1,4]
         lcavol    lweight        svi      _cons
lpsa  .42353709  .28751286  .36344296  .78455656

__000001[1,4]
         lcavol    lweight        svi      _cons
lpsa  .42353709  .28751286  .36344296  .78455656

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.900)
------------------+--------------------------------
           lcavol |       0.4264083      0.5258519
          lweight |       0.2407731      0.6617699
              svi |       0.3146015      0.6656665
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.9608702     -0.7771568
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.900)
------------------+--------------------------------
           lcavol |       0.4264083      0.5258519
          lweight |       0.2407731      0.6617699
              svi |       0.3146015      0.6656665
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.9608702     -0.7771568
------------------+--------------------------------
mreldif=5.66188950534e-16. tolerance = .00001

__000000[1,4]
         lcavol    lweight        svi      _cons
lpsa  .42640829  .24077311  .31460151  .96087017

__000001[1,4]
         lcavol    lweight        svi      _cons
lpsa  .42640829  .24077311  .31460151  .96087017

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.100)
------------------+--------------------------------
           lcavol |       0.2672673      0.5445621
          lweight |       0.3713884      0.5462090
             lbph |       0.0240021      0.0713692
              svi |       0.4109869      0.7435010
              lcp |       0.0632201     -0.0804513
          gleason |       0.0479261      0.0208513
            pgg45 |       0.0019577      0.0033600
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.3184239     -0.6442175
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.100)
------------------+--------------------------------
           lcavol |       0.2672673      0.5445621
          lweight |       0.3713884      0.5462090
             lbph |       0.0240021      0.0713692
              svi |       0.4109869      0.7435010
              lcp |       0.0632201     -0.0804513
          gleason |       0.0479261      0.0208513
            pgg45 |       0.0019577      0.0033600
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.3184239     -0.6442175
------------------+--------------------------------
mreldif=8.42083523218e-16. tolerance = .00001

__000000[1,8]
         lcavol    lweight       lbph        svi        lcp    gleason
lpsa  .26726726  .37138844  .02400208  .41098688  .06322008  .04792612

          pgg45      _cons
lpsa  .00195771  .31842388

__000001[1,8]
         lcavol    lweight       lbph        svi        lcp    gleason
lpsa  .26726726  .37138844  .02400208  .41098688  .06322008  .04792612

          pgg45      _cons
lpsa  .00195771  .31842388

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.200)
------------------+--------------------------------
           lcavol |       0.2650913      0.5378499
          lweight |       0.3138154      0.6620155
              svi |       0.3583752      0.6991923
              lcp |       0.0513694     -0.0813594
          gleason |       0.0122505      0.0322875
            pgg45 |       0.0013628      0.0036868
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.7973703     -1.1240093
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.200)
------------------+--------------------------------
           lcavol |       0.2650913      0.5378499
          lweight |       0.3138154      0.6620155
              svi |       0.3583752      0.6991923
              lcp |       0.0513694     -0.0813594
          gleason |       0.0122505      0.0322875
            pgg45 |       0.0013628      0.0036868
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.7973703     -1.1240093
------------------+--------------------------------
mreldif=1.85307890891e-16. tolerance = .00001

__000000[1,7]
         lcavol    lweight        svi        lcp    gleason      pgg45
lpsa  .26509133  .31381541  .35837521  .05136945  .01225051  .00136282

          _cons
lpsa  .79737034

__000001[1,7]
         lcavol    lweight        svi        lcp    gleason      pgg45
lpsa  .26509133  .31381541  .35837521  .05136945  .01225051  .00136282

          _cons
lpsa  .79737034

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.300)
------------------+--------------------------------
           lcavol |       0.2629010      0.5414486
          lweight |       0.2275776      0.6588810
              svi |       0.3095110      0.6927932
              lcp |       0.0379029     -0.0809111
            pgg45 |       0.0003998      0.0042772
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.2276458     -0.9123991
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.300)
------------------+--------------------------------
           lcavol |       0.2629010      0.5414486
          lweight |       0.2275776      0.6588810
              svi |       0.3095110      0.6927932
              lcp |       0.0379029     -0.0809111
            pgg45 |       0.0003998      0.0042772
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.2276458     -0.9123991
------------------+--------------------------------
mreldif=9.96767993394e-17. tolerance = .00001

__000000[1,6]
         lcavol    lweight        svi        lcp      pgg45      _cons
lpsa  .26290098  .22757755  .30951102   .0379029  .00039978  1.2276458

__000001[1,6]
         lcavol    lweight        svi        lcp      pgg45      _cons
lpsa  .26290098  .22757755  .30951102   .0379029  .00039978  1.2276458

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.400)
------------------+--------------------------------
           lcavol |       0.2597063      0.5418601
          lweight |       0.1326293      0.6589198
              svi |       0.2509815      0.7099563
              lcp |       0.0178939     -0.0300823
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.5953502     -0.8034092
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.400)
------------------+--------------------------------
           lcavol |       0.2597063      0.5418601
          lweight |       0.1326293      0.6589198
              svi |       0.2509815      0.7099563
              lcp |       0.0178939     -0.0300823
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.5953502     -0.8034092
------------------+--------------------------------
mreldif=1.71109551745e-16. tolerance = .00001

__000000[1,5]
         lcavol    lweight        svi        lcp      _cons
lpsa  .25970625  .13262929  .25098155  .01789386  1.5953502

__000001[1,5]
         lcavol    lweight        svi        lcp      _cons
lpsa  .25970625  .13262929  .25098155  .01789386  1.5953502

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.2549167      0.5258519
          lweight |       0.0268516      0.6617699
              svi |       0.1764878      0.6656665
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.9985955     -0.7771568
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.2549167      0.5258519
          lweight |       0.0268516      0.6617699
              svi |       0.1764878      0.6656665
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.9985955     -0.7771568
------------------+--------------------------------
mreldif=8.84698587265e-17. tolerance = .00001

__000000[1,4]
         lcavol    lweight        svi      _cons
lpsa  .25491669  .02685155  .17648776  1.9985955

__000001[1,4]
         lcavol    lweight        svi      _cons
lpsa  .25491669  .02685155  .17648776  1.9985955

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.600)
------------------+--------------------------------
           lcavol |       0.2374897      0.5925572
              svi |       0.0672390      0.6697460
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.1432166      1.5334325
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.600)
------------------+--------------------------------
           lcavol |       0.2374897      0.5925572
              svi |       0.0672390      0.6697460
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.1432166      1.5334325
------------------+--------------------------------
mreldif=9.10241456688e-17. tolerance = .00001

__000000[1,3]
         lcavol        svi      _cons
lpsa  .23748972  .06723896  2.1432166

__000001[1,3]
         lcavol        svi      _cons
lpsa  .23748972  .06723896  2.1432166

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.700)
------------------+--------------------------------
           lcavol |       0.2091987      0.7193204
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.1959666      1.5072975
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.700)
------------------+--------------------------------
           lcavol |       0.2091987      0.7193204
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.1959666      1.5072975
------------------+--------------------------------
mreldif=0. tolerance = .00001

__000000[1,2]
         lcavol      _cons
lpsa  .20919872  2.1959666

__000001[1,2]
         lcavol      _cons
lpsa  .20919872  2.1959666

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.800)
------------------+--------------------------------
           lcavol |       0.1660968      0.7193204
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.2541546      1.5072975
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.800)
------------------+--------------------------------
           lcavol |       0.1660968      0.7193204
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.2541546      1.5072975
------------------+--------------------------------
mreldif=4.76042387846e-17. tolerance = .00001

__000000[1,2]
         lcavol      _cons
lpsa  .16609682  2.2541546

__000001[1,2]
         lcavol      _cons
lpsa  .16609682  2.2541546

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.900)
------------------+--------------------------------
           lcavol |       0.1168080      0.7193204
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.3206949      1.5072975
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.900)
------------------+--------------------------------
           lcavol |       0.1168080      0.7193204
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.3206949      1.5072975
------------------+--------------------------------
mreldif=6.21314830088e-17. tolerance = .00001

__000000[1,2]
         lcavol      _cons
lpsa  .11680803  2.3206949

__000001[1,2]
         lcavol      _cons
lpsa  .11680803  2.3206949

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.100)
------------------+--------------------------------
           lcavol |       0.2594444      0.5445621
          lweight |       0.3605270      0.5462090
             lbph |       0.0221140      0.0713692
              svi |       0.4003445      0.7435010
              lcp |       0.0637568     -0.0804513
          gleason |       0.0472866      0.0208513
            pgg45 |       0.0019345      0.0033600
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.3758745     -0.6442175
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.100)
------------------+--------------------------------
           lcavol |       0.2594444      0.5445621
          lweight |       0.3605270      0.5462090
             lbph |       0.0221140      0.0713692
              svi |       0.4003445      0.7435010
              lcp |       0.0637568     -0.0804513
          gleason |       0.0472866      0.0208513
            pgg45 |       0.0019345      0.0033600
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.3758745     -0.6442175
------------------+--------------------------------
mreldif=7.66575643207e-16. tolerance = .00001

__000000[1,8]
         lcavol    lweight       lbph        svi        lcp    gleason
lpsa  .25944441  .36052698  .02211401  .40034452  .06375676  .04728659

          pgg45      _cons
lpsa   .0019345  .37587449

__000001[1,8]
         lcavol    lweight       lbph        svi        lcp    gleason
lpsa  .25944441  .36052698  .02211401  .40034452  .06375676  .04728659

          pgg45      _cons
lpsa   .0019345  .37587449

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.200)
------------------+--------------------------------
           lcavol |       0.2563975      0.5378499
          lweight |       0.2969928      0.6620155
              svi |       0.3459398      0.6991923
              lcp |       0.0515258     -0.0813594
          gleason |       0.0098303      0.0322875
            pgg45 |       0.0012945      0.0036868
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.8908842     -1.1240093
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.200)
------------------+--------------------------------
           lcavol |       0.2563975      0.5378499
          lweight |       0.2969928      0.6620155
              svi |       0.3459398      0.6991923
              lcp |       0.0515258     -0.0813594
          gleason |       0.0098303      0.0322875
            pgg45 |       0.0012945      0.0036868
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.8908842     -1.1240093
------------------+--------------------------------
mreldif=2.93572451516e-16. tolerance = .00001

__000000[1,7]
         lcavol    lweight        svi        lcp    gleason      pgg45
lpsa  .25639751   .2969928  .34593975   .0515258   .0098303   .0012945

          _cons
lpsa  .89088421

__000001[1,7]
         lcavol    lweight        svi        lcp    gleason      pgg45
lpsa  .25639751   .2969928  .34593975   .0515258   .0098303   .0012945

          _cons
lpsa  .89088421

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.300)
------------------+--------------------------------
           lcavol |       0.2529679      0.5414486
          lweight |       0.2065323      0.6588810
              svi |       0.2940864      0.6927932
              lcp |       0.0373778     -0.0809111
            pgg45 |       0.0002532      0.0042772
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.3242464     -0.9123991
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.300)
------------------+--------------------------------
           lcavol |       0.2529679      0.5414486
          lweight |       0.2065323      0.6588810
              svi |       0.2940864      0.6927932
              lcp |       0.0373778     -0.0809111
            pgg45 |       0.0002532      0.0042772
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.3242464     -0.9123991
------------------+--------------------------------
mreldif=1.28688046039e-16. tolerance = .00001

__000000[1,6]
         lcavol    lweight        svi        lcp      pgg45      _cons
lpsa  .25296787  .20653225  .29408643   .0373778  .00025322  1.3242464

__000001[1,6]
         lcavol    lweight        svi        lcp      pgg45      _cons
lpsa  .25296787  .20653225  .29408643   .0373778  .00025322  1.3242464

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.400)
------------------+--------------------------------
           lcavol |       0.2481833      0.5418601
          lweight |       0.1063533      0.6589198
              svi |       0.2303994      0.7099563
              lcp |       0.0156260     -0.0300823
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.7103096     -0.8034092
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.400)
------------------+--------------------------------
           lcavol |       0.2481833      0.5418601
          lweight |       0.1063533      0.6589198
              svi |       0.2303994      0.7099563
              lcp |       0.0156260     -0.0300823
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.7103096     -0.8034092
------------------+--------------------------------
mreldif=8.89471148450e-17. tolerance = .00001

__000000[1,5]
         lcavol    lweight        svi        lcp      _cons
lpsa  .24818329  .10635328  .23039944  .01562599  1.7103096

__000001[1,5]
         lcavol    lweight        svi        lcp      _cons
lpsa  .24818329  .10635328  .23039944  .01562599  1.7103096

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.2405017      0.5925572
              svi |       0.1476739      0.6697460
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.1217366      1.5334325
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.2405017      0.5925572
              svi |       0.1476739      0.6697460
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.1217366      1.5334325
------------------+--------------------------------
mreldif=1.42257105530e-16. tolerance = .00001

__000000[1,3]
         lcavol        svi      _cons
lpsa  .24050174  .14767395  2.1217366

__000001[1,3]
         lcavol        svi      _cons
lpsa  .24050174  .14767395  2.1217366

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.600)
------------------+--------------------------------
           lcavol |       0.2191472      0.5925572
              svi |       0.0308890      0.6697460
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.1758487      1.5334325
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.600)
------------------+--------------------------------
           lcavol |       0.2191472      0.5925572
              svi |       0.0308890      0.6697460
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.1758487      1.5334325
------------------+--------------------------------
mreldif=4.55327712814e-17. tolerance = .00001

__000000[1,3]
         lcavol        svi      _cons
lpsa  .21914721  .03088904  2.1758487

__000001[1,3]
         lcavol        svi      _cons
lpsa  .21914721  .03088904  2.1758487

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.700)
------------------+--------------------------------
           lcavol |       0.1819360      0.7193204
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.2327715      1.5072975
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.700)
------------------+--------------------------------
           lcavol |       0.1819360      0.7193204
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.2327715      1.5072975
------------------+--------------------------------
mreldif=4.69662909788e-17. tolerance = .00001

__000000[1,2]
         lcavol      _cons
lpsa  .18193602  2.2327715

__000001[1,2]
         lcavol      _cons
lpsa  .18193602  2.2327715

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.800)
------------------+--------------------------------
           lcavol |       0.1344374      0.7193204
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.2968951      1.5072975
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.800)
------------------+--------------------------------
           lcavol |       0.1344374      0.7193204
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.2968951      1.5072975
------------------+--------------------------------
mreldif=2.44663789308e-17. tolerance = .00001

__000000[1,2]
         lcavol      _cons
lpsa  .13443741  2.2968951

__000001[1,2]
         lcavol      _cons
lpsa  .13443741  2.2968951

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.900)
------------------+--------------------------------
           lcavol |       0.0797009      0.7193204
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.3707899      1.5072975
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.900)
------------------+--------------------------------
           lcavol |       0.0797009      0.7193204
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.3707899      1.5072975
------------------+--------------------------------
mreldif=1.15680266831e-16. tolerance = .00001

__000000[1,2]
         lcavol      _cons
lpsa  .07970092  2.3707899

__000001[1,2]
         lcavol      _cons
lpsa  .07970092  2.3707899
r; t=2.34 22:18:20

. *
.
. // elastic net [nocons]
. foreach lam of numlist 1 10 50 150 160 {
  2. foreach ai of numlist 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 {
  3.         // in original units
.         // standardisation using penalty loadings (default)
.         lasso2 $model, l(`lam')  alpha(`ai') nocons
  4.         mat A = e(beta)
  5.
.         // pre-estimation standardisation of data
.         lasso2 $model, l(`lam') prestd alpha(`ai') nocons
  6.         mat B = e(beta)
  7.         comparemat A B , tol(10e-6)
  8. }
  9. }

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.100)
------------------+--------------------------------
           lcavol |       0.5550395      0.5616062
          lweight |       0.6331382      0.6363374
              age |      -0.0202450     -0.0207511
             lbph |       0.0927832      0.0938945
              svi |       0.7538166      0.7635916
              lcp |      -0.0985952     -0.1066232
          gleason |       0.0643990      0.0651808
            pgg45 |       0.0040558      0.0041730
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.100)
------------------+--------------------------------
           lcavol |       0.5550395      0.5616062
          lweight |       0.6331382      0.6363374
              age |      -0.0202450     -0.0207511
             lbph |       0.0927832      0.0938945
              svi |       0.7538166      0.7635916
              lcp |      -0.0985952     -0.1066232
          gleason |       0.0643990      0.0651808
            pgg45 |       0.0040558      0.0041730
------------------+--------------------------------
mreldif=5.17614318907e-15. tolerance = .00001

__000000[1,8]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .55503953   .63313824  -.02024505   .09278316   .75381656  -.09859522

         gleason       pgg45
lpsa   .06439902   .00405583

__000001[1,8]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .55503953   .63313824  -.02024505   .09278316   .75381656  -.09859522

         gleason       pgg45
lpsa   .06439902   .00405583

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.200)
------------------+--------------------------------
           lcavol |       0.5544044      0.5616062
          lweight |       0.6322901      0.6363374
              age |      -0.0200767     -0.0207511
             lbph |       0.0923283      0.0938945
              svi |       0.7510088      0.7635916
              lcp |      -0.0967578     -0.1066232
          gleason |       0.0636721      0.0651808
            pgg45 |       0.0040177      0.0041730
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.200)
------------------+--------------------------------
           lcavol |       0.5544044      0.5616062
          lweight |       0.6322901      0.6363374
              age |      -0.0200767     -0.0207511
             lbph |       0.0923283      0.0938945
              svi |       0.7510088      0.7635916
              lcp |      -0.0967578     -0.1066232
          gleason |       0.0636721      0.0651808
            pgg45 |       0.0040177      0.0041730
------------------+--------------------------------
mreldif=5.10122112189e-15. tolerance = .00001

__000000[1,8]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .55440439   .63229009  -.02007669   .09232831   .75100881  -.09675784

         gleason       pgg45
lpsa   .06367214   .00401766

__000001[1,8]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .55440439   .63229009  -.02007669   .09232831   .75100881  -.09675784

         gleason       pgg45
lpsa   .06367214   .00401766

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.300)
------------------+--------------------------------
           lcavol |       0.5537656      0.5616062
          lweight |       0.6314403      0.6363374
              age |      -0.0199079     -0.0207511
             lbph |       0.0918726      0.0938945
              svi |       0.7481894      0.7635916
              lcp |      -0.0949120     -0.1066232
          gleason |       0.0629441      0.0651808
            pgg45 |       0.0039793      0.0041730
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.300)
------------------+--------------------------------
           lcavol |       0.5537656      0.5616062
          lweight |       0.6314403      0.6363374
              age |      -0.0199079     -0.0207511
             lbph |       0.0918726      0.0938945
              svi |       0.7481894      0.7635916
              lcp |      -0.0949120     -0.1066232
          gleason |       0.0629441      0.0651808
            pgg45 |       0.0039793      0.0041730
------------------+--------------------------------
mreldif=1.98451058934e-15. tolerance = .00001

__000000[1,8]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .55376561   .63144034  -.01990791   .09187258   .74818938  -.09491205

         gleason       pgg45
lpsa   .06294406   .00397932

__000001[1,8]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .55376561   .63144034  -.01990791   .09187258   .74818938  -.09491205

         gleason       pgg45
lpsa   .06294406   .00397932

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.400)
------------------+--------------------------------
           lcavol |       0.5531232      0.5616062
          lweight |       0.6305890      0.6363374
              age |      -0.0197387     -0.0207511
             lbph |       0.0914160      0.0938945
              svi |       0.7453582      0.7635916
              lcp |      -0.0930578     -0.1066232
          gleason |       0.0622148      0.0651808
            pgg45 |       0.0039408      0.0041730
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.400)
------------------+--------------------------------
           lcavol |       0.5531232      0.5616062
          lweight |       0.6305890      0.6363374
              age |      -0.0197387     -0.0207511
             lbph |       0.0914160      0.0938945
              svi |       0.7453582      0.7635916
              lcp |      -0.0930578     -0.1066232
          gleason |       0.0622148      0.0651808
            pgg45 |       0.0039408      0.0041730
------------------+--------------------------------
mreldif=1.05172883609e-15. tolerance = .00001

__000000[1,8]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .55312318   .63058897  -.01973871   .09141597    .7453582  -.09305778

         gleason       pgg45
lpsa   .06221478   .00394082

__000001[1,8]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .55312318   .63058897  -.01973871   .09141597    .7453582  -.09305778

         gleason       pgg45
lpsa   .06221478   .00394082

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.5524771      0.5616062
          lweight |       0.6297360      0.6363374
              age |      -0.0195691     -0.0207511
             lbph |       0.0909585      0.0938945
              svi |       0.7425152      0.7635916
              lcp |      -0.0911950     -0.1066232
          gleason |       0.0614843      0.0651808
            pgg45 |       0.0039022      0.0041730
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.5524771      0.5616062
          lweight |       0.6297360      0.6363374
              age |      -0.0195691     -0.0207511
             lbph |       0.0909585      0.0938945
              svi |       0.7425152      0.7635916
              lcp |      -0.0911950     -0.1066232
          gleason |       0.0614843      0.0651808
            pgg45 |       0.0039022      0.0041730
------------------+--------------------------------
mreldif=6.06293597643e-15. tolerance = .00001

__000000[1,8]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .55247706   .62973598  -.01956908   .09095849   .74251518  -.09119497

         gleason       pgg45
lpsa   .06148431   .00390216

__000001[1,8]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .55247706   .62973598  -.01956908   .09095849   .74251518  -.09119497

         gleason       pgg45
lpsa   .06148431   .00390216

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.600)
------------------+--------------------------------
           lcavol |       0.5518272      0.5616062
          lweight |       0.6288814      0.6363374
              age |      -0.0193990     -0.0207511
             lbph |       0.0905001      0.0938945
              svi |       0.7396603      0.7635916
              lcp |      -0.0893236     -0.1066232
          gleason |       0.0607526      0.0651808
            pgg45 |       0.0038633      0.0041730
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.600)
------------------+--------------------------------
           lcavol |       0.5518272      0.5616062
          lweight |       0.6288814      0.6363374
              age |      -0.0193990     -0.0207511
             lbph |       0.0905001      0.0938945
              svi |       0.7396603      0.7635916
              lcp |      -0.0893236     -0.1066232
          gleason |       0.0607526      0.0651808
            pgg45 |       0.0038633      0.0041730
------------------+--------------------------------
mreldif=6.37140317061e-15. tolerance = .00001

__000000[1,8]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .55182722   .62888137  -.01939903   .09050013   .73966027  -.08932358

         gleason       pgg45
lpsa   .06075263   .00386334

__000001[1,8]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .55182722   .62888137  -.01939903   .09050013   .73966027  -.08932358

         gleason       pgg45
lpsa   .06075263   .00386334

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.700)
------------------+--------------------------------
           lcavol |       0.5511736      0.5616062
          lweight |       0.6280251      0.6363374
              age |      -0.0192285     -0.0207511
             lbph |       0.0900409      0.0938945
              svi |       0.7367934      0.7635916
              lcp |      -0.0874435     -0.1066232
          gleason |       0.0600197      0.0651808
            pgg45 |       0.0038243      0.0041730
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.700)
------------------+--------------------------------
           lcavol |       0.5511736      0.5616062
          lweight |       0.6280251      0.6363374
              age |      -0.0192285     -0.0207511
             lbph |       0.0900409      0.0938945
              svi |       0.7367934      0.7635916
              lcp |      -0.0874435     -0.1066232
          gleason |       0.0600197      0.0651808
            pgg45 |       0.0038243      0.0041730
------------------+--------------------------------
mreldif=5.25097381988e-15. tolerance = .00001

__000000[1,8]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .55117363   .62802512  -.01922855   .09004088   .73679338  -.08744353

         gleason       pgg45
lpsa   .06001975   .00382435

__000001[1,8]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .55117363   .62802512  -.01922855   .09004088   .73679338  -.08744353

         gleason       pgg45
lpsa   .06001975   .00382435

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.800)
------------------+--------------------------------
           lcavol |       0.5505163      0.5616062
          lweight |       0.6271672      0.6363374
              age |      -0.0190576     -0.0207511
             lbph |       0.0895807      0.0938945
              svi |       0.7339144      0.7635916
              lcp |      -0.0855548     -0.1066232
          gleason |       0.0592857      0.0651808
            pgg45 |       0.0037852      0.0041730
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.800)
------------------+--------------------------------
           lcavol |       0.5505163      0.5616062
          lweight |       0.6271672      0.6363374
              age |      -0.0190576     -0.0207511
             lbph |       0.0895807      0.0938945
              svi |       0.7339144      0.7635916
              lcp |      -0.0855548     -0.1066232
          gleason |       0.0592857      0.0651808
            pgg45 |       0.0037852      0.0041730
------------------+--------------------------------
mreldif=3.75267305389e-15. tolerance = .00001

__000000[1,8]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .55051627   .62716723  -.01905763   .08958075   .73391443  -.08555478

         gleason       pgg45
lpsa   .05928567   .00378519

__000001[1,8]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .55051627   .62716723  -.01905763   .08958075   .73391443  -.08555478

         gleason       pgg45
lpsa   .05928567   .00378519

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.900)
------------------+--------------------------------
           lcavol |       0.5498551      0.5616062
          lweight |       0.6263077      0.6363374
              age |      -0.0188863     -0.0207511
             lbph |       0.0891197      0.0938945
              svi |       0.7310234      0.7635916
              lcp |      -0.0836573     -0.1066232
          gleason |       0.0585504      0.0651808
            pgg45 |       0.0037459      0.0041730
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.900)
------------------+--------------------------------
           lcavol |       0.5498551      0.5616062
          lweight |       0.6263077      0.6363374
              age |      -0.0188863     -0.0207511
             lbph |       0.0891197      0.0938945
              svi |       0.7310234      0.7635916
              lcp |      -0.0836573     -0.1066232
          gleason |       0.0585504      0.0651808
            pgg45 |       0.0037459      0.0041730
------------------+--------------------------------
mreldif=2.86457469513e-15. tolerance = .00001

__000000[1,8]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .54985511    .6263077  -.01888628   .08911972   .73102336  -.08365726

         gleason       pgg45
lpsa   .05855038   .00374586

__000001[1,8]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .54985511    .6263077  -.01888628   .08911972   .73102336  -.08365726

         gleason       pgg45
lpsa   .05855038   .00374586

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.100)
------------------+--------------------------------
           lcavol |       0.5041520      0.5616062
          lweight |       0.6059374      0.6363374
              age |      -0.0161929     -0.0207511
             lbph |       0.0836208      0.0938945
              svi |       0.6801180      0.7635916
              lcp |      -0.0393512     -0.1066232
          gleason |       0.0579841      0.0651808
            pgg45 |       0.0032233      0.0041730
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.100)
------------------+--------------------------------
           lcavol |       0.5041520      0.5616062
          lweight |       0.6059374      0.6363374
              age |      -0.0161929     -0.0207511
             lbph |       0.0836208      0.0938945
              svi |       0.6801180      0.7635916
              lcp |      -0.0393512     -0.1066232
          gleason |       0.0579841      0.0651808
            pgg45 |       0.0032233      0.0041730
------------------+--------------------------------
mreldif=6.29104798553e-15. tolerance = .00001

__000000[1,8]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .50415204   .60593744   -.0161929   .08362076   .68011798  -.03935125

         gleason       pgg45
lpsa   .05798412   .00322332

__000001[1,8]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .50415204   .60593744   -.0161929   .08362076   .68011798  -.03935125

         gleason       pgg45
lpsa   .05798412   .00322332

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.200)
------------------+--------------------------------
           lcavol |       0.4981220      0.5616062
          lweight |       0.5978256      0.6363374
              age |      -0.0145970     -0.0207511
             lbph |       0.0792772      0.0938945
              svi |       0.6543525      0.7635916
              lcp |      -0.0223606     -0.1066232
          gleason |       0.0510620      0.0651808
            pgg45 |       0.0028706      0.0041730
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.200)
------------------+--------------------------------
           lcavol |       0.4981220      0.5616062
          lweight |       0.5978256      0.6363374
              age |      -0.0145970     -0.0207511
             lbph |       0.0792772      0.0938945
              svi |       0.6543525      0.7635916
              lcp |      -0.0223606     -0.1066232
          gleason |       0.0510620      0.0651808
            pgg45 |       0.0028706      0.0041730
------------------+--------------------------------
mreldif=3.40468504770e-15. tolerance = .00001

__000000[1,8]
          lcavol     lweight         age        lbph         svi         lcp
lpsa     .498122   .59782557  -.01459696   .07927718   .65435245  -.02236063

         gleason       pgg45
lpsa   .05106199    .0028706

__000001[1,8]
          lcavol     lweight         age        lbph         svi         lcp
lpsa     .498122   .59782557  -.01459696   .07927718   .65435245  -.02236063

         gleason       pgg45
lpsa   .05106199    .0028706

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.300)
------------------+--------------------------------
           lcavol |       0.4917990      0.5616062
          lweight |       0.5895732      0.6363374
              age |      -0.0129647     -0.0207511
             lbph |       0.0748564      0.0938945
              svi |       0.6276353      0.7635916
              lcp |      -0.0046868     -0.1066232
          gleason |       0.0440273      0.0651808
            pgg45 |       0.0025050      0.0041730
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.300)
------------------+--------------------------------
           lcavol |       0.4917990      0.5616062
          lweight |       0.5895732      0.6363374
              age |      -0.0129647     -0.0207511
             lbph |       0.0748564      0.0938945
              svi |       0.6276353      0.7635916
              lcp |      -0.0046868     -0.1066232
          gleason |       0.0440273      0.0651808
            pgg45 |       0.0025050      0.0041730
------------------+--------------------------------
mreldif=7.26378598624e-15. tolerance = .00001

__000000[1,8]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .49179901   .58957319  -.01296471   .07485638   .62763527  -.00468675

         gleason       pgg45
lpsa   .04402727   .00250498

__000001[1,8]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .49179901   .58957319  -.01296471   .07485638   .62763527  -.00468675

         gleason       pgg45
lpsa   .04402727   .00250498

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.400)
------------------+--------------------------------
           lcavol |       0.4911048      0.5144497
          lweight |       0.5803342      0.6418074
              age |      -0.0115686     -0.0185937
             lbph |       0.0707368      0.0909654
              svi |       0.6150759      0.6445656
          gleason |       0.0370615      0.0644912
            pgg45 |       0.0023534      0.0023544
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.400)
------------------+--------------------------------
           lcavol |       0.4911048      0.5144497
          lweight |       0.5803342      0.6418074
              age |      -0.0115686     -0.0185937
             lbph |       0.0707368      0.0909654
              svi |       0.6150759      0.6445656
          gleason |       0.0370615      0.0644912
            pgg45 |       0.0023534      0.0023544
------------------+--------------------------------
mreldif=4.98792192268e-15. tolerance = .00001

__000000[1,7]
          lcavol     lweight         age        lbph         svi     gleason
lpsa   .49110484   .58033417  -.01156861   .07073681   .61507589   .03706155

           pgg45
lpsa   .00235337

__000001[1,7]
          lcavol     lweight         age        lbph         svi     gleason
lpsa   .49110484   .58033417  -.01156861   .07073681   .61507589   .03706155

           pgg45
lpsa   .00235337

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.4924888      0.5144497
          lweight |       0.5706613      0.6418074
              age |      -0.0102436     -0.0185937
             lbph |       0.0666856      0.0909654
              svi |       0.6075467      0.6445656
          gleason |       0.0300181      0.0644912
            pgg45 |       0.0022801      0.0023544
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.4924888      0.5144497
          lweight |       0.5706613      0.6418074
              age |      -0.0102436     -0.0185937
             lbph |       0.0666856      0.0909654
              svi |       0.6075467      0.6445656
          gleason |       0.0300181      0.0644912
            pgg45 |       0.0022801      0.0023544
------------------+--------------------------------
mreldif=4.66521467633e-15. tolerance = .00001

__000000[1,7]
          lcavol     lweight         age        lbph         svi     gleason
lpsa   .49248883   .57066126  -.01024357    .0666856   .60754673   .03001805

           pgg45
lpsa   .00228011

__000001[1,7]
          lcavol     lweight         age        lbph         svi     gleason
lpsa   .49248883   .57066126  -.01024357    .0666856   .60754673   .03001805

           pgg45
lpsa   .00228011

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.600)
------------------+--------------------------------
           lcavol |       0.4939289      0.5144497
          lweight |       0.5608471      0.6418074
              age |      -0.0088956     -0.0185937
             lbph |       0.0625706      0.0909654
              svi |       0.5998673      0.6445656
          gleason |       0.0228241      0.0644912
            pgg45 |       0.0022078      0.0023544
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.600)
------------------+--------------------------------
           lcavol |       0.4939289      0.5144497
          lweight |       0.5608471      0.6418074
              age |      -0.0088956     -0.0185937
             lbph |       0.0625706      0.0909654
              svi |       0.5998673      0.6445656
          gleason |       0.0228241      0.0644912
            pgg45 |       0.0022078      0.0023544
------------------+--------------------------------
mreldif=1.66209316405e-15. tolerance = .00001

__000000[1,7]
          lcavol     lweight         age        lbph         svi     gleason
lpsa    .4939289   .56084709  -.00889555   .06257056   .59986726   .02282414

           pgg45
lpsa   .00220781

__000001[1,7]
          lcavol     lweight         age        lbph         svi     gleason
lpsa    .4939289   .56084709  -.00889555   .06257056   .59986726   .02282414

           pgg45
lpsa   .00220781

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.700)
------------------+--------------------------------
           lcavol |       0.4954271      0.5144497
          lweight |       0.5508897      0.6418074
              age |      -0.0075239     -0.0185937
             lbph |       0.0583897      0.0909654
              svi |       0.5920307      0.6445656
          gleason |       0.0154743      0.0644912
            pgg45 |       0.0021365      0.0023544
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.700)
------------------+--------------------------------
           lcavol |       0.4954271      0.5144497
          lweight |       0.5508897      0.6418074
              age |      -0.0075239     -0.0185937
             lbph |       0.0583897      0.0909654
              svi |       0.5920307      0.6445656
          gleason |       0.0154743      0.0644912
            pgg45 |       0.0021365      0.0023544
------------------+--------------------------------
mreldif=5.08262044899e-15. tolerance = .00001

__000000[1,7]
          lcavol     lweight         age        lbph         svi     gleason
lpsa   .49542706   .55088966  -.00752391   .05838973   .59203075   .01547434

           pgg45
lpsa   .00213655

__000001[1,7]
          lcavol     lweight         age        lbph         svi     gleason
lpsa   .49542706   .55088966  -.00752391   .05838973   .59203075   .01547434

           pgg45
lpsa   .00213655

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.800)
------------------+--------------------------------
           lcavol |       0.4969854      0.5144497
          lweight |       0.5407870      0.6418074
              age |      -0.0061280     -0.0185937
             lbph |       0.0541410      0.0909654
              svi |       0.5840300      0.6445656
          gleason |       0.0079629      0.0644912
            pgg45 |       0.0020664      0.0023544
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.800)
------------------+--------------------------------
           lcavol |       0.4969854      0.5144497
          lweight |       0.5407870      0.6418074
              age |      -0.0061280     -0.0185937
             lbph |       0.0541410      0.0909654
              svi |       0.5840300      0.6445656
          gleason |       0.0079629      0.0644912
            pgg45 |       0.0020664      0.0023544
------------------+--------------------------------
mreldif=7.99816957342e-15. tolerance = .00001

__000000[1,7]
          lcavol     lweight         age        lbph         svi     gleason
lpsa   .49698543   .54078698  -.00612798   .05414101   .58403003   .00796292

           pgg45
lpsa   .00206642

__000001[1,7]
          lcavol     lweight         age        lbph         svi     gleason
lpsa   .49698543   .54078698  -.00612798   .05414101   .58403003   .00796292

           pgg45
lpsa   .00206642

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.900)
------------------+--------------------------------
           lcavol |       0.4986062      0.5144497
          lweight |       0.5305372      0.6418074
              age |      -0.0047071     -0.0185937
             lbph |       0.0498222      0.0909654
              svi |       0.5758575      0.6445656
          gleason |       0.0002838      0.0644912
            pgg45 |       0.0019976      0.0023544
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.900)
------------------+--------------------------------
           lcavol |       0.4986062      0.5144497
          lweight |       0.5305372      0.6418074
              age |      -0.0047071     -0.0185937
             lbph |       0.0498222      0.0909654
              svi |       0.5758575      0.6445656
          gleason |       0.0002838      0.0644912
            pgg45 |       0.0019976      0.0023544
------------------+--------------------------------
mreldif=7.47142724134e-15. tolerance = .00001

__000000[1,7]
          lcavol     lweight         age        lbph         svi     gleason
lpsa   .49860624   .53053718  -.00470708   .04982223   .57585752    .0002838

           pgg45
lpsa   .00199755

__000001[1,7]
          lcavol     lweight         age        lbph         svi     gleason
lpsa   .49860624   .53053718  -.00470708   .04982223   .57585752    .0002838

           pgg45
lpsa   .00199755

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.100)
------------------+--------------------------------
           lcavol |       0.3942337      0.5616062
          lweight |       0.5035060      0.6363374
              age |      -0.0056474     -0.0207511
             lbph |       0.0562343      0.0938945
              svi |       0.5640494      0.7635916
              lcp |       0.0267552     -0.1066232
          gleason |       0.0438311      0.0651808
            pgg45 |       0.0025138      0.0041730
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.100)
------------------+--------------------------------
           lcavol |       0.3942337      0.5616062
          lweight |       0.5035060      0.6363374
              age |      -0.0056474     -0.0207511
             lbph |       0.0562343      0.0938945
              svi |       0.5640494      0.7635916
              lcp |       0.0267552     -0.1066232
          gleason |       0.0438311      0.0651808
            pgg45 |       0.0025138      0.0041730
------------------+--------------------------------
mreldif=4.20900959156e-15. tolerance = .00001

__000000[1,8]
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .39423374  .50350602  -.0056474  .05623427  .56404936  .02675524

        gleason      pgg45
lpsa  .04383111  .00251383

__000001[1,8]
         lcavol    lweight        age       lbph        svi        lcp
lpsa  .39423374  .50350602  -.0056474  .05623427  .56404936  .02675524

        gleason      pgg45
lpsa  .04383111  .00251383

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.200)
------------------+--------------------------------
           lcavol |       0.3971217      0.5616062
          lweight |       0.4631788      0.6363374
              age |      -0.0004687     -0.0207511
             lbph |       0.0399387      0.0938945
              svi |       0.5415176      0.7635916
              lcp |       0.0217879     -0.1066232
          gleason |       0.0178421      0.0651808
            pgg45 |       0.0022246      0.0041730
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.200)
------------------+--------------------------------
           lcavol |       0.3971217      0.5616062
          lweight |       0.4631788      0.6363374
              age |      -0.0004687     -0.0207511
             lbph |       0.0399387      0.0938945
              svi |       0.5415176      0.7635916
              lcp |       0.0217879     -0.1066232
          gleason |       0.0178421      0.0651808
            pgg45 |       0.0022246      0.0041730
------------------+--------------------------------
mreldif=2.27632401210e-15. tolerance = .00001

__000000[1,8]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .39712172   .46317882  -.00046871   .03993868   .54151763   .02178786

         gleason       pgg45
lpsa   .01784215   .00222462

__000001[1,8]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .39712172   .46317882  -.00046871   .03993868   .54151763   .02178786

         gleason       pgg45
lpsa   .01784215   .00222462

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.300)
------------------+--------------------------------
           lcavol |       0.4016414      0.5535850
          lweight |       0.4597795      0.4823154
             lbph |       0.0252892      0.0802044
              svi |       0.5204513      0.7341959
              lcp |       0.0116434     -0.0758011
          gleason |       0.0160198     -0.0451293
            pgg45 |       0.0018935      0.0043876
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.300)
------------------+--------------------------------
           lcavol |       0.4016414      0.5535850
          lweight |       0.4597795      0.4823154
             lbph |       0.0252892      0.0802044
              svi |       0.5204513      0.7341959
              lcp |       0.0116434     -0.0758011
          gleason |       0.0160198     -0.0451293
            pgg45 |       0.0018935      0.0043876
------------------+--------------------------------
mreldif=4.33508721472e-15. tolerance = .00001

__000000[1,7]
         lcavol    lweight       lbph        svi        lcp    gleason
lpsa   .4016414  .45977945  .02528921  .52045133  .01164338  .01601981

          pgg45
lpsa   .0018935

__000001[1,7]
         lcavol    lweight       lbph        svi        lcp    gleason
lpsa   .4016414  .45977945  .02528921  .52045133  .01164338  .01601981

          pgg45
lpsa   .0018935

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.400)
------------------+--------------------------------
           lcavol |       0.4071115      0.5535850
          lweight |       0.4600408      0.4823154
             lbph |       0.0101968      0.0802044
              svi |       0.4988501      0.7341959
              lcp |       0.0003073     -0.0758011
          gleason |       0.0164744     -0.0451293
            pgg45 |       0.0015576      0.0043876
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.400)
------------------+--------------------------------
           lcavol |       0.4071115      0.5535850
          lweight |       0.4600408      0.4823154
             lbph |       0.0101968      0.0802044
              svi |       0.4988501      0.7341959
              lcp |       0.0003073     -0.0758011
          gleason |       0.0164744     -0.0451293
            pgg45 |       0.0015576      0.0043876
------------------+--------------------------------
mreldif=4.06816921444e-15. tolerance = .00001

__000000[1,7]
         lcavol    lweight       lbph        svi        lcp    gleason
lpsa  .40711146  .46004084  .01019684  .49885011  .00030725   .0164744

          pgg45
lpsa  .00155759

__000001[1,7]
         lcavol    lweight       lbph        svi        lcp    gleason
lpsa  .40711146  .46004084  .01019684  .49885011  .00030725   .0164744

          pgg45
lpsa  .00155759

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.4086004      0.5210401
          lweight |       0.4582100      0.5807512
              svi |       0.4668723      0.5901024
          gleason |       0.0203103     -0.0836132
            pgg45 |       0.0009605      0.0044279
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.4086004      0.5210401
          lweight |       0.4582100      0.5807512
              svi |       0.4668723      0.5901024
          gleason |       0.0203103     -0.0836132
            pgg45 |       0.0009605      0.0044279
------------------+--------------------------------
mreldif=2.51248866942e-15. tolerance = .00001

__000000[1,5]
         lcavol    lweight        svi    gleason      pgg45
lpsa  .40860044  .45820995  .46687234  .02031034  .00096046

__000001[1,5]
         lcavol    lweight        svi    gleason      pgg45
lpsa  .40860044  .45820995  .46687234  .02031034  .00096046

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.600)
------------------+--------------------------------
           lcavol |       0.4103816      0.5210401
          lweight |       0.4465932      0.5807512
              svi |       0.4391273      0.5901024
          gleason |       0.0296811     -0.0836132
            pgg45 |       0.0001835      0.0044279
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.600)
------------------+--------------------------------
           lcavol |       0.4103816      0.5210401
          lweight |       0.4465932      0.5807512
              svi |       0.4391273      0.5901024
          gleason |       0.0296811     -0.0836132
            pgg45 |       0.0001835      0.0044279
------------------+--------------------------------
mreldif=2.49429136725e-15. tolerance = .00001

__000000[1,5]
         lcavol    lweight        svi    gleason      pgg45
lpsa   .4103816  .44659316  .43912729  .02968112  .00018352

__000001[1,5]
         lcavol    lweight        svi    gleason      pgg45
lpsa   .4103816  .44659316  .43912729  .02968112  .00018352

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.700)
------------------+--------------------------------
           lcavol |       0.4099223      0.5411928
          lweight |       0.4439178      0.5016112
              svi |       0.3985377      0.6758092
          gleason |       0.0328883     -0.0313003
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.700)
------------------+--------------------------------
           lcavol |       0.4099223      0.5411928
          lweight |       0.4439178      0.5016112
              svi |       0.3985377      0.6758092
          gleason |       0.0328883     -0.0313003
------------------+--------------------------------
mreldif=3.46003331961e-15. tolerance = .00001

__000000[1,4]
         lcavol    lweight        svi    gleason
lpsa  .40992232  .44391777  .39853766  .03288827

__000001[1,4]
         lcavol    lweight        svi    gleason
lpsa  .40992232  .44391777  .39853766  .03288827

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.800)
------------------+--------------------------------
           lcavol |       0.4090750      0.5411928
          lweight |       0.4440066      0.5016112
              svi |       0.3518476      0.6758092
          gleason |       0.0341986     -0.0313003
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.800)
------------------+--------------------------------
           lcavol |       0.4090750      0.5411928
          lweight |       0.4440066      0.5016112
              svi |       0.3518476      0.6758092
          gleason |       0.0341986     -0.0313003
------------------+--------------------------------
mreldif=3.65203271773e-15. tolerance = .00001

__000000[1,4]
         lcavol    lweight        svi    gleason
lpsa  .40907503  .44400661  .35184755   .0341986

__000001[1,4]
         lcavol    lweight        svi    gleason
lpsa  .40907503  .44400661  .35184755   .0341986

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.900)
------------------+--------------------------------
           lcavol |       0.4087493      0.5411928
          lweight |       0.4438953      0.5016112
              svi |       0.3019873      0.6758092
          gleason |       0.0356159     -0.0313003
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.900)
------------------+--------------------------------
           lcavol |       0.4087493      0.5411928
          lweight |       0.4438953      0.5016112
              svi |       0.3019873      0.6758092
          gleason |       0.0356159     -0.0313003
------------------+--------------------------------
mreldif=3.53697790421e-15. tolerance = .00001

__000000[1,4]
         lcavol    lweight        svi    gleason
lpsa  .40874929  .44389534  .30198732  .03561586

__000001[1,4]
         lcavol    lweight        svi    gleason
lpsa  .40874929  .44389534  .30198732  .03561586

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.100)
------------------+--------------------------------
           lcavol |       0.2653276      0.5535850
          lweight |       0.4088173      0.4823154
             lbph |       0.0207457      0.0802044
              svi |       0.4097884      0.7341959
              lcp |       0.0599232     -0.0758011
          gleason |       0.0756782     -0.0451293
            pgg45 |       0.0017523      0.0043876
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.100)
------------------+--------------------------------
           lcavol |       0.2653276      0.5535850
          lweight |       0.4088173      0.4823154
             lbph |       0.0207457      0.0802044
              svi |       0.4097884      0.7341959
              lcp |       0.0599232     -0.0758011
          gleason |       0.0756782     -0.0451293
            pgg45 |       0.0017523      0.0043876
------------------+--------------------------------
mreldif=2.04893846117e-15. tolerance = .00001

__000000[1,7]
         lcavol    lweight       lbph        svi        lcp    gleason
lpsa  .26532759  .40881726  .02074575  .40978838  .05992318  .07567817

          pgg45
lpsa  .00175228

__000001[1,7]
         lcavol    lweight       lbph        svi        lcp    gleason
lpsa  .26532759  .40881726  .02074575  .40978838  .05992318  .07567817

          pgg45
lpsa  .00175228

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.200)
------------------+--------------------------------
           lcavol |       0.2598807      0.5535944
          lweight |       0.4026762      0.5667678
              svi |       0.3583977      0.6707658
              lcp |       0.0428370     -0.0726380
          gleason |       0.0845143     -0.0918042
            pgg45 |       0.0007692      0.0057395
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.200)
------------------+--------------------------------
           lcavol |       0.2598807      0.5535944
          lweight |       0.4026762      0.5667678
              svi |       0.3583977      0.6707658
              lcp |       0.0428370     -0.0726380
          gleason |       0.0845143     -0.0918042
            pgg45 |       0.0007692      0.0057395
------------------+--------------------------------
mreldif=1.38513098233e-15. tolerance = .00001

__000000[1,6]
         lcavol    lweight        svi        lcp    gleason      pgg45
lpsa  .25988069  .40267622  .35839773  .04283702  .08451431  .00076919

__000001[1,6]
         lcavol    lweight        svi        lcp    gleason      pgg45
lpsa  .25988069  .40267622  .35839773  .04283702  .08451431  .00076919

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.300)
------------------+--------------------------------
           lcavol |       0.2544176      0.5489208
          lweight |       0.3862462      0.4941034
              svi |       0.3075309      0.6970833
              lcp |       0.0218660     -0.0145714
          gleason |       0.0975635     -0.0298350
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.300)
------------------+--------------------------------
           lcavol |       0.2544176      0.5489208
          lweight |       0.3862462      0.4941034
              svi |       0.3075309      0.6970833
              lcp |       0.0218660     -0.0145714
          gleason |       0.0975635     -0.0298350
------------------+--------------------------------
mreldif=1.92212268212e-15. tolerance = .00001

__000000[1,5]
         lcavol    lweight        svi        lcp    gleason
lpsa  .25441759   .3862462  .30753088    .021866  .09756347

__000001[1,5]
         lcavol    lweight        svi        lcp    gleason
lpsa  .25441759   .3862462  .30753088    .021866  .09756347

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.400)
------------------+--------------------------------
           lcavol |       0.2463585      0.5411928
          lweight |       0.3759489      0.5016112
              svi |       0.2408201      0.6758092
          gleason |       0.1054567     -0.0313003
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.400)
------------------+--------------------------------
           lcavol |       0.2463585      0.5411928
          lweight |       0.3759489      0.5016112
              svi |       0.2408201      0.6758092
          gleason |       0.1054567     -0.0313003
------------------+--------------------------------
mreldif=1.77513176262e-15. tolerance = .00001

__000000[1,4]
         lcavol    lweight        svi    gleason
lpsa  .24635851  .37594893  .24082005  .10545672

__000001[1,4]
         lcavol    lweight        svi    gleason
lpsa  .24635851  .37594893  .24082005  .10545672

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.2293091      0.5411928
          lweight |       0.3729941      0.5016112
              svi |       0.1406780      0.6758092
          gleason |       0.1127689     -0.0313003
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.2293091      0.5411928
          lweight |       0.3729941      0.5016112
              svi |       0.1406780      0.6758092
          gleason |       0.1127689     -0.0313003
------------------+--------------------------------
mreldif=1.01076823612e-15. tolerance = .00001

__000000[1,4]
         lcavol    lweight        svi    gleason
lpsa  .22930909  .37299406  .14067804  .11276885

__000001[1,4]
         lcavol    lweight        svi    gleason
lpsa  .22930909  .37299406  .14067804  .11276885

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.600)
------------------+--------------------------------
           lcavol |       0.2116613      0.5411928
          lweight |       0.3687679      0.5016112
              svi |       0.0288918      0.6758092
          gleason |       0.1212816     -0.0313003
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.600)
------------------+--------------------------------
           lcavol |       0.2116613      0.5411928
          lweight |       0.3687679      0.5016112
              svi |       0.0288918      0.6758092
          gleason |       0.1212816     -0.0313003
------------------+--------------------------------
mreldif=2.06833365771e-15. tolerance = .00001

__000000[1,4]
         lcavol    lweight        svi    gleason
lpsa  .21166133   .3687679  .02889176  .12128162

__000001[1,4]
         lcavol    lweight        svi    gleason
lpsa  .21166133   .3687679  .02889176  .12128162

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.700)
------------------+--------------------------------
           lcavol |       0.1792265      0.6669792
          lweight |       0.3664563      0.4700476
          gleason |       0.1290346     -0.0175614
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.700)
------------------+--------------------------------
           lcavol |       0.1792265      0.6669792
          lweight |       0.3664563      0.4700476
          gleason |       0.1290346     -0.0175614
------------------+--------------------------------
mreldif=1.94996003013e-15. tolerance = .00001

__000000[1,3]
         lcavol    lweight    gleason
lpsa  .17922646  .36645635  .12903462

__000001[1,3]
         lcavol    lweight    gleason
lpsa  .17922646  .36645635  .12903462

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.800)
------------------+--------------------------------
           lcavol |       0.1373977      0.6669792
          lweight |       0.3643042      0.4700476
          gleason |       0.1376707     -0.0175614
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.800)
------------------+--------------------------------
           lcavol |       0.1373977      0.6669792
          lweight |       0.3643042      0.4700476
          gleason |       0.1376707     -0.0175614
------------------+--------------------------------
mreldif=3.33643656938e-15. tolerance = .00001

__000000[1,3]
         lcavol    lweight    gleason
lpsa  .13739766  .36430419  .13767067

__000001[1,3]
         lcavol    lweight    gleason
lpsa  .13739766  .36430419  .13767067

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.900)
------------------+--------------------------------
           lcavol |       0.0889099      0.6669792
          lweight |       0.3609259      0.4700476
          gleason |       0.1483410     -0.0175614
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.900)
------------------+--------------------------------
           lcavol |       0.0889099      0.6669792
          lweight |       0.3609259      0.4700476
          gleason |       0.1483410     -0.0175614
------------------+--------------------------------
mreldif=3.14077253972e-15. tolerance = .00001

__000000[1,3]
         lcavol    lweight    gleason
lpsa  .08890986  .36092588  .14834096

__000001[1,3]
         lcavol    lweight    gleason
lpsa  .08890986  .36092588  .14834096

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.100)
------------------+--------------------------------
           lcavol |       0.2572413      0.5535850
          lweight |       0.4048282      0.4823154
             lbph |       0.0183599      0.0802044
              svi |       0.3988306      0.7341959
              lcp |       0.0598981     -0.0758011
          gleason |       0.0799170     -0.0451293
            pgg45 |       0.0017007      0.0043876
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.100)
------------------+--------------------------------
           lcavol |       0.2572413      0.5535850
          lweight |       0.4048282      0.4823154
             lbph |       0.0183599      0.0802044
              svi |       0.3988306      0.7341959
              lcp |       0.0598981     -0.0758011
          gleason |       0.0799170     -0.0451293
            pgg45 |       0.0017007      0.0043876
------------------+--------------------------------
mreldif=1.22495098155e-15. tolerance = .00001

__000000[1,7]
         lcavol    lweight       lbph        svi        lcp    gleason
lpsa  .25724127   .4048282  .01835993  .39883057  .05989814  .07991701

          pgg45
lpsa  .00170069

__000001[1,7]
         lcavol    lweight       lbph        svi        lcp    gleason
lpsa  .25724127   .4048282  .01835993  .39883057  .05989814  .07991701

          pgg45
lpsa  .00170069

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.200)
------------------+--------------------------------
           lcavol |       0.2507767      0.5535944
          lweight |       0.3968287      0.5667678
              svi |       0.3455199      0.6707658
              lcp |       0.0420683     -0.0726380
          gleason |       0.0901210     -0.0918042
            pgg45 |       0.0006555      0.0057395
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.200)
------------------+--------------------------------
           lcavol |       0.2507767      0.5535944
          lweight |       0.3968287      0.5667678
              svi |       0.3455199      0.6707658
              lcp |       0.0420683     -0.0726380
          gleason |       0.0901210     -0.0918042
            pgg45 |       0.0006555      0.0057395
------------------+--------------------------------
mreldif=6.35853480996e-16. tolerance = .00001

__000000[1,6]
         lcavol    lweight        svi        lcp    gleason      pgg45
lpsa  .25077673  .39682874  .34551986   .0420683  .09012098  .00065548

__000001[1,6]
         lcavol    lweight        svi        lcp    gleason      pgg45
lpsa  .25077673  .39682874  .34551986   .0420683  .09012098  .00065548

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.300)
------------------+--------------------------------
           lcavol |       0.2439408      0.5489208
          lweight |       0.3810746      0.4941034
              svi |       0.2902495      0.6970833
              lcp |       0.0194914     -0.0145714
          gleason |       0.1027015     -0.0298350
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.300)
------------------+--------------------------------
           lcavol |       0.2439408      0.5489208
          lweight |       0.3810746      0.4941034
              svi |       0.2902495      0.6970833
              lcp |       0.0194914     -0.0145714
          gleason |       0.1027015     -0.0298350
------------------+--------------------------------
mreldif=1.32640772625e-15. tolerance = .00001

__000000[1,5]
         lcavol    lweight        svi        lcp    gleason
lpsa  .24394083  .38107458  .29024953  .01949143   .1027015

__000001[1,5]
         lcavol    lweight        svi        lcp    gleason
lpsa  .24394083  .38107458  .29024953  .01949143   .1027015

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.400)
------------------+--------------------------------
           lcavol |       0.2333011      0.5411928
          lweight |       0.3715043      0.5016112
              svi |       0.2158809      0.6758092
          gleason |       0.1109584     -0.0313003
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.400)
------------------+--------------------------------
           lcavol |       0.2333011      0.5411928
          lweight |       0.3715043      0.5016112
              svi |       0.2158809      0.6758092
          gleason |       0.1109584     -0.0313003
------------------+--------------------------------
mreldif=1.05234080446e-15. tolerance = .00001

__000000[1,4]
         lcavol    lweight        svi    gleason
lpsa   .2333011  .37150429  .21588085  .11095842

__000001[1,4]
         lcavol    lweight        svi    gleason
lpsa   .2333011  .37150429  .21588085  .11095842

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.2145055      0.5411928
          lweight |       0.3681368      0.5016112
              svi |       0.1101472      0.6758092
          gleason |       0.1189633     -0.0313003
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.2145055      0.5411928
          lweight |       0.3681368      0.5016112
              svi |       0.1101472      0.6758092
          gleason |       0.1189633     -0.0313003
------------------+--------------------------------
mreldif=9.73782456729e-16. tolerance = .00001

__000000[1,4]
         lcavol    lweight        svi    gleason
lpsa  .21450548  .36813682  .11014716  .11896328

__000001[1,4]
         lcavol    lweight        svi    gleason
lpsa  .21450548  .36813682  .11014716  .11896328

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.600)
------------------+--------------------------------
           lcavol |       0.1937486      0.6669792
          lweight |       0.3636172      0.4700476
          gleason |       0.1281434     -0.0175614
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.600)
------------------+--------------------------------
           lcavol |       0.1937486      0.6669792
          lweight |       0.3636172      0.4700476
          gleason |       0.1281434     -0.0175614
------------------+--------------------------------
mreldif=2.44252492515e-15. tolerance = .00001

__000000[1,3]
         lcavol    lweight    gleason
lpsa  .19374858  .36361723  .12814344

__000001[1,3]
         lcavol    lweight    gleason
lpsa  .19374858  .36361723  .12814344

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.700)
------------------+--------------------------------
           lcavol |       0.1537930      0.6669792
          lweight |       0.3618203      0.4700476
          gleason |       0.1361247     -0.0175614
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.700)
------------------+--------------------------------
           lcavol |       0.1537930      0.6669792
          lweight |       0.3618203      0.4700476
          gleason |       0.1361247     -0.0175614
------------------+--------------------------------
mreldif=1.99736081584e-15. tolerance = .00001

__000000[1,3]
         lcavol    lweight    gleason
lpsa  .15379303  .36182025  .13612467

__000001[1,3]
         lcavol    lweight    gleason
lpsa  .15379303  .36182025  .13612467

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.800)
------------------+--------------------------------
           lcavol |       0.1076205      0.6669792
          lweight |       0.3590083      0.4700476
          gleason |       0.1459351     -0.0175614
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.800)
------------------+--------------------------------
           lcavol |       0.1076205      0.6669792
          lweight |       0.3590083      0.4700476
          gleason |       0.1459351     -0.0175614
------------------+--------------------------------
mreldif=1.06201697262e-15. tolerance = .00001

__000000[1,3]
         lcavol    lweight    gleason
lpsa  .10762048  .35900835   .1459351

__000001[1,3]
         lcavol    lweight    gleason
lpsa  .10762048  .35900835   .1459351

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.900)
------------------+--------------------------------
           lcavol |       0.0536456      0.6669792
          lweight |       0.3546906      0.4700476
          gleason |       0.1581663     -0.0175614
------------------+--------------------------------

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.900)
------------------+--------------------------------
           lcavol |       0.0536456      0.6669792
          lweight |       0.3546906      0.4700476
          gleason |       0.1581663     -0.0175614
------------------+--------------------------------
mreldif=3.11425179534e-15. tolerance = .00001

__000000[1,3]
         lcavol    lweight    gleason
lpsa  .05364565  .35469056  .15816625

__000001[1,3]
         lcavol    lweight    gleason
lpsa  .05364565  .35469056  .15816625
r; t=2.63 22:18:23

. *
.
. ********************************************************************************
. *** verify ridge regression results                                                                                      ***
. ********************************************************************************
.
. lasso2 $model, l(150) alpha(0) unitload

------------------+--------------------------------
         Selected |           Ridge   Post-est OLS
------------------+--------------------------------
           lcavol |       0.3413876      0.5643413
          lweight |       0.1295708      0.6220198
              age |      -0.0048340     -0.0212482
             lbph |       0.0876173      0.0967125
              svi |       0.1114871      0.7616733
              lcp |       0.1046020     -0.1060509
          gleason |       0.0093952      0.0492279
            pgg45 |       0.0066739      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.6157065      0.1815609
------------------+--------------------------------
r; t=0.01 22:18:23

. mat A = e(beta)
r; t=0.00 22:18:23

. mat A = A[1,1..8] // excl intercept
r; t=0.00 22:18:23

.
. estridge $model, l(150)

__000000[1,8]
            c1          c2          c3          c4          c5          c6
r1   .34138756   .12957082  -.00483404   .08761725   .11148709   .10460204

            c7          c8
r1   .00939524   .00667394
r; t=0.04 22:18:23

. mat B = r(bhat)
r; t=0.00 22:18:23

.
. comparemat A B , tol(10e-6)
mreldif=8.27667601929e-17. tolerance = .00001

__000000[1,8]
          lcavol     lweight         age        lbph         svi         lcp
lpsa   .34138756   .12957082  -.00483404   .08761725   .11148709   .10460204

         gleason       pgg45
lpsa   .00939524   .00667394

__000001[1,8]
            c1          c2          c3          c4          c5          c6
r1   .34138756   .12957082  -.00483404   .08761725   .11148709   .10460204

            c7          c8
r1   .00939524   .00667394
r; t=0.00 22:18:23

.
.
. ********************************************************************************
. *** verify post-estimation OLS results                                                                           ***
. ********************************************************************************
.
. * lasso
. foreach i of numlist 0.5 1 4 10 15 50 150 {
  2.         lasso2 $model, l(`i') ols
  3.         mat A = e(b)
  4.         reg lpsa `e(selected)'
  5.         mat B = e(b)
  6.         comparemat A B
  7. }

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5581488      0.5643413
          lweight |       0.6164927      0.6220198
              age |      -0.0202327     -0.0212482
             lbph |       0.0941102      0.0967125
              svi |       0.7439266      0.7616733
              lcp |      -0.0936115     -0.1060509
          gleason |       0.0454534      0.0492279
            pgg45 |       0.0042258      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1825967      0.1815609
------------------+--------------------------------

      Source |       SS           df       MS      Number of obs   =        97
-------------+----------------------------------   F(8, 88)        =     21.68
       Model |  84.8592398         8   10.607405   Prob > F        =    0.0000
    Residual |  43.0584188        88  .489300213   R-squared       =    0.6634
-------------+----------------------------------   Adj R-squared   =    0.6328
       Total |  127.917659        96  1.33247561   Root MSE        =     .6995

-------------+----------------------------------------------------------------
         lpsa |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
      lcavol |    .5643413    .0878335      6.43    0.000      .3897908     .7388918
     lweight |    .6220198    .2008967      3.10    0.003      .2227799      1.02126
         age |   -.0212482    .0110841     -1.92    0.058     -.0432755     .0007791
        lbph |    .0967125    .0579127      1.67    0.098     -.0183768     .2118018
         svi |    .7616733    .2411757      3.16    0.002      .2823873     1.240959
         lcp |   -.1060509     .089868     -1.18    0.241     -.2846446     .0725427
     gleason |    .0492279    .1553407      0.32    0.752      -.259479     .3579349
       pgg45 |    .0044575    .0043653      1.02    0.310     -.0042177     .0131327
       _cons |    .1815609    1.320568      0.14    0.891     -2.442791     2.805913
-------------+----------------------------------------------------------------
mreldif=1.50339849896e-15. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
y1   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
y1   .04922792   .00445751   .18156087

__000001[1,9]
        lcavol     lweight         age        lbph         svi         lcp
y1   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
y1   .04922792   .00445751   .18156087

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5519564      0.5643413
          lweight |       0.6109655      0.6220198
              age |      -0.0192173     -0.0212482
             lbph |       0.0915080      0.0967125
              svi |       0.7261799      0.7616733
              lcp |      -0.0811722     -0.1060509
          gleason |       0.0416790      0.0492279
            pgg45 |       0.0039941      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1836326      0.1815609
------------------+--------------------------------

      Source |       SS           df       MS      Number of obs   =        97
-------------+----------------------------------   F(8, 88)        =     21.68
       Model |  84.8592398         8   10.607405   Prob > F        =    0.0000
    Residual |  43.0584188        88  .489300213   R-squared       =    0.6634
-------------+----------------------------------   Adj R-squared   =    0.6328
       Total |  127.917659        96  1.33247561   Root MSE        =     .6995

-------------+----------------------------------------------------------------
         lpsa |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
      lcavol |    .5643413    .0878335      6.43    0.000      .3897908     .7388918
     lweight |    .6220198    .2008967      3.10    0.003      .2227799      1.02126
         age |   -.0212482    .0110841     -1.92    0.058     -.0432755     .0007791
        lbph |    .0967125    .0579127      1.67    0.098     -.0183768     .2118018
         svi |    .7616733    .2411757      3.16    0.002      .2823873     1.240959
         lcp |   -.1060509     .089868     -1.18    0.241     -.2846446     .0725427
     gleason |    .0492279    .1553407      0.32    0.752      -.259479     .3579349
       pgg45 |    .0044575    .0043653      1.02    0.310     -.0042177     .0131327
       _cons |    .1815609    1.320568      0.14    0.891     -2.442791     2.805913
-------------+----------------------------------------------------------------
mreldif=1.50339849896e-15. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
y1   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
y1   .04922792   .00445751   .18156087

__000001[1,9]
        lcavol     lweight         age        lbph         svi         lcp
y1   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
y1   .04922792   .00445751   .18156087

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5148017      0.5643413
          lweight |       0.5778027      0.6220198
              age |      -0.0131245     -0.0212482
             lbph |       0.0758942      0.0967125
              svi |       0.6196996      0.7616733
              lcp |      -0.0065358     -0.1060509
          gleason |       0.0190321      0.0492279
            pgg45 |       0.0026038      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1898476      0.1815609
------------------+--------------------------------

      Source |       SS           df       MS      Number of obs   =        97
-------------+----------------------------------   F(8, 88)        =     21.68
       Model |  84.8592398         8   10.607405   Prob > F        =    0.0000
    Residual |  43.0584188        88  .489300213   R-squared       =    0.6634
-------------+----------------------------------   Adj R-squared   =    0.6328
       Total |  127.917659        96  1.33247561   Root MSE        =     .6995

-------------+----------------------------------------------------------------
         lpsa |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
      lcavol |    .5643413    .0878335      6.43    0.000      .3897908     .7388918
     lweight |    .6220198    .2008967      3.10    0.003      .2227799      1.02126
         age |   -.0212482    .0110841     -1.92    0.058     -.0432755     .0007791
        lbph |    .0967125    .0579127      1.67    0.098     -.0183768     .2118018
         svi |    .7616733    .2411757      3.16    0.002      .2823873     1.240959
         lcp |   -.1060509     .089868     -1.18    0.241     -.2846446     .0725427
     gleason |    .0492279    .1553407      0.32    0.752      -.259479     .3579349
       pgg45 |    .0044575    .0043653      1.02    0.310     -.0042177     .0131327
       _cons |    .1815609    1.320568      0.14    0.891     -2.442791     2.805913
-------------+----------------------------------------------------------------
mreldif=1.50339849896e-15. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
y1   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
y1   .04922792   .00445751   .18156087

__000001[1,9]
        lcavol     lweight         age        lbph         svi         lcp
y1   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
y1   .04922792   .00445751   .18156087

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5000819      0.5234981
          lweight |       0.5144276      0.6152349
              age |      -0.0036627     -0.0190343
             lbph |       0.0468469      0.0954908
              svi |       0.5695171      0.6358643
            pgg45 |       0.0017981      0.0035248
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.0014767      0.5214696
------------------+--------------------------------

      Source |       SS           df       MS      Number of obs   =        97
-------------+----------------------------------   F(6, 90)        =     28.83
       Model |  84.1416846         6  14.0236141   Prob > F        =    0.0000
    Residual |   43.775974        90  .486399711   R-squared       =    0.6578
-------------+----------------------------------   Adj R-squared   =    0.6350
       Total |  127.917659        96  1.33247561   Root MSE        =    .69742

-------------+----------------------------------------------------------------
         lpsa |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
      lcavol |    .5234981    .0765365      6.84    0.000       .371445     .6755512
     lweight |    .6152349    .1988668      3.09    0.003      .2201512     1.010319
         age |   -.0190343    .0108835     -1.75    0.084     -.0406563     .0025876
        lbph |    .0954908    .0576838      1.66    0.101     -.0191082     .2100897
         svi |    .6358643    .2169959      2.93    0.004      .2047641     1.066964
       pgg45 |    .0035248    .0030243      1.17    0.247     -.0024836     .0095332
       _cons |    .5214696     .875099      0.60    0.553     -1.217067     2.260006
-------------+----------------------------------------------------------------
mreldif=2.48099495134e-15. tolerance = .01

__000000[1,7]
        lcavol     lweight         age        lbph         svi       pgg45
y1    .5234981   .61523487  -.01903435   .09549075   .63586426   .00352484

         _cons
y1   .52146955

__000001[1,7]
        lcavol     lweight         age        lbph         svi       pgg45
y1    .5234981   .61523487  -.01903435   .09549075   .63586426   .00352484

         _cons
y1   .52146955

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.4906822      0.5125769
          lweight |       0.4780066      0.5490809
             lbph |       0.0274582      0.0721513
              svi |       0.5334350      0.6496250
            pgg45 |       0.0011629      0.0024450
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.0652929     -0.4136749
------------------+--------------------------------

      Source |       SS           df       MS      Number of obs   =        97
-------------+----------------------------------   F(5, 91)        =     33.23
       Model |  82.6539214         5  16.5307843   Prob > F        =    0.0000
    Residual |  45.2637372        91  .497403705   R-squared       =    0.6461
-------------+----------------------------------   Adj R-squared   =    0.6267
       Total |  127.917659        96  1.33247561   Root MSE        =    .70527

-------------+----------------------------------------------------------------
         lpsa |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
      lcavol |    .5125769    .0771394      6.64    0.000      .3593489     .6658048
     lweight |    .5490809    .1974325      2.78    0.007      .1569056     .9412563
        lbph |    .0721513    .0567501      1.27    0.207     -.0405759     .1848785
         svi |     .649625    .2192924      2.96    0.004      .2140275     1.085223
       pgg45 |     .002445     .002994      0.82    0.416     -.0035021     .0083922
       _cons |   -.4136749    .7005378     -0.59    0.556     -1.805207     .9778574
-------------+----------------------------------------------------------------
mreldif=2.82724321934e-15. tolerance = .01

__000000[1,6]
        lcavol     lweight        lbph         svi       pgg45       _cons
y1   .51257686   .54908093   .07215128   .64962503   .00244504  -.41367494

__000001[1,6]
        lcavol     lweight        lbph         svi       pgg45       _cons
y1   .51257686   .54908093   .07215128   .64962503   .00244504  -.41367494

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.4304339      0.5258519
          lweight |       0.1913114      0.6617699
              svi |       0.2619092      0.6656665
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.1463368     -0.7771568
------------------+--------------------------------

      Source |       SS           df       MS      Number of obs   =        97
-------------+----------------------------------   F(3, 93)        =     54.15
       Model |  81.3492223         3  27.1164074   Prob > F        =    0.0000
    Residual |  46.5684363        93  .500735874   R-squared       =    0.6359
-------------+----------------------------------   Adj R-squared   =    0.6242
       Total |  127.917659        96  1.33247561   Root MSE        =    .70763

-------------+----------------------------------------------------------------
         lpsa |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
      lcavol |    .5258519    .0748632      7.02    0.000      .3771884     .6745154
     lweight |    .6617699    .1756352      3.77    0.000      .3129933     1.010547
         svi |    .6656665    .2070898      3.21    0.002      .2544271     1.076906
       _cons |   -.7771568    .6229995     -1.25    0.215      -2.01431     .4599967
-------------+----------------------------------------------------------------
mreldif=6.66533800803e-16. tolerance = .01

__000000[1,4]
        lcavol     lweight         svi       _cons
y1    .5258519   .66176995    .6656665  -.77715676

__000001[1,4]
        lcavol     lweight         svi       _cons
y1    .5258519   .66176995    .6656665  -.77715676

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.0598973      0.7193204
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.3975250      1.5072975
------------------+--------------------------------

      Source |       SS           df       MS      Number of obs   =        97
-------------+----------------------------------   F(1, 95)        =    111.27
       Model |  69.0028752         1  69.0028752   Prob > F        =    0.0000
    Residual |  58.9147834        95  .620155614   R-squared       =    0.5394
-------------+----------------------------------   Adj R-squared   =    0.5346
       Total |  127.917659        96  1.33247561   Root MSE        =     .7875

-------------+----------------------------------------------------------------
         lpsa |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
      lcavol |    .7193204    .0681929     10.55    0.000      .5839404     .8547004
       _cons |    1.507297    .1219369     12.36    0.000      1.265222     1.749373
-------------+----------------------------------------------------------------
mreldif=8.85593387286e-17. tolerance = .01

__000000[1,2]
       lcavol      _cons
y1  .71932039  1.5072975

__000001[1,2]
       lcavol      _cons
y1  .71932039  1.5072975
r; t=0.44 22:18:23

. *
.
. * lasso (w/o constant)
. foreach i of numlist 0.5 1 4 10 15 50 150 {
  2.         lasso2 $model, l(`i') ols nocons
  3.         mat A = e(b)
  4.         reg lpsa `e(selected)', nocons
  5.         mat B = e(b)
  6.         comparemat A B
  7. }

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5553982      0.5616062
          lweight |       0.6308920      0.6363374
              age |      -0.0197328     -0.0207511
             lbph |       0.0912762      0.0938945
              svi |       0.7458558      0.7635916
              lcp |      -0.0941870     -0.1066232
          gleason |       0.0614974      0.0651808
            pgg45 |       0.0039397      0.0041730
------------------+--------------------------------

      Source |       SS           df       MS      Number of obs   =        97
-------------+----------------------------------   F(8, 89)        =    175.83
       Model |   680.66294         8  85.0828675   Prob > F        =    0.0000
    Residual |  43.0676679        89   .48390638   R-squared       =    0.9405
-------------+----------------------------------   Adj R-squared   =    0.9351
       Total |  723.730608        97  7.46114029   Root MSE        =    .69563

-------------+----------------------------------------------------------------
         lpsa |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
      lcavol |    .5616062    .0850781      6.60    0.000      .3925578     .7306547
     lweight |    .6363374     .170849      3.72    0.000       .296864     .9758108
         age |   -.0207511    .0104199     -1.99    0.049     -.0414552     -.000047
        lbph |    .0938945     .053865      1.74    0.085      -.013134     .2009231
         svi |    .7635916     .239441      3.19    0.002      .2878274     1.239356
         lcp |   -.1066232    .0892754     -1.19    0.236     -.2840114     .0707651
     gleason |    .0651808    .1027116      0.63    0.527     -.1389049     .2692665
       pgg45 |     .004173    .0038226      1.09    0.278     -.0034224     .0117685
-------------+----------------------------------------------------------------
mreldif=2.30683369091e-14. tolerance = .01

__000000[1,8]
        lcavol     lweight         age        lbph         svi         lcp
y1   .56160623   .63633742  -.02075109   .09389453   .76359163  -.10662316

       gleason       pgg45
y1   .06518082   .00417304

__000001[1,8]
        lcavol     lweight         age        lbph         svi         lcp
y1   .56160623   .63633742  -.02075109   .09389453   .76359163  -.10662316

       gleason       pgg45
y1   .06518082   .00417304

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5491901      0.5616062
          lweight |       0.6254465      0.6363374
              age |      -0.0187145     -0.0207511
             lbph |       0.0886578      0.0938945
              svi |       0.7281201      0.7635916
              lcp |      -0.0817509     -0.1066232
          gleason |       0.0578139      0.0651808
            pgg45 |       0.0037064      0.0041730
------------------+--------------------------------

      Source |       SS           df       MS      Number of obs   =        97
-------------+----------------------------------   F(8, 89)        =    175.83
       Model |   680.66294         8  85.0828675   Prob > F        =    0.0000
    Residual |  43.0676679        89   .48390638   R-squared       =    0.9405
-------------+----------------------------------   Adj R-squared   =    0.9351
       Total |  723.730608        97  7.46114029   Root MSE        =    .69563

-------------+----------------------------------------------------------------
         lpsa |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
      lcavol |    .5616062    .0850781      6.60    0.000      .3925578     .7306547
     lweight |    .6363374     .170849      3.72    0.000       .296864     .9758108
         age |   -.0207511    .0104199     -1.99    0.049     -.0414552     -.000047
        lbph |    .0938945     .053865      1.74    0.085      -.013134     .2009231
         svi |    .7635916     .239441      3.19    0.002      .2878274     1.239356
         lcp |   -.1066232    .0892754     -1.19    0.236     -.2840114     .0707651
     gleason |    .0651808    .1027116      0.63    0.527     -.1389049     .2692665
       pgg45 |     .004173    .0038226      1.09    0.278     -.0034224     .0117685
-------------+----------------------------------------------------------------
mreldif=2.30683369091e-14. tolerance = .01

__000000[1,8]
        lcavol     lweight         age        lbph         svi         lcp
y1   .56160623   .63633742  -.02075109   .09389453   .76359163  -.10662316

       gleason       pgg45
y1   .06518082   .00417304

__000001[1,8]
        lcavol     lweight         age        lbph         svi         lcp
y1   .56160623   .63633742  -.02075109   .09389453   .76359163  -.10662316

       gleason       pgg45
y1   .06518082   .00417304

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5119418      0.5616062
          lweight |       0.5927738      0.6363374
              age |      -0.0126047     -0.0207511
             lbph |       0.0729476      0.0938945
              svi |       0.6217054      0.7635916
              lcp |      -0.0071342     -0.1066232
          gleason |       0.0357131      0.0651808
            pgg45 |       0.0023063      0.0041730
------------------+--------------------------------

      Source |       SS           df       MS      Number of obs   =        97
-------------+----------------------------------   F(8, 89)        =    175.83
       Model |   680.66294         8  85.0828675   Prob > F        =    0.0000
    Residual |  43.0676679        89   .48390638   R-squared       =    0.9405
-------------+----------------------------------   Adj R-squared   =    0.9351
       Total |  723.730608        97  7.46114029   Root MSE        =    .69563

-------------+----------------------------------------------------------------
         lpsa |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
      lcavol |    .5616062    .0850781      6.60    0.000      .3925578     .7306547
     lweight |    .6363374     .170849      3.72    0.000       .296864     .9758108
         age |   -.0207511    .0104199     -1.99    0.049     -.0414552     -.000047
        lbph |    .0938945     .053865      1.74    0.085      -.013134     .2009231
         svi |    .7635916     .239441      3.19    0.002      .2878274     1.239356
         lcp |   -.1066232    .0892754     -1.19    0.236     -.2840114     .0707651
     gleason |    .0651808    .1027116      0.63    0.527     -.1389049     .2692665
       pgg45 |     .004173    .0038226      1.09    0.278     -.0034224     .0117685
-------------+----------------------------------------------------------------
mreldif=2.30683369091e-14. tolerance = .01

__000000[1,8]
        lcavol     lweight         age        lbph         svi         lcp
y1   .56160623   .63633742  -.02075109   .09389453   .76359163  -.10662316

       gleason       pgg45
y1   .06518082   .00417304

__000001[1,8]
        lcavol     lweight         age        lbph         svi         lcp
y1   .56160623   .63633742  -.02075109   .09389453   .76359163  -.10662316

       gleason       pgg45
y1   .06518082   .00417304

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5001030      0.5160584
          lweight |       0.5142093      0.6923228
              age |      -0.0036739     -0.0150717
             lbph |       0.0468951      0.0784921
              svi |       0.5695416      0.6272147
            pgg45 |       0.0017982      0.0034776
------------------+--------------------------------

      Source |       SS           df       MS      Number of obs   =        97
-------------+----------------------------------   F(6, 91)        =    234.59
       Model |  679.781917         6  113.296986   Prob > F        =    0.0000
    Residual |  43.9486917        91  .482952656   R-squared       =    0.9393
-------------+----------------------------------   Adj R-squared   =    0.9353
       Total |  723.730608        97  7.46114029   Root MSE        =    .69495

-------------+----------------------------------------------------------------
         lpsa |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
      lcavol |    .5160584    .0752433      6.86    0.000      .3665968     .6655199
     lweight |    .6923228    .1505031      4.60    0.000      .3933668     .9912788
         age |   -.0150717     .008585     -1.76    0.083     -.0321247     .0019814
        lbph |    .0784921    .0499587      1.57    0.120     -.0207446     .1777289
         svi |    .6272147    .2157413      2.91    0.005      .1986711     1.055758
       pgg45 |    .0034776    .0030126      1.15    0.251     -.0025065     .0094617
-------------+----------------------------------------------------------------
mreldif=1.75817384719e-14. tolerance = .01

__000000[1,6]
        lcavol     lweight         age        lbph         svi       pgg45
y1   .51605835   .69232281  -.01507165   .07849212   .62721473   .00347759

__000001[1,6]
        lcavol     lweight         age        lbph         svi       pgg45
y1   .51605835   .69232281  -.01507165   .07849212   .62721473   .00347759

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.4917144      0.5191166
          lweight |       0.4598523      0.4340615
             lbph |       0.0298837      0.0875188
              svi |       0.5357356      0.6642009
            pgg45 |       0.0011275      0.0022203
------------------+--------------------------------

      Source |       SS           df       MS      Number of obs   =        97
-------------+----------------------------------   F(5, 92)        =    274.68
       Model |  678.293425         5  135.658685   Prob > F        =    0.0000
    Residual |  45.4371832        92  .493882426   R-squared       =    0.9372
-------------+----------------------------------   Adj R-squared   =    0.9338
       Total |  723.730608        97  7.46114029   Root MSE        =    .70277

-------------+----------------------------------------------------------------
         lpsa |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
      lcavol |    .5191166    .0760696      6.82    0.000      .3680358     .6701973
     lweight |    .4340615    .0321415     13.50    0.000      .3702257     .4978972
        lbph |    .0875188    .0502525      1.74    0.085     -.0122871     .1873247
         svi |    .6642009    .2171262      3.06    0.003      .2329697     1.095432
       pgg45 |    .0022203    .0029591      0.75    0.455     -.0036568     .0080974
-------------+----------------------------------------------------------------
mreldif=1.02316850267e-15. tolerance = .01

__000000[1,5]
       lcavol    lweight       lbph        svi      pgg45
y1  .51911658  .43406146  .08751881  .66420095  .00222029

__000001[1,5]
       lcavol    lweight       lbph        svi      pgg45
y1  .51911658  .43406146  .08751881  .66420095  .00222029

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.4090696      0.5411928
          lweight |       0.4435476      0.5016112
              svi |       0.2485226      0.6758092
          gleason |       0.0371485     -0.0313003
------------------+--------------------------------

      Source |       SS           df       MS      Number of obs   =        97
-------------+----------------------------------   F(4, 93)        =    332.87
       Model |  676.480849         4  169.120212   Prob > F        =    0.0000
    Residual |  47.2497588        93  .508061923   R-squared       =    0.9347
-------------+----------------------------------   Adj R-squared   =    0.9319
       Total |  723.730608        97  7.46114029   Root MSE        =    .71278

-------------+----------------------------------------------------------------
         lpsa |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
      lcavol |    .5411928    .0755522      7.16    0.000      .3911611     .6912246
     lweight |    .5016112     .130243      3.85    0.000      .2429744     .7602479
         svi |    .6758092     .208936      3.23    0.002      .2609037     1.090715
     gleason |   -.0313003    .0713115     -0.44    0.662     -.1729108     .1103101
-------------+----------------------------------------------------------------
mreldif=1.21254143090e-14. tolerance = .01

__000000[1,4]
        lcavol     lweight         svi     gleason
y1   .54119284   .50161117   .67580918  -.03130035

__000001[1,4]
        lcavol     lweight         svi     gleason
y1   .54119284   .50161117   .67580918  -.03130035

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.0320208      0.6669792
          lweight |       0.3557261      0.4700476
          gleason |       0.1617255     -0.0175614
------------------+--------------------------------

      Source |       SS           df       MS      Number of obs   =        97
-------------+----------------------------------   F(3, 94)        =    400.07
       Model |  671.165421         3  223.721807   Prob > F        =    0.0000
    Residual |  52.5651874        94  .559204121   R-squared       =    0.9274
-------------+----------------------------------   Adj R-squared   =    0.9251
       Total |  723.730608        97  7.46114029   Root MSE        =     .7478

-------------+----------------------------------------------------------------
         lpsa |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
      lcavol |    .6669792    .0679571      9.81    0.000      .5320487     .8019097
     lweight |    .4700476     .136257      3.45    0.001      .1995061      .740589
     gleason |   -.0175614    .0746818     -0.24    0.815     -.1658438      .130721
-------------+----------------------------------------------------------------
mreldif=1.17438157933e-14. tolerance = .01

__000000[1,3]
        lcavol     lweight     gleason
y1   .66697918   .47004758  -.01756143

__000001[1,3]
        lcavol     lweight     gleason
y1   .66697918   .47004758  -.01756143
r; t=0.28 22:18:24

. *
.
. * sqrt lasso
. foreach i of numlist 0.5 1 4 10 15 50 150 {
  2.         lasso2 $model, l(`i') ols sqrt
  3.         mat A = e(b)
  4.         reg lpsa `e(selected)'
  5.         mat B = e(b)
  6.         comparemat A B
  7. }

------------------+--------------------------------
         Selected |      Sqrt-lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5560874      0.5643413
          lweight |       0.6146527      0.6220198
              age |      -0.0198947     -0.0212482
             lbph |       0.0932440      0.0967125
              svi |       0.7380188      0.7616733
              lcp |      -0.0894705     -0.1060509
          gleason |       0.0441969      0.0492279
            pgg45 |       0.0041487      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1829415      0.1815609
------------------+--------------------------------

      Source |       SS           df       MS      Number of obs   =        97
-------------+----------------------------------   F(8, 88)        =     21.68
       Model |  84.8592398         8   10.607405   Prob > F        =    0.0000
    Residual |  43.0584188        88  .489300213   R-squared       =    0.6634
-------------+----------------------------------   Adj R-squared   =    0.6328
       Total |  127.917659        96  1.33247561   Root MSE        =     .6995

-------------+----------------------------------------------------------------
         lpsa |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
      lcavol |    .5643413    .0878335      6.43    0.000      .3897908     .7388918
     lweight |    .6220198    .2008967      3.10    0.003      .2227799      1.02126
         age |   -.0212482    .0110841     -1.92    0.058     -.0432755     .0007791
        lbph |    .0967125    .0579127      1.67    0.098     -.0183768     .2118018
         svi |    .7616733    .2411757      3.16    0.002      .2823873     1.240959
         lcp |   -.1060509     .089868     -1.18    0.241     -.2846446     .0725427
     gleason |    .0492279    .1553407      0.32    0.752      -.259479     .3579349
       pgg45 |    .0044575    .0043653      1.02    0.310     -.0042177     .0131327
       _cons |    .1815609    1.320568      0.14    0.891     -2.442791     2.805913
-------------+----------------------------------------------------------------
mreldif=1.50339849896e-15. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
y1   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
y1   .04922792   .00445751   .18156087

__000001[1,9]
        lcavol     lweight         age        lbph         svi         lcp
y1   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
y1   .04922792   .00445751   .18156087

------------------+--------------------------------
         Selected |      Sqrt-lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5478195      0.5643413
          lweight |       0.6072731      0.6220198
              age |      -0.0185389     -0.0212482
             lbph |       0.0897695      0.0967125
              svi |       0.7143242      0.7616733
              lcp |      -0.0728620     -0.1060509
          gleason |       0.0391574      0.0492279
            pgg45 |       0.0038393      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1843246      0.1815609
------------------+--------------------------------

      Source |       SS           df       MS      Number of obs   =        97
-------------+----------------------------------   F(8, 88)        =     21.68
       Model |  84.8592398         8   10.607405   Prob > F        =    0.0000
    Residual |  43.0584188        88  .489300213   R-squared       =    0.6634
-------------+----------------------------------   Adj R-squared   =    0.6328
       Total |  127.917659        96  1.33247561   Root MSE        =     .6995

-------------+----------------------------------------------------------------
         lpsa |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
      lcavol |    .5643413    .0878335      6.43    0.000      .3897908     .7388918
     lweight |    .6220198    .2008967      3.10    0.003      .2227799      1.02126
         age |   -.0212482    .0110841     -1.92    0.058     -.0432755     .0007791
        lbph |    .0967125    .0579127      1.67    0.098     -.0183768     .2118018
         svi |    .7616733    .2411757      3.16    0.002      .2823873     1.240959
         lcp |   -.1060509     .089868     -1.18    0.241     -.2846446     .0725427
     gleason |    .0492279    .1553407      0.32    0.752      -.259479     .3579349
       pgg45 |    .0044575    .0043653      1.02    0.310     -.0042177     .0131327
       _cons |    .1815609    1.320568      0.14    0.891     -2.442791     2.805913
-------------+----------------------------------------------------------------
mreldif=1.50339849896e-15. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
y1   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
y1   .04922792   .00445751   .18156087

__000001[1,9]
        lcavol     lweight         age        lbph         svi         lcp
y1   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
y1   .04922792   .00445751   .18156087

------------------+--------------------------------
         Selected |      Sqrt-lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5096550      0.5186256
          lweight |       0.5623653      0.6217574
              age |      -0.0107953     -0.0193045
             lbph |       0.0690709      0.0949255
              svi |       0.6017085      0.6427775
          gleason |       0.0103212      0.0422021
            pgg45 |       0.0024062      0.0027656
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1734499      0.2537330
------------------+--------------------------------

      Source |       SS           df       MS      Number of obs   =        97
-------------+----------------------------------   F(7, 89)        =     24.47
       Model |  84.1778515         7  12.0254074   Prob > F        =    0.0000
    Residual |  43.7398071        89  .491458507   R-squared       =    0.6581
-------------+----------------------------------   Adj R-squared   =    0.6312
       Total |  127.917659        96  1.33247561   Root MSE        =    .70104

-------------+----------------------------------------------------------------
         lpsa |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
      lcavol |    .5186256    .0790023      6.56    0.000      .3616497     .6756016
     lweight |    .6217574    .2013391      3.09    0.003      .2217009     1.021814
         age |   -.0193045    .0109852     -1.76    0.082     -.0411319     .0025228
        lbph |    .0949255    .0580204      1.64    0.105     -.0203599     .2102108
         svi |    .6427775    .2196051      2.93    0.004      .2064269     1.079128
     gleason |    .0422021    .1555685      0.27    0.787     -.2669092     .3513134
       pgg45 |    .0027656    .0041322      0.67    0.505     -.0054451     .0109763
       _cons |     .253733    1.322057      0.19    0.848     -2.373167     2.880633
-------------+----------------------------------------------------------------
mreldif=1.41685421082e-15. tolerance = .01

__000000[1,8]
        lcavol     lweight         age        lbph         svi     gleason
y1   .51862565   .62175742  -.01930454   .09492549    .6427775   .04220206

         pgg45       _cons
y1   .00276558   .25373297

__000001[1,8]
        lcavol     lweight         age        lbph         svi     gleason
y1   .51862565   .62175742  -.01930454   .09492549    .6427775   .04220206

         pgg45       _cons
y1   .00276558   .25373297

------------------+--------------------------------
         Selected |      Sqrt-lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.4923489      0.5125769
          lweight |       0.4834171      0.5490809
             lbph |       0.0308604      0.0721513
              svi |       0.5422799      0.6496250
            pgg45 |       0.0012605      0.0024450
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.0918135     -0.4136749
------------------+--------------------------------

      Source |       SS           df       MS      Number of obs   =        97
-------------+----------------------------------   F(5, 91)        =     33.23
       Model |  82.6539214         5  16.5307843   Prob > F        =    0.0000
    Residual |  45.2637372        91  .497403705   R-squared       =    0.6461
-------------+----------------------------------   Adj R-squared   =    0.6267
       Total |  127.917659        96  1.33247561   Root MSE        =    .70527

-------------+----------------------------------------------------------------
         lpsa |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
      lcavol |    .5125769    .0771394      6.64    0.000      .3593489     .6658048
     lweight |    .5490809    .1974325      2.78    0.007      .1569056     .9412563
        lbph |    .0721513    .0567501      1.27    0.207     -.0405759     .1848785
         svi |     .649625    .2192924      2.96    0.004      .2140275     1.085223
       pgg45 |     .002445     .002994      0.82    0.416     -.0035021     .0083922
       _cons |   -.4136749    .7005378     -0.59    0.556     -1.805207     .9778574
-------------+----------------------------------------------------------------
mreldif=2.82724321934e-15. tolerance = .01

__000000[1,6]
        lcavol     lweight        lbph         svi       pgg45       _cons
y1   .51257686   .54908093   .07215128   .64962503   .00244504  -.41367494

__000001[1,6]
        lcavol     lweight        lbph         svi       pgg45       _cons
y1   .51257686   .54908093   .07215128   .64962503   .00244504  -.41367494

------------------+--------------------------------
         Selected |      Sqrt-lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.4816717      0.5125769
          lweight |       0.4487569      0.5490809
             lbph |       0.0090653      0.0721513
              svi |       0.4856184      0.6496250
            pgg45 |       0.0006353      0.0024450
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.0780792     -0.4136749
------------------+--------------------------------

      Source |       SS           df       MS      Number of obs   =        97
-------------+----------------------------------   F(5, 91)        =     33.23
       Model |  82.6539214         5  16.5307843   Prob > F        =    0.0000
    Residual |  45.2637372        91  .497403705   R-squared       =    0.6461
-------------+----------------------------------   Adj R-squared   =    0.6267
       Total |  127.917659        96  1.33247561   Root MSE        =    .70527

-------------+----------------------------------------------------------------
         lpsa |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
      lcavol |    .5125769    .0771394      6.64    0.000      .3593489     .6658048
     lweight |    .5490809    .1974325      2.78    0.007      .1569056     .9412563
        lbph |    .0721513    .0567501      1.27    0.207     -.0405759     .1848785
         svi |     .649625    .2192924      2.96    0.004      .2140275     1.085223
       pgg45 |     .002445     .002994      0.82    0.416     -.0035021     .0083922
       _cons |   -.4136749    .7005378     -0.59    0.556     -1.805207     .9778574
-------------+----------------------------------------------------------------
mreldif=2.82724321934e-15. tolerance = .01

__000000[1,6]
        lcavol     lweight        lbph         svi       pgg45       _cons
y1   .51257686   .54908093   .07215128   .64962503   .00244504  -.41367494

__000001[1,6]
        lcavol     lweight        lbph         svi       pgg45       _cons
y1   .51257686   .54908093   .07215128   .64962503   .00244504  -.41367494

------------------+--------------------------------
         Selected |      Sqrt-lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.3195015      0.7193204
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.0470568      1.5072975
------------------+--------------------------------

      Source |       SS           df       MS      Number of obs   =        97
-------------+----------------------------------   F(1, 95)        =    111.27
       Model |  69.0028752         1  69.0028752   Prob > F        =    0.0000
    Residual |  58.9147834        95  .620155614   R-squared       =    0.5394
-------------+----------------------------------   Adj R-squared   =    0.5346
       Total |  127.917659        96  1.33247561   Root MSE        =     .7875

-------------+----------------------------------------------------------------
         lpsa |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
      lcavol |    .7193204    .0681929     10.55    0.000      .5839404     .8547004
       _cons |    1.507297    .1219369     12.36    0.000      1.265222     1.749373
-------------+----------------------------------------------------------------
mreldif=8.85593387286e-17. tolerance = .01

__000000[1,2]
       lcavol      _cons
y1  .71932039  1.5072975

__000001[1,2]
       lcavol      _cons
y1  .71932039  1.5072975

------------------+--------------------------------
         Selected |      Sqrt-lasso   Post-est OLS
------------------+--------------------------------
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.4783869      2.4783869
------------------+--------------------------------

      Source |       SS           df       MS      Number of obs   =        97
-------------+----------------------------------   F(0, 96)        =      0.00
       Model |           0         0           .   Prob > F        =         .
    Residual |  127.917659        96  1.33247561   R-squared       =    0.0000
-------------+----------------------------------   Adj R-squared   =    0.0000
       Total |  127.917659        96  1.33247561   Root MSE        =    1.1543

-------------+----------------------------------------------------------------
         lpsa |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
       _cons |    2.478387    .1172044     21.15    0.000      2.245738     2.711036
-------------+----------------------------------------------------------------
mreldif=0. tolerance = .01

symmetric __000000[1,1]
        _cons
y1  2.4783869

symmetric __000001[1,1]
        _cons
y1  2.4783869
r; t=0.22 22:18:24

. *
.
. * elastic net
. foreach i of numlist 0.5 1 4 10 15 50 150 {
  2.         lasso2 $model, l(`i') ols alpha(.5)
  3.         mat A = e(b)
  4.         reg lpsa `e(selected)'
  5.         mat B = e(b)
  6.         comparemat A B
  7. }

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.5596838      0.5643413
          lweight |       0.6190156      0.6220198
              age |      -0.0206453     -0.0212482
             lbph |       0.0951798      0.0967125
              svi |       0.7511351      0.7616733
              lcp |      -0.0982943     -0.1060509
          gleason |       0.0477464      0.0492279
            pgg45 |       0.0043140      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1775732      0.1815609
------------------+--------------------------------

      Source |       SS           df       MS      Number of obs   =        97
-------------+----------------------------------   F(8, 88)        =     21.68
       Model |  84.8592398         8   10.607405   Prob > F        =    0.0000
    Residual |  43.0584188        88  .489300213   R-squared       =    0.6634
-------------+----------------------------------   Adj R-squared   =    0.6328
       Total |  127.917659        96  1.33247561   Root MSE        =     .6995

-------------+----------------------------------------------------------------
         lpsa |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
      lcavol |    .5643413    .0878335      6.43    0.000      .3897908     .7388918
     lweight |    .6220198    .2008967      3.10    0.003      .2227799      1.02126
         age |   -.0212482    .0110841     -1.92    0.058     -.0432755     .0007791
        lbph |    .0967125    .0579127      1.67    0.098     -.0183768     .2118018
         svi |    .7616733    .2411757      3.16    0.002      .2823873     1.240959
         lcp |   -.1060509     .089868     -1.18    0.241     -.2846446     .0725427
     gleason |    .0492279    .1553407      0.32    0.752      -.259479     .3579349
       pgg45 |    .0044575    .0043653      1.02    0.310     -.0042177     .0131327
       _cons |    .1815609    1.320568      0.14    0.891     -2.442791     2.805913
-------------+----------------------------------------------------------------
mreldif=1.50339849896e-15. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
y1   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
y1   .04922792   .00445751   .18156087

__000001[1,9]
        lcavol     lweight         age        lbph         svi         lcp
y1   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
y1   .04922792   .00445751   .18156087

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.5550784      0.5643413
          lweight |       0.6160094      0.6220198
              age |      -0.0200468     -0.0212482
             lbph |       0.0936574      0.0967125
              svi |       0.7407063      0.7616733
              lcp |      -0.0906286     -0.1060509
          gleason |       0.0462534      0.0492279
            pgg45 |       0.0041726      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1737929      0.1815609
------------------+--------------------------------

      Source |       SS           df       MS      Number of obs   =        97
-------------+----------------------------------   F(8, 88)        =     21.68
       Model |  84.8592398         8   10.607405   Prob > F        =    0.0000
    Residual |  43.0584188        88  .489300213   R-squared       =    0.6634
-------------+----------------------------------   Adj R-squared   =    0.6328
       Total |  127.917659        96  1.33247561   Root MSE        =     .6995

-------------+----------------------------------------------------------------
         lpsa |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
      lcavol |    .5643413    .0878335      6.43    0.000      .3897908     .7388918
     lweight |    .6220198    .2008967      3.10    0.003      .2227799      1.02126
         age |   -.0212482    .0110841     -1.92    0.058     -.0432755     .0007791
        lbph |    .0967125    .0579127      1.67    0.098     -.0183768     .2118018
         svi |    .7616733    .2411757      3.16    0.002      .2823873     1.240959
         lcp |   -.1060509     .089868     -1.18    0.241     -.2846446     .0725427
     gleason |    .0492279    .1553407      0.32    0.752      -.259479     .3579349
       pgg45 |    .0044575    .0043653      1.02    0.310     -.0042177     .0131327
       _cons |    .1815609    1.320568      0.14    0.891     -2.442791     2.805913
-------------+----------------------------------------------------------------
mreldif=1.50339849896e-15. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
y1   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
y1   .04922792   .00445751   .18156087

__000001[1,9]
        lcavol     lweight         age        lbph         svi         lcp
y1   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
y1   .04922792   .00445751   .18156087

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.5284880      0.5643413
          lweight |       0.5979410      0.6220198
              age |      -0.0165457     -0.0212482
             lbph |       0.0847342      0.0967125
              svi |       0.6803375      0.7616733
              lcp |      -0.0464578     -0.1060509
          gleason |       0.0370861      0.0492279
            pgg45 |       0.0033643      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1551578      0.1815609
------------------+--------------------------------

      Source |       SS           df       MS      Number of obs   =        97
-------------+----------------------------------   F(8, 88)        =     21.68
       Model |  84.8592398         8   10.607405   Prob > F        =    0.0000
    Residual |  43.0584188        88  .489300213   R-squared       =    0.6634
-------------+----------------------------------   Adj R-squared   =    0.6328
       Total |  127.917659        96  1.33247561   Root MSE        =     .6995

-------------+----------------------------------------------------------------
         lpsa |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
      lcavol |    .5643413    .0878335      6.43    0.000      .3897908     .7388918
     lweight |    .6220198    .2008967      3.10    0.003      .2227799      1.02126
         age |   -.0212482    .0110841     -1.92    0.058     -.0432755     .0007791
        lbph |    .0967125    .0579127      1.67    0.098     -.0183768     .2118018
         svi |    .7616733    .2411757      3.16    0.002      .2823873     1.240959
         lcp |   -.1060509     .089868     -1.18    0.241     -.2846446     .0725427
     gleason |    .0492279    .1553407      0.32    0.752      -.259479     .3579349
       pgg45 |    .0044575    .0043653      1.02    0.310     -.0042177     .0131327
       _cons |    .1815609    1.320568      0.14    0.891     -2.442791     2.805913
-------------+----------------------------------------------------------------
mreldif=1.50339849896e-15. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
y1   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
y1   .04922792   .00445751   .18156087

__000001[1,9]
        lcavol     lweight         age        lbph         svi         lcp
y1   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
y1   .04922792   .00445751   .18156087

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.4941626      0.5186256
          lweight |       0.5622500      0.6217574
              age |      -0.0105501     -0.0193045
             lbph |       0.0683305      0.0949255
              svi |       0.6070730      0.6427775
          gleason |       0.0210338      0.0422021
            pgg45 |       0.0024411      0.0027656
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1048456      0.2537330
------------------+--------------------------------

      Source |       SS           df       MS      Number of obs   =        97
-------------+----------------------------------   F(7, 89)        =     24.47
       Model |  84.1778515         7  12.0254074   Prob > F        =    0.0000
    Residual |  43.7398071        89  .491458507   R-squared       =    0.6581
-------------+----------------------------------   Adj R-squared   =    0.6312
       Total |  127.917659        96  1.33247561   Root MSE        =    .70104

-------------+----------------------------------------------------------------
         lpsa |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
      lcavol |    .5186256    .0790023      6.56    0.000      .3616497     .6756016
     lweight |    .6217574    .2013391      3.09    0.003      .2217009     1.021814
         age |   -.0193045    .0109852     -1.76    0.082     -.0411319     .0025228
        lbph |    .0949255    .0580204      1.64    0.105     -.0203599     .2102108
         svi |    .6427775    .2196051      2.93    0.004      .2064269     1.079128
     gleason |    .0422021    .1555685      0.27    0.787     -.2669092     .3513134
       pgg45 |    .0027656    .0041322      0.67    0.505     -.0054451     .0109763
       _cons |     .253733    1.322057      0.19    0.848     -2.373167     2.880633
-------------+----------------------------------------------------------------
mreldif=1.41685421082e-15. tolerance = .01

__000000[1,8]
        lcavol     lweight         age        lbph         svi     gleason
y1   .51862565   .62175742  -.01930454   .09492549    .6427775   .04220206

         pgg45       _cons
y1   .00276558   .25373297

__000001[1,8]
        lcavol     lweight         age        lbph         svi     gleason
y1   .51862565   .62175742  -.01930454   .09492549    .6427775   .04220206

         pgg45       _cons
y1   .00276558   .25373297

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.4824387      0.5186256
          lweight |       0.5335537      0.6217574
              age |      -0.0064415     -0.0193045
             lbph |       0.0558345      0.0949255
              svi |       0.5894736      0.6427775
          gleason |       0.0110679      0.0422021
            pgg45 |       0.0022770      0.0027656
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.0387720      0.2537330
------------------+--------------------------------

      Source |       SS           df       MS      Number of obs   =        97
-------------+----------------------------------   F(7, 89)        =     24.47
       Model |  84.1778515         7  12.0254074   Prob > F        =    0.0000
    Residual |  43.7398071        89  .491458507   R-squared       =    0.6581
-------------+----------------------------------   Adj R-squared   =    0.6312
       Total |  127.917659        96  1.33247561   Root MSE        =    .70104

-------------+----------------------------------------------------------------
         lpsa |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
      lcavol |    .5186256    .0790023      6.56    0.000      .3616497     .6756016
     lweight |    .6217574    .2013391      3.09    0.003      .2217009     1.021814
         age |   -.0193045    .0109852     -1.76    0.082     -.0411319     .0025228
        lbph |    .0949255    .0580204      1.64    0.105     -.0203599     .2102108
         svi |    .6427775    .2196051      2.93    0.004      .2064269     1.079128
     gleason |    .0422021    .1555685      0.27    0.787     -.2669092     .3513134
       pgg45 |    .0027656    .0041322      0.67    0.505     -.0054451     .0109763
       _cons |     .253733    1.322057      0.19    0.848     -2.373167     2.880633
-------------+----------------------------------------------------------------
mreldif=1.41685421082e-15. tolerance = .01

__000000[1,8]
        lcavol     lweight         age        lbph         svi     gleason
y1   .51862565   .62175742  -.01930454   .09492549    .6427775   .04220206

         pgg45       _cons
y1   .00276558   .25373297

__000001[1,8]
        lcavol     lweight         age        lbph         svi     gleason
y1   .51862565   .62175742  -.01930454   .09492549    .6427775   .04220206

         pgg45       _cons
y1   .00276558   .25373297

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.4126838      0.5067548
          lweight |       0.4142979      0.6650921
              svi |       0.4673642      0.6016864
            pgg45 |       0.0012381      0.0029746
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.2864229     -0.8221054
------------------+--------------------------------

      Source |       SS           df       MS      Number of obs   =        97
-------------+----------------------------------   F(4, 92)        =     40.86
       Model |  81.8499081         4   20.462477   Prob > F        =    0.0000
    Residual |  46.0677505        92  .500736418   R-squared       =    0.6399
-------------+----------------------------------   Adj R-squared   =    0.6242
       Total |  127.917659        96  1.33247561   Root MSE        =    .70763

-------------+----------------------------------------------------------------
         lpsa |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
      lcavol |    .5067548    .0772609      6.56    0.000       .353308     .6602016
     lweight |    .6650921    .1756667      3.79    0.000      .3162029     1.013981
         svi |    .6016864     .216749      2.78    0.007      .1712042     1.032169
       pgg45 |    .0029746    .0029748      1.00    0.320     -.0029335     .0088827
       _cons |   -.8221054    .6246194     -1.32    0.191     -2.062653     .4184426
-------------+----------------------------------------------------------------
mreldif=1.21861559623e-15. tolerance = .01

__000000[1,5]
        lcavol     lweight         svi       pgg45       _cons
y1   .50675482   .66509213   .60168637   .00297461  -.82210539

__000001[1,5]
        lcavol     lweight         svi       pgg45       _cons
y1   .50675482   .66509213   .60168637   .00297461  -.82210539

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.2549167      0.5258519
          lweight |       0.0268516      0.6617699
              svi |       0.1764878      0.6656665
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.9985955     -0.7771568
------------------+--------------------------------

      Source |       SS           df       MS      Number of obs   =        97
-------------+----------------------------------   F(3, 93)        =     54.15
       Model |  81.3492223         3  27.1164074   Prob > F        =    0.0000
    Residual |  46.5684363        93  .500735874   R-squared       =    0.6359
-------------+----------------------------------   Adj R-squared   =    0.6242
       Total |  127.917659        96  1.33247561   Root MSE        =    .70763

-------------+----------------------------------------------------------------
         lpsa |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
      lcavol |    .5258519    .0748632      7.02    0.000      .3771884     .6745154
     lweight |    .6617699    .1756352      3.77    0.000      .3129933     1.010547
         svi |    .6656665    .2070898      3.21    0.002      .2544271     1.076906
       _cons |   -.7771568    .6229995     -1.25    0.215      -2.01431     .4599967
-------------+----------------------------------------------------------------
mreldif=6.66533800803e-16. tolerance = .01

__000000[1,4]
        lcavol     lweight         svi       _cons
y1    .5258519   .66176995    .6656665  -.77715676

__000001[1,4]
        lcavol     lweight         svi       _cons
y1    .5258519   .66176995    .6656665  -.77715676
r; t=0.21 22:18:24

. *
.
. * ridge
. foreach i of numlist 0.5 1 4 10 15 50 150 {
  2.         lasso2 $model, l(`i') ols alpha(0)
  3.         mat A = e(b)
  4.         reg lpsa `e(selected)'
  5.         mat B = e(b)
  6.         comparemat A B
  7. }

------------------+--------------------------------
         Selected |           Ridge   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5611954      0.5643413
          lweight |       0.6215330      0.6220198
              age |      -0.0210549     -0.0212482
             lbph |       0.0962430      0.0967125
              svi |       0.7582686      0.7616733
              lcp |      -0.1029241     -0.1060509
          gleason |       0.0500348      0.0492279
            pgg45 |       0.0044012      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1725017      0.1815609
------------------+--------------------------------

      Source |       SS           df       MS      Number of obs   =        97
-------------+----------------------------------   F(8, 88)        =     21.68
       Model |  84.8592398         8   10.607405   Prob > F        =    0.0000
    Residual |  43.0584188        88  .489300213   R-squared       =    0.6634
-------------+----------------------------------   Adj R-squared   =    0.6328
       Total |  127.917659        96  1.33247561   Root MSE        =     .6995

-------------+----------------------------------------------------------------
         lpsa |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
      lcavol |    .5643413    .0878335      6.43    0.000      .3897908     .7388918
     lweight |    .6220198    .2008967      3.10    0.003      .2227799      1.02126
         age |   -.0212482    .0110841     -1.92    0.058     -.0432755     .0007791
        lbph |    .0967125    .0579127      1.67    0.098     -.0183768     .2118018
         svi |    .7616733    .2411757      3.16    0.002      .2823873     1.240959
         lcp |   -.1060509     .089868     -1.18    0.241     -.2846446     .0725427
     gleason |    .0492279    .1553407      0.32    0.752      -.259479     .3579349
       pgg45 |    .0044575    .0043653      1.02    0.310     -.0042177     .0131327
       _cons |    .1815609    1.320568      0.14    0.891     -2.442791     2.805913
-------------+----------------------------------------------------------------
mreldif=1.50339849896e-15. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
y1   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
y1   .04922792   .00445751   .18156087

__000001[1,9]
        lcavol     lweight         age        lbph         svi         lcp
y1   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
y1   .04922792   .00445751   .18156087

------------------+--------------------------------
         Selected |           Ridge   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5581068      0.5643413
          lweight |       0.6210308      0.6220198
              age |      -0.0208648     -0.0212482
             lbph |       0.0957816      0.0967125
              svi |       0.7549337      0.7616733
              lcp |      -0.0998734     -0.1060509
          gleason |       0.0508098      0.0492279
            pgg45 |       0.0043469      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1637593      0.1815609
------------------+--------------------------------

      Source |       SS           df       MS      Number of obs   =        97
-------------+----------------------------------   F(8, 88)        =     21.68
       Model |  84.8592398         8   10.607405   Prob > F        =    0.0000
    Residual |  43.0584188        88  .489300213   R-squared       =    0.6634
-------------+----------------------------------   Adj R-squared   =    0.6328
       Total |  127.917659        96  1.33247561   Root MSE        =     .6995

-------------+----------------------------------------------------------------
         lpsa |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
      lcavol |    .5643413    .0878335      6.43    0.000      .3897908     .7388918
     lweight |    .6220198    .2008967      3.10    0.003      .2227799      1.02126
         age |   -.0212482    .0110841     -1.92    0.058     -.0432755     .0007791
        lbph |    .0967125    .0579127      1.67    0.098     -.0183768     .2118018
         svi |    .7616733    .2411757      3.16    0.002      .2823873     1.240959
         lcp |   -.1060509     .089868     -1.18    0.241     -.2846446     .0725427
     gleason |    .0492279    .1553407      0.32    0.752      -.259479     .3579349
       pgg45 |    .0044575    .0043653      1.02    0.310     -.0042177     .0131327
       _cons |    .1815609    1.320568      0.14    0.891     -2.442791     2.805913
-------------+----------------------------------------------------------------
mreldif=1.50339849896e-15. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
y1   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
y1   .04922792   .00445751   .18156087

__000001[1,9]
        lcavol     lweight         age        lbph         svi         lcp
y1   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
y1   .04922792   .00445751   .18156087

------------------+--------------------------------
         Selected |           Ridge   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5406803      0.5643413
          lweight |       0.6177334      0.6220198
              age |      -0.0197856     -0.0212482
             lbph |       0.0931716      0.0967125
              svi |       0.7362664      0.7616733
              lcp |      -0.0830288     -0.1060509
          gleason |       0.0548761      0.0492279
            pgg45 |       0.0040584      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1172276      0.1815609
------------------+--------------------------------

      Source |       SS           df       MS      Number of obs   =        97
-------------+----------------------------------   F(8, 88)        =     21.68
       Model |  84.8592398         8   10.607405   Prob > F        =    0.0000
    Residual |  43.0584188        88  .489300213   R-squared       =    0.6634
-------------+----------------------------------   Adj R-squared   =    0.6328
       Total |  127.917659        96  1.33247561   Root MSE        =     .6995

-------------+----------------------------------------------------------------
         lpsa |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
      lcavol |    .5643413    .0878335      6.43    0.000      .3897908     .7388918
     lweight |    .6220198    .2008967      3.10    0.003      .2227799      1.02126
         age |   -.0212482    .0110841     -1.92    0.058     -.0432755     .0007791
        lbph |    .0967125    .0579127      1.67    0.098     -.0183768     .2118018
         svi |    .7616733    .2411757      3.16    0.002      .2823873     1.240959
         lcp |   -.1060509     .089868     -1.18    0.241     -.2846446     .0725427
     gleason |    .0492279    .1553407      0.32    0.752      -.259479     .3579349
       pgg45 |    .0044575    .0043653      1.02    0.310     -.0042177     .0131327
       _cons |    .1815609    1.320568      0.14    0.891     -2.442791     2.805913
-------------+----------------------------------------------------------------
mreldif=1.50339849896e-15. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
y1   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
y1   .04922792   .00445751   .18156087

__000001[1,9]
        lcavol     lweight         age        lbph         svi         lcp
y1   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
y1   .04922792   .00445751   .18156087

------------------+--------------------------------
         Selected |           Ridge   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5105488      0.5643413
          lweight |       0.6100509      0.6220198
              age |      -0.0178941     -0.0212482
             lbph |       0.0886328      0.0967125
              svi |       0.7046133      0.7616733
              lcp |      -0.0554655     -0.1060509
          gleason |       0.0607886      0.0492279
            pgg45 |       0.0036299      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.0477573      0.1815609
------------------+--------------------------------

      Source |       SS           df       MS      Number of obs   =        97
-------------+----------------------------------   F(8, 88)        =     21.68
       Model |  84.8592398         8   10.607405   Prob > F        =    0.0000
    Residual |  43.0584188        88  .489300213   R-squared       =    0.6634
-------------+----------------------------------   Adj R-squared   =    0.6328
       Total |  127.917659        96  1.33247561   Root MSE        =     .6995

-------------+----------------------------------------------------------------
         lpsa |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
      lcavol |    .5643413    .0878335      6.43    0.000      .3897908     .7388918
     lweight |    .6220198    .2008967      3.10    0.003      .2227799      1.02126
         age |   -.0212482    .0110841     -1.92    0.058     -.0432755     .0007791
        lbph |    .0967125    .0579127      1.67    0.098     -.0183768     .2118018
         svi |    .7616733    .2411757      3.16    0.002      .2823873     1.240959
         lcp |   -.1060509     .089868     -1.18    0.241     -.2846446     .0725427
     gleason |    .0492279    .1553407      0.32    0.752      -.259479     .3579349
       pgg45 |    .0044575    .0043653      1.02    0.310     -.0042177     .0131327
       _cons |    .1815609    1.320568      0.14    0.891     -2.442791     2.805913
-------------+----------------------------------------------------------------
mreldif=1.50339849896e-15. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
y1   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
y1   .04922792   .00445751   .18156087

__000001[1,9]
        lcavol     lweight         age        lbph         svi         lcp
y1   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
y1   .04922792   .00445751   .18156087

------------------+--------------------------------
         Selected |           Ridge   Post-est OLS
------------------+--------------------------------
           lcavol |       0.4891661      0.5643413
          lweight |       0.6029454      0.6220198
              age |      -0.0165340     -0.0212482
             lbph |       0.0853930      0.0967125
              svi |       0.6826343      0.7616733
              lcp |      -0.0371961     -0.1060509
          gleason |       0.0642459      0.0492279
            pgg45 |       0.0033779      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.0067005      0.1815609
------------------+--------------------------------

      Source |       SS           df       MS      Number of obs   =        97
-------------+----------------------------------   F(8, 88)        =     21.68
       Model |  84.8592398         8   10.607405   Prob > F        =    0.0000
    Residual |  43.0584188        88  .489300213   R-squared       =    0.6634
-------------+----------------------------------   Adj R-squared   =    0.6328
       Total |  127.917659        96  1.33247561   Root MSE        =     .6995

-------------+----------------------------------------------------------------
         lpsa |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
      lcavol |    .5643413    .0878335      6.43    0.000      .3897908     .7388918
     lweight |    .6220198    .2008967      3.10    0.003      .2227799      1.02126
         age |   -.0212482    .0110841     -1.92    0.058     -.0432755     .0007791
        lbph |    .0967125    .0579127      1.67    0.098     -.0183768     .2118018
         svi |    .7616733    .2411757      3.16    0.002      .2823873     1.240959
         lcp |   -.1060509     .089868     -1.18    0.241     -.2846446     .0725427
     gleason |    .0492279    .1553407      0.32    0.752      -.259479     .3579349
       pgg45 |    .0044575    .0043653      1.02    0.310     -.0042177     .0131327
       _cons |    .1815609    1.320568      0.14    0.891     -2.442791     2.805913
-------------+----------------------------------------------------------------
mreldif=1.50339849896e-15. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
y1   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
y1   .04922792   .00445751   .18156087

__000001[1,9]
        lcavol     lweight         age        lbph         svi         lcp
y1   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
y1   .04922792   .00445751   .18156087

------------------+--------------------------------
         Selected |           Ridge   Post-est OLS
------------------+--------------------------------
           lcavol |       0.3908945      0.5643413
          lweight |       0.5495527      0.6220198
              age |      -0.0101767     -0.0212482
             lbph |       0.0702851      0.0967125
              svi |       0.5853280      0.7616733
              lcp |       0.0311012     -0.1060509
          gleason |       0.0751000      0.0492279
            pgg45 |       0.0027121      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.0951153      0.1815609
------------------+--------------------------------

      Source |       SS           df       MS      Number of obs   =        97
-------------+----------------------------------   F(8, 88)        =     21.68
       Model |  84.8592398         8   10.607405   Prob > F        =    0.0000
    Residual |  43.0584188        88  .489300213   R-squared       =    0.6634
-------------+----------------------------------   Adj R-squared   =    0.6328
       Total |  127.917659        96  1.33247561   Root MSE        =     .6995

-------------+----------------------------------------------------------------
         lpsa |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
      lcavol |    .5643413    .0878335      6.43    0.000      .3897908     .7388918
     lweight |    .6220198    .2008967      3.10    0.003      .2227799      1.02126
         age |   -.0212482    .0110841     -1.92    0.058     -.0432755     .0007791
        lbph |    .0967125    .0579127      1.67    0.098     -.0183768     .2118018
         svi |    .7616733    .2411757      3.16    0.002      .2823873     1.240959
         lcp |   -.1060509     .089868     -1.18    0.241     -.2846446     .0725427
     gleason |    .0492279    .1553407      0.32    0.752      -.259479     .3579349
       pgg45 |    .0044575    .0043653      1.02    0.310     -.0042177     .0131327
       _cons |    .1815609    1.320568      0.14    0.891     -2.442791     2.805913
-------------+----------------------------------------------------------------
mreldif=1.50339849896e-15. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
y1   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
y1   .04922792   .00445751   .18156087

__000001[1,9]
        lcavol     lweight         age        lbph         svi         lcp
y1   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
y1   .04922792   .00445751   .18156087

------------------+--------------------------------
         Selected |           Ridge   Post-est OLS
------------------+--------------------------------
           lcavol |       0.2717595      0.5643413
          lweight |       0.4305476      0.6220198
              age |      -0.0029348     -0.0212482
             lbph |       0.0511156      0.0967125
              svi |       0.4608634      0.7616733
              lcp |       0.0742555     -0.1060509
          gleason |       0.0835739      0.0492279
            pgg45 |       0.0026142      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.0168513      0.1815609
------------------+--------------------------------

      Source |       SS           df       MS      Number of obs   =        97
-------------+----------------------------------   F(8, 88)        =     21.68
       Model |  84.8592398         8   10.607405   Prob > F        =    0.0000
    Residual |  43.0584188        88  .489300213   R-squared       =    0.6634
-------------+----------------------------------   Adj R-squared   =    0.6328
       Total |  127.917659        96  1.33247561   Root MSE        =     .6995

-------------+----------------------------------------------------------------
         lpsa |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
      lcavol |    .5643413    .0878335      6.43    0.000      .3897908     .7388918
     lweight |    .6220198    .2008967      3.10    0.003      .2227799      1.02126
         age |   -.0212482    .0110841     -1.92    0.058     -.0432755     .0007791
        lbph |    .0967125    .0579127      1.67    0.098     -.0183768     .2118018
         svi |    .7616733    .2411757      3.16    0.002      .2823873     1.240959
         lcp |   -.1060509     .089868     -1.18    0.241     -.2846446     .0725427
     gleason |    .0492279    .1553407      0.32    0.752      -.259479     .3579349
       pgg45 |    .0044575    .0043653      1.02    0.310     -.0042177     .0131327
       _cons |    .1815609    1.320568      0.14    0.891     -2.442791     2.805913
-------------+----------------------------------------------------------------
mreldif=1.50339849896e-15. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi         lcp
y1   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
y1   .04922792   .00445751   .18156087

__000001[1,9]
        lcavol     lweight         age        lbph         svi         lcp
y1   .56434129   .62201981  -.02124818   .09671252   .76167335  -.10605094

       gleason       pgg45       _cons
y1   .04922792   .00445751   .18156087
r; t=0.20 22:18:24

. *
.
. ********************************************************************************
. *** partial() vs notpen()                                                                                                        ***
. ********************************************************************************
.
. lasso2 $model, partial(lcp) l(50)

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.3372114      0.5789490
          lweight |       0.1753467      0.6726262
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
              lcp |       0.2522809      0.0896053
            _cons |       1.4320758     -0.7280498
------------------+--------------------------------
r; t=0.04 22:18:24

. mat A = e(b)
r; t=0.00 22:18:24

. lasso2 $model, notpen(lcp) l(50)

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.2260837      0.5789490
          lweight |       0.2201095      0.6726262
              lcp |*       0.3132824      0.0896053
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.4305989     -0.7280498
------------------+--------------------------------
*Not penalized
r; t=0.01 22:18:24

. mat B = e(b)
r; t=0.00 22:18:24

. comparevec A B
Max rel dif = 0. tolerance = .01

__000000[1,4]
       lcavol    lweight        lcp      _cons
y1  .33721135  .17534668  .25228088  1.4320758

__000001[1,4]
       lcavol    lweight        lcp      _cons
y1  .22608373  .22010953   .3132824  1.4305989
r; t=0.00 22:18:24

.
. lasso2 $model, partial(lcp) l(50) sqrt

------------------+--------------------------------
         Selected |      Sqrt-lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.1160166      0.6550918
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
              lcp |       0.3870332      0.0801708
            _cons |       2.3911838      1.6083866
------------------+--------------------------------
r; t=0.03 22:18:24

. mat A = e(b)
r; t=0.00 22:18:24

. lasso2 $model, notpen(lcp) l(50) sqrt

------------------+--------------------------------
         Selected |      Sqrt-lasso   Post-est OLS
------------------+--------------------------------
              lcp |*       0.4530743      0.4530743
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       2.5596528      2.5596528
------------------+--------------------------------
*Not penalized
r; t=0.01 22:18:24

. mat B = e(b)
r; t=0.00 22:18:24

. comparevec A B
Max rel dif = 0. tolerance = .01

__000000[1,3]
       lcavol        lcp      _cons
y1  .11601656  .38703321  2.3911838

__000001[1,2]
          lcp      _cons
y1  .45307432  2.5596528
r; t=0.00 22:18:24

.
. lasso2 $model, partial(lcp) l(50) alpha(0.5)

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.3933538      0.5478970
          lweight |       0.3852476      0.5303588
             lbph |       0.0034326      0.0799931
              svi |       0.3338927      0.7597493
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
              lcp |       0.1432224     -0.0363802
            _cons |       0.5023728     -0.3649561
------------------+--------------------------------
r; t=0.04 22:18:24

. mat A = e(b)
r; t=0.00 22:18:24

. lasso2 $model, notpen(lcp) l(50) alpha(0.5)

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.3185808      0.5418601
          lweight |       0.4215597      0.6589198
              svi |       0.2070765      0.7099563
              lcp |*       0.2092045     -0.0300823
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.5111770     -0.8034092
------------------+--------------------------------
*Not penalized
r; t=0.01 22:18:24

. mat B = e(b)
r; t=0.00 22:18:24

. comparevec A B
Max rel dif = 0. tolerance = .01

__000000[1,6]
       lcavol    lweight       lbph        svi        lcp      _cons
y1  .39335379  .38524757   .0034326   .3338927  .14322245   .5023728

__000001[1,5]
       lcavol    lweight        svi        lcp      _cons
y1  .31858078  .42155968  .20707649  .20920449  .51117695
r; t=0.00 22:18:24

.
. lasso2 $model, partial(lcp) l(50) alpha(0)

------------------+--------------------------------
         Selected |           Ridge   Post-est OLS
------------------+--------------------------------
           lcavol |       0.4507882      0.5643413
          lweight |       0.5237247      0.6220198
              age |      -0.0112634     -0.0212482
             lbph |       0.0744945      0.0967125
              svi |       0.6399857      0.7616733
          gleason |       0.0609423      0.0492279
            pgg45 |       0.0029474      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
              lcp |      -0.0030316     -0.1060509
            _cons |       0.0586496      0.1815609
------------------+--------------------------------
r; t=0.04 22:18:24

. mat A = e(b)
r; t=0.00 22:18:24

. lasso2 $model, notpen(lcp) l(50) alpha(0)

------------------+--------------------------------
         Selected |           Ridge   Post-est OLS
------------------+--------------------------------
           lcavol |       0.3837782      0.5643413
          lweight |       0.5482473      0.6220198
              age |      -0.0099558     -0.0212482
             lbph |       0.0703588      0.0967125
              svi |       0.5652077      0.7616733
              lcp |*       0.0512049     -0.1060509
          gleason |       0.0713396      0.0492279
            pgg45 |       0.0024678      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.0555722      0.1815609
------------------+--------------------------------
*Not penalized
r; t=0.01 22:18:24

. mat B = e(b)
r; t=0.00 22:18:24

. comparevec A B
Max rel dif = 0. tolerance = .01

__000000[1,9]
        lcavol     lweight         age        lbph         svi     gleason
y1   .45078818   .52372468  -.01126344   .07449453   .63998566   .06094235

         pgg45         lcp       _cons
y1   .00294737  -.00303156   .05864964

__000001[1,9]
        lcavol     lweight         age        lbph         svi         lcp
y1   .38377815   .54824728  -.00995585    .0703588   .56520769   .05120492

       gleason       pgg45       _cons
y1   .07133961   .00246784   -.0555722
r; t=0.00 22:18:24

.
. lasso2 $model, lambda(10) partial(age) notpen(svi)

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.4766231      0.5186256
          lweight |       0.5369492      0.6217574
             lbph |       0.0679604      0.0949255
              svi |*       0.7609147      0.6427775
          gleason |       0.0130227      0.0422021
            pgg45 |       0.0012984      0.0027656
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
              age |      -0.0127475     -0.0193045
            _cons |       0.4093655      0.2537330
------------------+--------------------------------
*Not penalized
r; t=0.03 22:18:24

. mat A = e(b)
r; t=0.00 22:18:24

. lasso2 $model, lambda(10) partial(svi) notpen(age)

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.4865324      0.5186256
          lweight |       0.5268282      0.6217574
              age |*      -0.0127049     -0.0193045
             lbph |       0.0663984      0.0949255
          gleason |       0.0019546      0.0422021
            pgg45 |       0.0016005      0.0027656
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
              svi |       0.7435465      0.6427775
            _cons |       0.5012872      0.2537330
------------------+--------------------------------
*Not penalized
r; t=0.03 22:18:24

. mat B = e(b)
r; t=0.00 22:18:24

. comparevec A B
Max rel dif = 0. tolerance = .01

__000000[1,8]
        lcavol     lweight        lbph         svi     gleason       pgg45
y1   .47662311   .53694916   .06796039   .76091473   .01302269    .0012984

           age       _cons
y1  -.01274747   .40936546

__000001[1,8]
        lcavol     lweight         age        lbph     gleason       pgg45
y1   .48653241   .52682822  -.01270493   .06639838   .00195464   .00160054

           svi       _cons
y1   .74354647   .50128721
r; t=0.00 22:18:24

.
. ********************************************************************************
. *** penalty loadings vs notpen (see help file)                                                   ***
. ********************************************************************************
.
. lasso2 $model, l(10) notpen(lcavol) unitloadings

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |*       0.6207573      0.5234981
          lweight |       0.2922748      0.6152349
              age |      -0.0129031     -0.0190343
             lbph |       0.0863802      0.0954908
              svi |       0.1760504      0.6358643
            pgg45 |       0.0049022      0.0035248
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.2374708      0.5214696
------------------+--------------------------------
*Not penalized
r; t=0.02 22:18:24

. mat A = e(b)
r; t=0.00 22:18:24

.
. mat myloadings = (0,1,1,1,1,1,1,1)
r; t=0.00 22:18:24

. lasso2 $model, l(10) ploadings(myloadings)

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.6207573      0.5234981
          lweight |       0.2922748      0.6152349
              age |      -0.0129031     -0.0190343
             lbph |       0.0863802      0.0954908
              svi |       0.1760504      0.6358643
            pgg45 |       0.0049022      0.0035248
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.2374708      0.5214696
------------------+--------------------------------
r; t=0.01 22:18:24

. mat B = e(b)
r; t=0.00 22:18:24

.
. comparemat A B
mreldif=0. tolerance = .01

__000000[1,7]
        lcavol     lweight         age        lbph         svi       pgg45
y1   .62075729   .29227485  -.01290306   .08638021   .17605041   .00490221

         _cons
y1   1.2374708

__000001[1,7]
        lcavol     lweight         age        lbph         svi       pgg45
y1   .62075729   .29227485  -.01290306   .08638021   .17605041   .00490221

         _cons
y1   1.2374708
r; t=0.00 22:18:24

.
.
. ********************************************************************************
. *** ic option to control display of output                                                      ***
. ********************************************************************************
.
. di as red "should display EBIC (the default):"
should display EBIC (the default):
r; t=0.00 22:18:24

. lasso2 $model

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1  163.62492    0     0.00000     31.41226   0.0000  | Added _cons.
     2 |   2  149.08894    1     0.06390     26.66962   0.0916  | Added
      |                                                         | lcavol.
     3 |   9   77.73509    2     0.40800    -12.63533   0.4221  | Added svi.
     4 |  11   64.53704    3     0.60174    -18.31145   0.4801  | Added
      |                                                         | lweight.
     5 |  21   25.45474    4     1.35340    -42.20238   0.6123  | Added pgg45.
     6 |  22   23.19341    5     1.39138    -38.93672   0.6175  | Added lbph.
     7 |  29   12.09306    6     1.58269    -39.94418   0.6389  | Added age.
     8 |  35    6.92010    7     1.71689    -38.84649   0.6516  | Added
      |                                                         | gleason.
     9 |  41    3.95993    8     1.83346    -35.69248   0.6567  | Added lcp.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


r; t=0.10 22:18:25

. sleep 1000
r; t=0.100 22:18:26

. di as red "should display AIC:"
should display AIC:
r; t=0.00 22:18:26

. lasso2 $model , ic(aic)

  Knot|  ID     Lambda    s      L1-Norm        AIC      R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1  163.62492    0     0.00000     28.83755   0.0000  | Added _cons.
     2 |   2  149.08894    1     0.06390     21.52020   0.0916  | Added
      |                                                         | lcavol.
     3 |   9   77.73509    2     0.40800    -20.35946   0.4221  | Added svi.
     4 |  11   64.53704    3     0.60174    -28.61030   0.4801  | Added
      |                                                         | lweight.
     5 |  21   25.45474    4     1.35340    -55.07593   0.6123  | Added pgg45.
     6 |  22   23.19341    5     1.39138    -54.38498   0.6175  | Added lbph.
     7 |  29   12.09306    6     1.58269    -57.96716   0.6389  | Added age.
     8 |  35    6.92010    7     1.71689    -59.44418   0.6516  | Added
      |                                                         | gleason.
     9 |  41    3.95993    8     1.83346    -58.86488   0.6567  | Added lcp.
Use long option for full output.


Type e.g. lasso2, lic(aic) to run the model selected by AIC.


r; t=0.11 22:18:26

. sleep 1000
r; t=1.00 22:18:27

. di as red "should display AICc:"
should display AICc:
r; t=0.00 22:18:27

. lasso2 $model , ic(aicc)

  Knot|  ID     Lambda    s      L1-Norm        AICc     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1  163.62492    0     0.00000     28.85838   0.0000  | Added _cons.
     2 |   2  149.08894    1     0.06390     21.60441   0.0916  | Added
      |                                                         | lcavol.
     3 |   9   77.73509    2     0.40800    -20.16797   0.4221  | Added svi.
     4 |  11   64.53704    3     0.60174    -28.26621   0.4801  | Added
      |                                                         | lweight.
     5 |  21   25.45474    4     1.35340    -54.53246   0.6123  | Added pgg45.
     6 |  22   23.19341    5     1.39138    -53.59377   0.6175  | Added lbph.
     7 |  29   12.09306    6     1.58269    -56.87827   0.6389  | Added age.
     8 |  35    6.92010    7     1.71689    -58.00598   0.6516  | Added
      |                                                         | gleason.
     9 |  41    3.95993    8     1.83346    -57.02397   0.6567  | Added lcp.
Use long option for full output.


Type e.g. lasso2, lic(aicc) to run the model selected by AICc.


r; t=0.11 22:18:27

. sleep 1000
r; t=1.01 22:18:28

. di as red "should display BIC:"
should display BIC:
r; t=0.00 22:18:28

. lasso2 $model , ic(bic)

  Knot|  ID     Lambda    s      L1-Norm        BIC      R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1  163.62492    0     0.00000     31.41226   0.0000  | Added _cons.
     2 |   2  149.08894    1     0.06390     26.66962   0.0916  | Added
      |                                                         | lcavol.
     3 |   9   77.73509    2     0.40800    -12.63533   0.4221  | Added svi.
     4 |  11   64.53704    3     0.60174    -18.31145   0.4801  | Added
      |                                                         | lweight.
     5 |  21   25.45474    4     1.35340    -42.20238   0.6123  | Added pgg45.
     6 |  22   23.19341    5     1.39138    -38.93672   0.6175  | Added lbph.
     7 |  29   12.09306    6     1.58269    -39.94418   0.6389  | Added age.
     8 |  35    6.92010    7     1.71689    -38.84649   0.6516  | Added
      |                                                         | gleason.
     9 |  41    3.95993    8     1.83346    -35.69248   0.6567  | Added lcp.
Use long option for full output.


Type e.g. lasso2, lic(bic) to run the model selected by BIC.


r; t=0.10 22:18:28

. sleep 1000
r; t=0.99 22:18:29

. di as red "should display EBIC:"
should display EBIC:
r; t=0.00 22:18:29

. lasso2 $model , ic(ebic)

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1  163.62492    0     0.00000     31.41226   0.0000  | Added _cons.
     2 |   2  149.08894    1     0.06390     26.66962   0.0916  | Added
      |                                                         | lcavol.
     3 |   9   77.73509    2     0.40800    -12.63533   0.4221  | Added svi.
     4 |  11   64.53704    3     0.60174    -18.31145   0.4801  | Added
      |                                                         | lweight.
     5 |  21   25.45474    4     1.35340    -42.20238   0.6123  | Added pgg45.
     6 |  22   23.19341    5     1.39138    -38.93672   0.6175  | Added lbph.
     7 |  29   12.09306    6     1.58269    -39.94418   0.6389  | Added age.
     8 |  35    6.92010    7     1.71689    -38.84649   0.6516  | Added
      |                                                         | gleason.
     9 |  41    3.95993    8     1.83346    -35.69248   0.6567  | Added lcp.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


r; t=0.10 22:18:29

.
.
. ********************************************************************************
. *** degrees of freedom calculation                                                         ***
. ********************************************************************************
.
. // replicate dof w/o constant and no standardisation [OK]
. lasso2 $model ,  alpha(0) l(20 .1)  long unitload    nocons nopath
r; t=0.01 22:18:29

. mat D= e(dof)
r; t=0.00 22:18:29

. mat list e(dof)

e(dof)[2,1]
           Df
r1  6.6327827
r2  7.9881372
r; t=0.00 22:18:29

.
. putmata y=(lpsa) X=(lcavol lweight  age lbph  svi  lcp gleason pgg45  ), replace
(1 vector, 1 matrix posted)
r; t=0.00 22:18:29

. mata: df=trace(X*invsym((X'X):+20/2*I(8))*X')
r; t=0.00 22:18:29

. mata: df
  6.632782744
r; t=0.00 22:18:29

.
. mata: st_local("df",strofreal(df))
r; t=0.00 22:18:29

. assert reldif(el(D,1,1),`df')<10^-6
r; t=0.00 22:18:29

.
. // standardisation w/o constant [OK]
. lasso2 $model ,  alpha(0)   l(20 .1)  long      nocons nopath
r; t=0.01 22:18:29

. mat D1 = e(dof)
r; t=0.00 22:18:29

. mat list e(dof)

e(dof)[2,1]
           Df
r1  6.8825536
r2  7.9928451
r; t=0.00 22:18:29

. lasso2 $model ,  alpha(0)   l(20 .1)  long prestd   nocons nopath
r; t=0.01 22:18:29

. mat D2 = e(dof)
r; t=0.00 22:18:29

. mat list e(dof)

e(dof)[2,1]
           Df
r1  6.8825536
r2  7.9928451
r; t=0.00 22:18:29

. comparemat D1 D2
mreldif=2.86418523492e-15. tolerance = .01

__000000[2,1]
           Df
r1  6.8825536
r2  7.9928451

__000001[2,1]
           Df
r1  6.8825536
r2  7.9928451
r; t=0.00 22:18:29

.
. putmata y=(lpsa) X=(lcavol lweight  age lbph  svi  lcp gleason pgg45  ), replace
(1 vector, 1 matrix posted)
r; t=0.00 22:18:29

. mata: s = sqrt(mean((X:-mean(X)):^2))
r; t=0.00 22:18:29

. mata: ssq = s:^2
r; t=0.00 22:18:29

. mata: Xs=X:/s
r; t=0.00 22:18:29

. mata: df1=trace(X*invsym((X'X):+20/2*diag(ssq))*X')  // "on the fly" standardisation
r; t=0.00 22:18:29

. mata: df2=trace(Xs*invsym((Xs'Xs):+20/2*I(8))*Xs')   // pre-standardisation
r; t=0.00 22:18:29

. mata: df1,df2
                 1             2
    +-----------------------------+
  1 |  6.882553589   6.882553589  |
    +-----------------------------+
r; t=0.00 22:18:29

. mata: st_local("df1",strofreal(df1))
r; t=0.00 22:18:29

. mata: st_local("df2",strofreal(df2))
r; t=0.00 22:18:29

. assert reldif(el(D1,1,1),`df1')<10^-6
r; t=0.00 22:18:29

. assert reldif(el(D1,1,1),`df2')<10^-6
r; t=0.00 22:18:29

. assert reldif(`df1',`df2')<10^-6
r; t=0.00 22:18:29

.
. // dof with constant and no standardisation [OK]
. lasso2 $model ,  alpha(0) l(20 .1)  long unitload  nopath
r; t=0.01 22:18:29

. mat list e(dof)

e(dof)[2,1]
           Df
r1  7.3789734
r2   8.985559
r; t=0.00 22:18:29

. mat D = e(dof)
r; t=0.00 22:18:29

.
. putmata y=(lpsa) X=(lcavol lweight  age lbph  svi  lcp gleason pgg45  ), replace
(1 vector, 1 matrix posted)
r; t=0.00 22:18:29

. mata: Xone=(X,J(97,1,1))
r; t=0.00 22:18:29

. mata: Psicons = I(9)
r; t=0.00 22:18:29

. mata: Psicons[9,9]=0
r; t=0.00 22:18:29

. mata: Xdm = X :- mean(X)
r; t=0.00 22:18:29

. mata: trace(X*invsym((X'X):+20/2*I(8))*X')                      // this is wrong (ignores constant)
  6.632782744
r; t=0.00 22:18:29

. mata: trace(Xdm*invsym((Xdm'Xdm):+20/2*I(8))*Xdm')   // this is correct but missing the constant
  6.378973447
r; t=0.00 22:18:29

. mata: trace(Xone*invsym((Xone'Xone):+20/2*Psicons)*Xone')  // this is correct (incl constant)
  7.378973447
r; t=0.00 22:18:29

. mata: df1=trace(Xone*invsym((Xone'Xone):+20/2*Psicons)*Xone')  // this should be correct
r; t=0.00 22:18:29

. mata: df2=trace(Xdm*invsym((Xdm'Xdm):+20/2*I(8))*Xdm')+1  // this is correct after +1 for constant
r; t=0.00 22:18:29

. mata: df1,df2
                 1             2
    +-----------------------------+
  1 |  7.378973447   7.378973447  |
    +-----------------------------+
r; t=0.00 22:18:29

. mata: st_local("df1",strofreal(df1))
r; t=0.00 22:18:29

. mata: st_local("df2",strofreal(df2))
r; t=0.00 22:18:29

. assert reldif(el(D,1,1),`df1')<10^-6
r; t=0.00 22:18:29

. assert reldif(el(D,1,1),`df2')<10^-6
r; t=0.00 22:18:29

. assert reldif(`df1',`df2')<10^-6
r; t=0.00 22:18:29

.
. // standardisation w/  constant [OK]
. lasso2 $model ,  alpha(0) l(20 10 1 .1)  long nopath
r; t=0.01 22:18:29

. mat list e(dof)

e(dof)[4,1]
           Df
r1  7.6831377
r2  8.2551869
r3  8.9149466
r4   8.991368
r; t=0.00 22:18:29

. mat D1 = e(dof)
r; t=0.00 22:18:29

. lasso2 $model ,  alpha(0) l(20 10 1 .1)  long prestd nopath
r; t=0.05 22:18:29

. mat list e(dof)

e(dof)[4,1]
           Df
r1  7.6831377
r2  8.2551869
r3  8.9149466
r4   8.991368
r; t=0.00 22:18:29

. mat D2 = e(dof)
r; t=0.00 22:18:29

. comparemat D1 D2
mreldif=1.02287727160e-16. tolerance = .01

__000000[4,1]
           Df
r1  7.6831377
r2  8.2551869
r3  8.9149466
r4   8.991368

__000001[4,1]
           Df
r1  7.6831377
r2  8.2551869
r3  8.9149466
r4   8.991368
r; t=0.00 22:18:29

.
. putmata y=(lpsa) X=(lcavol lweight  age lbph  svi  lcp gleason pgg45), replace
(1 vector, 1 matrix posted)
r; t=0.00 22:18:29

. mata: s = sqrt(mean((X:-mean(X)):^2))
r; t=0.00 22:18:29

. mata: ssq = s:^2
r; t=0.00 22:18:29

. mata: Xs=(X:-mean(X)):/s
r; t=0.00 22:18:29

. mata: Xone=(X,J(97,1,1))
r; t=0.00 22:18:29

. mata: df1=trace(Xdm*invsym((Xdm'Xdm):+20/2*diag(ssq))*Xdm') +1
r; t=0.00 22:18:29

. mata: df2=trace(Xs*invsym((Xs'Xs):+20/2*I(8))*Xs') +1
r; t=0.00 22:18:29

. mata: df1,df2
                 1             2
    +-----------------------------+
  1 |  7.683137698   7.683137698  |
    +-----------------------------+
r; t=0.00 22:18:29

. mata: st_local("df1",strofreal(df1))
r; t=0.00 22:18:29

. mata: st_local("df2",strofreal(df2))
r; t=0.00 22:18:29

. assert reldif(el(D1,1,1),`df1')<10^-6
r; t=0.00 22:18:29

. assert reldif(el(D1,1,1),`df2')<10^-6
r; t=0.00 22:18:29

. assert reldif(`df1',`df2')<10^-6
r; t=0.00 22:18:29

.
. ********************************************************************************
. *** lic option                                                                                                  ***
. ********************************************************************************
.
. * check that right lambda is used
. foreach ic of newlist ebic aic aicc bic {
  2.         lasso2 $model
  3.         local optlambda=e(l`ic')
  4.         lasso2, lic(`ic') postres
  5.         local thislambda=e(lambda)
  6.         assert reldif(`optlambda',`thislambda')<10^-8
  7. }

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1  163.62492    0     0.00000     31.41226   0.0000  | Added _cons.
     2 |   2  149.08894    1     0.06390     26.66962   0.0916  | Added
      |                                                         | lcavol.
     3 |   9   77.73509    2     0.40800    -12.63533   0.4221  | Added svi.
     4 |  11   64.53704    3     0.60174    -18.31145   0.4801  | Added
      |                                                         | lweight.
     5 |  21   25.45474    4     1.35340    -42.20238   0.6123  | Added pgg45.
     6 |  22   23.19341    5     1.39138    -38.93672   0.6175  | Added lbph.
     7 |  29   12.09306    6     1.58269    -39.94418   0.6389  | Added age.
     8 |  35    6.92010    7     1.71689    -38.84649   0.6516  | Added
      |                                                         | gleason.
     9 |  41    3.95993    8     1.83346    -35.69248   0.6567  | Added lcp.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


Use lambda=27.93654463358689 (selected by EBIC).

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.4725389      0.5258519
          lweight |       0.3989102      0.6617699
              svi |       0.4400748      0.6656665
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.2975585     -0.7771568
------------------+--------------------------------

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1  163.62492    0     0.00000     31.41226   0.0000  | Added _cons.
     2 |   2  149.08894    1     0.06390     26.66962   0.0916  | Added
      |                                                         | lcavol.
     3 |   9   77.73509    2     0.40800    -12.63533   0.4221  | Added svi.
     4 |  11   64.53704    3     0.60174    -18.31145   0.4801  | Added
      |                                                         | lweight.
     5 |  21   25.45474    4     1.35340    -42.20238   0.6123  | Added pgg45.
     6 |  22   23.19341    5     1.39138    -38.93672   0.6175  | Added lbph.
     7 |  29   12.09306    6     1.58269    -39.94418   0.6389  | Added age.
     8 |  35    6.92010    7     1.71689    -38.84649   0.6516  | Added
      |                                                         | gleason.
     9 |  41    3.95993    8     1.83346    -35.69248   0.6567  | Added lcp.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


Use lambda=7.594796178345335 (selected by AIC).

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5057140      0.5234981
          lweight |       0.5386738      0.6152349
              age |      -0.0073599     -0.0190343
             lbph |       0.0585468      0.0954908
              svi |       0.5854749      0.6358643
            pgg45 |       0.0022134      0.0035248
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1243026      0.5214696
------------------+--------------------------------

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1  163.62492    0     0.00000     31.41226   0.0000  | Added _cons.
     2 |   2  149.08894    1     0.06390     26.66962   0.0916  | Added
      |                                                         | lcavol.
     3 |   9   77.73509    2     0.40800    -12.63533   0.4221  | Added svi.
     4 |  11   64.53704    3     0.60174    -18.31145   0.4801  | Added
      |                                                         | lweight.
     5 |  21   25.45474    4     1.35340    -42.20238   0.6123  | Added pgg45.
     6 |  22   23.19341    5     1.39138    -38.93672   0.6175  | Added lbph.
     7 |  29   12.09306    6     1.58269    -39.94418   0.6389  | Added age.
     8 |  35    6.92010    7     1.71689    -38.84649   0.6516  | Added
      |                                                         | gleason.
     9 |  41    3.95993    8     1.83346    -35.69248   0.6567  | Added lcp.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


Use lambda=7.594796178345335 (selected by AICC).

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5057140      0.5234981
          lweight |       0.5386738      0.6152349
              age |      -0.0073599     -0.0190343
             lbph |       0.0585468      0.0954908
              svi |       0.5854749      0.6358643
            pgg45 |       0.0022134      0.0035248
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1243026      0.5214696
------------------+--------------------------------

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1  163.62492    0     0.00000     31.41226   0.0000  | Added _cons.
     2 |   2  149.08894    1     0.06390     26.66962   0.0916  | Added
      |                                                         | lcavol.
     3 |   9   77.73509    2     0.40800    -12.63533   0.4221  | Added svi.
     4 |  11   64.53704    3     0.60174    -18.31145   0.4801  | Added
      |                                                         | lweight.
     5 |  21   25.45474    4     1.35340    -42.20238   0.6123  | Added pgg45.
     6 |  22   23.19341    5     1.39138    -38.93672   0.6175  | Added lbph.
     7 |  29   12.09306    6     1.58269    -39.94418   0.6389  | Added age.
     8 |  35    6.92010    7     1.71689    -38.84649   0.6516  | Added
      |                                                         | gleason.
     9 |  41    3.95993    8     1.83346    -35.69248   0.6567  | Added lcp.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


Use lambda=27.93654463358689 (selected by BIC).

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.4725389      0.5258519
          lweight |       0.3989102      0.6617699
              svi |       0.4400748      0.6656665
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.2975585     -0.7771568
------------------+--------------------------------
r; t=0.47 22:18:30

. *
.
. ********************************************************************************
. *** predicted values (see help file)                                                                             ***
. ********************************************************************************
.
. // xbhat1 is generated by re-estimating the model for lambda=10.  The noisily
. // option triggers the display of the
. // estimation results.  xbhat2 is generated by linear approximation using the
. // two beta estimates closest to
. //    lambda=10.
.
. * load example data
. insheet using "$prostate", tab clear
(11 vars, 97 obs)
r; t=0.53 22:18:30

. global model lpsa lcavol lweight age lbph svi lcp gleason pgg45
r; t=0.00 22:18:30

.
. lasso2 $model

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1  163.62492    0     0.00000     31.41226   0.0000  | Added _cons.
     2 |   2  149.08894    1     0.06390     26.66962   0.0916  | Added
      |                                                         | lcavol.
     3 |   9   77.73509    2     0.40800    -12.63533   0.4221  | Added svi.
     4 |  11   64.53704    3     0.60174    -18.31145   0.4801  | Added
      |                                                         | lweight.
     5 |  21   25.45474    4     1.35340    -42.20238   0.6123  | Added pgg45.
     6 |  22   23.19341    5     1.39138    -38.93672   0.6175  | Added lbph.
     7 |  29   12.09306    6     1.58269    -39.94418   0.6389  | Added age.
     8 |  35    6.92010    7     1.71689    -38.84649   0.6516  | Added
      |                                                         | gleason.
     9 |  41    3.95993    8     1.83346    -35.69248   0.6567  | Added lcp.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


r; t=0.10 22:18:30

. cap drop xbhat1
r; t=0.00 22:18:30

. predict double xbhat1, xb l(10) noisily
Re-estimate model with lambda=10.

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5000819      0.5234981
          lweight |       0.5144276      0.6152349
              age |      -0.0036627     -0.0190343
             lbph |       0.0468469      0.0954908
              svi |       0.5695171      0.6358643
            pgg45 |       0.0017981      0.0035248
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.0014767      0.5214696
------------------+--------------------------------
Use e(b).
Beta used for predict:
        lcavol     lweight         age        lbph         svi       pgg45
y1   .50008192    .5144276  -.00366265   .04684694   .56951709   .00179809

         _cons
y1  -.00147665
r; t=0.06 22:18:30

. cap drop xbhat2
r; t=0.00 22:18:30

. predict double xbhat2, xb l(10) approx
Use linear approximation based on two closest lambda values.
r; t=0.00 22:18:30

.
. //    The model is estimated explicitly using lambda=100.  If lasso2 is
. //called with a scalar lambda value, the
. //   subsequent predict command requires no lambda() option.
. lasso2 $model, lambda(10)

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5000819      0.5234981
          lweight |       0.5144276      0.6152349
              age |      -0.0036627     -0.0190343
             lbph |       0.0468469      0.0954908
              svi |       0.5695171      0.6358643
            pgg45 |       0.0017981      0.0035248
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.0014767      0.5214696
------------------+--------------------------------
r; t=0.01 22:18:30

. cap drop xbhat3
r; t=0.00 22:18:30

. predict double xbhat3, xb
Use e(b) from previous lasso2 estimation (lambda=10).
r; t=0.00 22:18:30

.
. //    All three methods yield the same results.  However note that the linear
. // approximation is only exact for the lasso
. //   which is piecewise linear.
. assert (xbhat1-xbhat2<10e-8) & (xbhat3-xbhat2<10e-8)
r; t=0.00 22:18:30

.
. //It is also possible to obtain predicted values by referencing a specific
. // lambda ID using the lid() option.
. lasso2 $model

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1  163.62492    0     0.00000     31.41226   0.0000  | Added _cons.
     2 |   2  149.08894    1     0.06390     26.66962   0.0916  | Added
      |                                                         | lcavol.
     3 |   9   77.73509    2     0.40800    -12.63533   0.4221  | Added svi.
     4 |  11   64.53704    3     0.60174    -18.31145   0.4801  | Added
      |                                                         | lweight.
     5 |  21   25.45474    4     1.35340    -42.20238   0.6123  | Added pgg45.
     6 |  22   23.19341    5     1.39138    -38.93672   0.6175  | Added lbph.
     7 |  29   12.09306    6     1.58269    -39.94418   0.6389  | Added age.
     8 |  35    6.92010    7     1.71689    -38.84649   0.6516  | Added
      |                                                         | gleason.
     9 |  41    3.95993    8     1.83346    -35.69248   0.6567  | Added lcp.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


r; t=0.11 22:18:30

. cap drop xbhat4
r; t=0.00 22:18:30

. predict double xbhat4, xb lid(21)
Use lambda with id=21. lambda=25.45473900468241.
r; t=0.00 22:18:30

. cap drop xbhat5
r; t=0.00 22:18:30

. predict double xbhat5, xb l(25.45473900468241)
Re-estimate model with lambda=25.45473900468.

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.4757199      0.5067548
          lweight |       0.4225325      0.6650921
              svi |       0.4549056      0.6016864
            pgg45 |       0.0002422      0.0029746
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1984234     -0.8221054
------------------+--------------------------------
Use e(b).
r; t=0.02 22:18:30

. assert (xbhat4-xbhat5<10e-8)
r; t=0.00 22:18:30

.
.
. ********************************************************************************
. *** misc options/syntax checks                                                   ***
. ********************************************************************************
.
. // Support for inrange(.) and similar [if] expressions:
. lasso2 $model if inrange(age,50,70)

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1  132.46591    0     0.00000     28.38569   0.0000  | Added _cons.
     2 |   2  120.69800    1     0.06486     25.38938   0.0900  | Added
      |                                                         | lcavol.
     3 |   8   69.06784    2     0.40294     -2.01859   0.3944  | Added svi.
     4 |  11   52.24729    3     0.64125     -8.91799   0.4758  | Added
      |                                                         | lweight.
     5 |  14   39.52316    4     0.95471    -15.22169   0.5427  | Added pgg45.
     6 |  16   32.81282    5     1.11970    -16.62960   0.5753  | Added
      |                                                         | gleason.
     7 |  24   15.58875    6     1.60389    -23.94188   0.6343  | Added lbph.
     8 |  43    2.66155    7     1.98680    -24.21442   0.6554  | Added lcp.
     9 |  48    1.67153    8     2.08649    -20.33461   0.6575  | Added age.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


r; t=0.10 22:18:31

.
.
. ********************************************************************************
. *** plotting                                                                 ***
. ********************************************************************************
.
. lasso2 $model

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1  163.62492    0     0.00000     31.41226   0.0000  | Added _cons.
     2 |   2  149.08894    1     0.06390     26.66962   0.0916  | Added
      |                                                         | lcavol.
     3 |   9   77.73509    2     0.40800    -12.63533   0.4221  | Added svi.
     4 |  11   64.53704    3     0.60174    -18.31145   0.4801  | Added
      |                                                         | lweight.
     5 |  21   25.45474    4     1.35340    -42.20238   0.6123  | Added pgg45.
     6 |  22   23.19341    5     1.39138    -38.93672   0.6175  | Added lbph.
     7 |  29   12.09306    6     1.58269    -39.94418   0.6389  | Added age.
     8 |  35    6.92010    7     1.71689    -38.84649   0.6516  | Added
      |                                                         | gleason.
     9 |  41    3.95993    8     1.83346    -35.69248   0.6567  | Added lcp.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


r; t=0.10 22:18:31

.
. lasso2, plotpath(lambda) plotlabel plotopt(legend(off))

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1  163.62492    0     0.00000     31.41226   0.0000  | Added _cons.
     2 |   2  149.08894    1     0.06390     26.66962   0.0916  | Added
      |                                                         | lcavol.
     3 |   9   77.73509    2     0.40800    -12.63533   0.4221  | Added svi.
     4 |  11   64.53704    3     0.60174    -18.31145   0.4801  | Added
      |                                                         | lweight.
     5 |  21   25.45474    4     1.35340    -42.20238   0.6123  | Added pgg45.
     6 |  22   23.19341    5     1.39138    -38.93672   0.6175  | Added lbph.
     7 |  29   12.09306    6     1.58269    -39.94418   0.6389  | Added age.
     8 |  35    6.92010    7     1.71689    -38.84649   0.6516  | Added
      |                                                         | gleason.
     9 |  41    3.95993    8     1.83346    -35.69248   0.6567  | Added lcp.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


r; t=3.04 22:18:34

.
. lasso2, plotpath(lnlambda) plotlabel plotopt(legend(off))

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1  163.62492    0     0.00000     31.41226   0.0000  | Added _cons.
     2 |   2  149.08894    1     0.06390     26.66962   0.0916  | Added
      |                                                         | lcavol.
     3 |   9   77.73509    2     0.40800    -12.63533   0.4221  | Added svi.
     4 |  11   64.53704    3     0.60174    -18.31145   0.4801  | Added
      |                                                         | lweight.
     5 |  21   25.45474    4     1.35340    -42.20238   0.6123  | Added pgg45.
     6 |  22   23.19341    5     1.39138    -38.93672   0.6175  | Added lbph.
     7 |  29   12.09306    6     1.58269    -39.94418   0.6389  | Added age.
     8 |  35    6.92010    7     1.71689    -38.84649   0.6516  | Added
      |                                                         | gleason.
     9 |  41    3.95993    8     1.83346    -35.69248   0.6567  | Added lcp.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


(68 real changes made)
r; t=0.98 22:18:35

.
. lasso2, plotpath(norm) plotlabel plotopt(legend(off))

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1  163.62492    0     0.00000     31.41226   0.0000  | Added _cons.
     2 |   2  149.08894    1     0.06390     26.66962   0.0916  | Added
      |                                                         | lcavol.
     3 |   9   77.73509    2     0.40800    -12.63533   0.4221  | Added svi.
     4 |  11   64.53704    3     0.60174    -18.31145   0.4801  | Added
      |                                                         | lweight.
     5 |  21   25.45474    4     1.35340    -42.20238   0.6123  | Added pgg45.
     6 |  22   23.19341    5     1.39138    -38.93672   0.6175  | Added lbph.
     7 |  29   12.09306    6     1.58269    -39.94418   0.6389  | Added age.
     8 |  35    6.92010    7     1.71689    -38.84649   0.6516  | Added
      |                                                         | gleason.
     9 |  41    3.95993    8     1.83346    -35.69248   0.6567  | Added lcp.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


r; t=0.100 22:18:36

.
. lasso2, plotpath(norm) plotlabel plotopt(legend(off)) plotvar(lcavol)

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1  163.62492    0     0.00000     31.41226   0.0000  | Added _cons.
     2 |   2  149.08894    1     0.06390     26.66962   0.0916  | Added
      |                                                         | lcavol.
     3 |   9   77.73509    2     0.40800    -12.63533   0.4221  | Added svi.
     4 |  11   64.53704    3     0.60174    -18.31145   0.4801  | Added
      |                                                         | lweight.
     5 |  21   25.45474    4     1.35340    -42.20238   0.6123  | Added pgg45.
     6 |  22   23.19341    5     1.39138    -38.93672   0.6175  | Added lbph.
     7 |  29   12.09306    6     1.58269    -39.94418   0.6389  | Added age.
     8 |  35    6.92010    7     1.71689    -38.84649   0.6516  | Added
      |                                                         | gleason.
     9 |  41    3.95993    8     1.83346    -35.69248   0.6567  | Added lcp.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


r; t=0.78 22:18:36

.
. ********************************************************************************
. *** validate RSS / r-squared                                                                 ***
. ********************************************************************************
.
. // loop over three mehods. "nopath" corresponds to default standardisation on the fly.
. // "nopath" is just a placeholder that doesn't affect calculations.
. foreach method in prestd unitl nopath {
  2. foreach a of numlist 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 {
  3.         lasso2 $model, alpha(`a') l(10)  `method'
  4.         cap drop xb
  5.         cap drop r
  6.         predict double xb, xb
  7.         predict double r, r
  8.
.         sum lpsa
  9.         di r(sd)^2*98
 10.         local tss=r(sd)^2*98
 11.         sum xb
 12.         di r(sd)^2*98
 13.         local ess=r(sd)^2*98
 14.         sum r
 15.         di r(sd)^2*98
 16.         local rss=r(sd)^2*98
 17.
.         di "r-squared"
 18.         local rsq = 1-`rss'/`tss'
 19.         di `rsq'
 20.
.         lasso2 $model, alpha(`a') l(10 0.1) `method'
 21.         mat list e(rsq)
 22.         mat RSQ = e(rsq)
 23.         di el(RSQ,1,1)
 24.         di reldif(`rsq',el(RSQ,1,1))
 25.         assert reldif(`rsq',el(RSQ,1,1))<10^(-3)
 26. }
 27. }

------------------+--------------------------------
         Selected |           Ridge   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5105488      0.5643413
          lweight |       0.6100509      0.6220198
              age |      -0.0178941     -0.0212482
             lbph |       0.0886328      0.0967125
              svi |       0.7046133      0.7616733
              lcp |      -0.0554655     -0.1060509
          gleason |       0.0607886      0.0492279
            pgg45 |       0.0036299      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.0477573      0.1815609
------------------+--------------------------------
Use e(b) from previous lasso2 estimation (lambda=10).
Use e(b) from previous lasso2 estimation (lambda=10).

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
        lpsa |         97    2.478387    1.154329  -.4307829   5.582932
130.58261

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          xb |         97    2.478387    .9068329    .556724   4.620687
80.58989

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
           r |         97   -6.18e-17    .6719764  -1.745183    1.56272
44.252123
r-squared
.6611178

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1   10.00000    8     2.05162    -40.36132   0.6611  | All
      |                                                         | selected.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


e(rsq)[2,1]
           c1
r1   .6611178
r2  .66338924
.6611178
0

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.100)
------------------+--------------------------------
           lcavol |       0.5050524      0.5643413
          lweight |       0.6005836      0.6220198
              age |      -0.0163864     -0.0212482
             lbph |       0.0846536      0.0967125
              svi |       0.6795890      0.7616733
              lcp |      -0.0390389     -0.1060509
          gleason |       0.0523956      0.0492279
            pgg45 |       0.0033160      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.0663339      0.1815609
------------------+--------------------------------
Use e(b) from previous lasso2 estimation (lambda=10).
Use e(b) from previous lasso2 estimation (lambda=10).

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
        lpsa |         97    2.478387    1.154329  -.4307829   5.582932
130.58261

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          xb |         97    2.478387     .901502   .5819142   4.592524
79.645171

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
           r |         97    3.20e-17    .6731939  -1.742858   1.554802
44.412619
r-squared
.65988871

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1   10.00000    8     1.98102    -39.71132   0.6599  | All
      |                                                         | selected.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


e(rsq)[2,1]
           c1
r1  .65988871
r2  .66338908
.65988871
0

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.200)
------------------+--------------------------------
           lcavol |       0.4992808      0.5643413
          lweight |       0.5910221      0.6220198
              age |      -0.0148419     -0.0212482
             lbph |       0.0805928      0.0967125
              svi |       0.6536565      0.7616733
              lcp |      -0.0219747     -0.1060509
          gleason |       0.0439151      0.0492279
            pgg45 |       0.0029901      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.0844730      0.1815609
------------------+--------------------------------
Use e(b) from previous lasso2 estimation (lambda=10).
Use e(b) from previous lasso2 estimation (lambda=10).

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
        lpsa |         97    2.478387    1.154329  -.4307829   5.582932
130.58261

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          xb |         97    2.478387    .8963413   .6076587   4.563619
78.735908

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
           r |         97   -1.45e-16    .6748858  -1.740599   1.546481
44.636145
r-squared
.65817695

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1   10.00000    8     1.90827    -38.91745   0.6582  | All
      |                                                         | selected.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


e(rsq)[2,1]
           c1
r1  .65817695
r2  .66338887
.65817695
6.695e-17

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.300)
------------------+--------------------------------
           lcavol |       0.4932148      0.5643413
          lweight |       0.5813684      0.6220198
              age |      -0.0132588     -0.0212482
             lbph |       0.0764468      0.0967125
              svi |       0.6267666      0.7616733
              lcp |      -0.0042353     -0.1060509
          gleason |       0.0353515      0.0492279
            pgg45 |       0.0026511      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1020996      0.1815609
------------------+--------------------------------
Use e(b) from previous lasso2 estimation (lambda=10).
Use e(b) from previous lasso2 estimation (lambda=10).

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
        lpsa |         97    2.478387    1.154329  -.4307829   5.582932
130.58261

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          xb |         97    2.478387     .891378   .6339833   4.533936
77.86636

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
           r |         97    6.64e-17    .6770922  -1.738412   1.537726
44.928481
r-squared
.65593825

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1   10.00000    8     1.83329    -37.96888   0.6559  | All
      |                                                         | selected.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


e(rsq)[2,1]
           c1
r1  .65593825
r2   .6633886
.65593825
0

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.400)
------------------+--------------------------------
           lcavol |       0.4927792      0.5186256
          lweight |       0.5718474      0.6217574
              age |      -0.0118795     -0.0193045
             lbph |       0.0723928      0.0949255
              svi |       0.6146470      0.6427775
          gleason |       0.0280621      0.0422021
            pgg45 |       0.0025137      0.0027656
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1055094      0.2537330
------------------+--------------------------------
Use e(b) from previous lasso2 estimation (lambda=10).
Use e(b) from previous lasso2 estimation (lambda=10).

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
        lpsa |         97    2.478387    1.154329  -.4307829   5.582932
130.58261

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          xb |         97    2.478387    .8863477   .6600371   4.505434
76.990002

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
           r |         97   -4.46e-17    .6783814  -1.729801   1.544656
45.099723
r-squared
.65462688

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1   10.00000    7     1.79412    -41.33142   0.6546  | Added lcavol
      |                                                         | lweight age
      |                                                         | lbph svi
      |                                                         | gleason pgg45
      |                                                         | _cons.
     2 |   2    0.10000    8     2.22055    -37.62980   0.6634  | Added lcp.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


e(rsq)[2,1]
           c1
r1  .65462688
r2  .66338828
.65462688
6.710e-17

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.4941626      0.5186256
          lweight |       0.5622500      0.6217574
              age |      -0.0105501     -0.0193045
             lbph |       0.0683305      0.0949255
              svi |       0.6070730      0.6427775
          gleason |       0.0210338      0.0422021
            pgg45 |       0.0024411      0.0027656
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1048456      0.2537330
------------------+--------------------------------
Use e(b) from previous lasso2 estimation (lambda=10).
Use e(b) from previous lasso2 estimation (lambda=10).

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
        lpsa |         97    2.478387    1.154329  -.4307829   5.582932
130.58261

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          xb |         97    2.478387     .881332   .6861924   4.477103
76.121115

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
           r |         97    8.47e-17    .6794662  -1.719114   1.556632
45.244077
r-squared
.65352142

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1   10.00000    7     1.76584    -40.76492   0.6535  | Added lcavol
      |                                                         | lweight age
      |                                                         | lbph svi
      |                                                         | gleason pgg45
      |                                                         | _cons.
     2 |   2    0.10000    8     2.21977    -37.62575   0.6634  | Added lcp.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


e(rsq)[2,1]
           c1
r1  .65352142
r2  .66338791
.65352142
0

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.600)
------------------+--------------------------------
           lcavol |       0.4956051      0.5186256
          lweight |       0.5524971      0.6217574
              age |      -0.0091982     -0.0193045
             lbph |       0.0642069      0.0949255
              svi |       0.5993467      0.6427775
          gleason |       0.0138383      0.0422021
            pgg45 |       0.0023697      0.0027656
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1043694      0.2537330
------------------+--------------------------------
Use e(b) from previous lasso2 estimation (lambda=10).
Use e(b) from previous lasso2 estimation (lambda=10).

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
        lpsa |         97    2.478387    1.154329  -.4307829   5.582932
130.58261

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          xb |         97    2.478387    .8764095   .7126883   4.448381
75.273169

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
           r |         97   -2.75e-17     .680758  -1.708302   1.568834
45.416287
r-squared
.65220264

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1   10.00000    7     1.73706    -40.13340   0.6522  | Added lcavol
      |                                                         | lweight age
      |                                                         | lbph svi
      |                                                         | gleason pgg45
      |                                                         | _cons.
     2 |   2    0.10000    8     2.21898    -37.62168   0.6634  | Added lcp.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


e(rsq)[2,1]
           c1
r1  .65220264
r2  .66338749
.65220264
0

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.700)
------------------+--------------------------------
           lcavol |       0.4971093      0.5186256
          lweight |       0.5425838      0.6217574
              age |      -0.0078234     -0.0193045
             lbph |       0.0600208      0.0949255
              svi |       0.5914607      0.6427775
          gleason |       0.0064666      0.0422021
            pgg45 |       0.0022998      0.0027656
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1041173      0.2537330
------------------+--------------------------------
Use e(b) from previous lasso2 estimation (lambda=10).
Use e(b) from previous lasso2 estimation (lambda=10).

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
        lpsa |         97    2.478387    1.154329  -.4307829   5.582932
130.58261

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          xb |         97    2.478387    .8715883   .7395307   4.419257
74.447286

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
           r |         97   -2.29e-18    .6822649   -1.69736   1.581271
45.617566
r-squared
.65066124

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1   10.00000    7     1.70776    -39.43466   0.6507  | Added lcavol
      |                                                         | lweight age
      |                                                         | lbph svi
      |                                                         | gleason pgg45
      |                                                         | _cons.
     2 |   2    0.10000    8     2.21819    -37.61759   0.6634  | Added lcp.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


e(rsq)[2,1]
           c1
r1  .65066124
r2  .66338702
.65066124
0

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.800)
------------------+--------------------------------
           lcavol |       0.4985532      0.5234981
          lweight |       0.5326719      0.6152349
              age |      -0.0064321     -0.0190343
             lbph |       0.0557559      0.0954908
              svi |       0.5835750      0.6358643
            pgg45 |       0.0022121      0.0035248
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.0972199      0.5214696
------------------+--------------------------------
Use e(b) from previous lasso2 estimation (lambda=10).
Use e(b) from previous lasso2 estimation (lambda=10).

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
        lpsa |         97    2.478387    1.154329  -.4307829   5.582932
130.58261

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          xb |         97    2.478387    .8668781   .7670696   4.389721
73.644805

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
           r |         97   -1.12e-16    .6839801  -1.686343   1.593402
45.847223
r-squared
.64890254

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1   10.00000    6     1.67920    -43.07342   0.6489  | Added lcavol
      |                                                         | lweight age
      |                                                         | lbph svi
      |                                                         | pgg45 _cons.
     2 |   2    0.10000    8     2.21740    -37.61349   0.6634  | Added lcp
      |                                                         | gleason.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


e(rsq)[2,1]
           c1
r1  .64890254
r2  .66338649
.64890254
6.733e-17

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.900)
------------------+--------------------------------
           lcavol |       0.4992975      0.5234981
          lweight |       0.5236155      0.6152349
              age |      -0.0050595     -0.0190343
             lbph |       0.0513361      0.0954908
              svi |       0.5765816      0.6358643
            pgg45 |       0.0020069      0.0035248
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.0483824      0.5214696
------------------+--------------------------------
Use e(b) from previous lasso2 estimation (lambda=10).
Use e(b) from previous lasso2 estimation (lambda=10).

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
        lpsa |         97    2.478387    1.154329  -.4307829   5.582932
130.58261

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          xb |         97    2.478387    .8622798   .7970699   4.359753
72.865597

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
           r |         97    7.21e-17    .6858277  -1.675575   1.602379
46.095248
r-squared
.64700316

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1   10.00000    6     1.65790    -42.34952   0.6470  | Added lcavol
      |                                                         | lweight age
      |                                                         | lbph svi
      |                                                         | pgg45 _cons.
     2 |   2    0.10000    8     2.21661    -37.60937   0.6634  | Added lcp
      |                                                         | gleason.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


e(rsq)[2,1]
           c1
r1  .64700316
r2  .66338592
.64700316
6.741e-17

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5000819      0.5234981
          lweight |       0.5144276      0.6152349
              age |      -0.0036627     -0.0190343
             lbph |       0.0468469      0.0954908
              svi |       0.5695171      0.6358643
            pgg45 |       0.0017981      0.0035248
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.0014767      0.5214696
------------------+--------------------------------
Use e(b) from previous lasso2 estimation (lambda=10).
Use e(b) from previous lasso2 estimation (lambda=10).

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
        lpsa |         97    2.478387    1.154329  -.4307829   5.582932
130.58261

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          xb |         97    2.478387    .8577877   .8078181   4.329356
72.108375

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
           r |         97   -1.55e-16    .6878957  -1.664717   1.611452
46.373655
r-squared
.64487113

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1   10.00000    6     1.63633    -41.56110   0.6449  | Added lcavol
      |                                                         | lweight age
      |                                                         | lbph svi
      |                                                         | pgg45 _cons.
     2 |   2    0.10000    8     2.21583    -37.60523   0.6634  | Added lcp
      |                                                         | gleason.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


e(rsq)[2,1]
           c1
r1  .64487113
r2  .66338529
.64487113
6.750e-17

------------------+--------------------------------
         Selected |           Ridge   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5531218      0.5643413
          lweight |       0.4704009      0.6220198
              age |      -0.0177003     -0.0212482
             lbph |       0.1023850      0.0967125
              svi |       0.4952079      0.7616733
              lcp |      -0.0371192     -0.1060509
          gleason |       0.0183286      0.0492279
            pgg45 |       0.0048530      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.7888275      0.1815609
------------------+--------------------------------
Use e(b) from previous lasso2 estimation (lambda=10).
Use e(b) from previous lasso2 estimation (lambda=10).

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
        lpsa |         97    2.478387    1.154329  -.4307829   5.582932
130.58261

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          xb |         97    2.478387    .8894576   .5972995   4.551781
77.531219

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
           r |         97    7.98e-16     .677917  -1.630923   1.630327
45.038003
r-squared
.65509953

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1   10.00000    8     1.69912    -39.94226   0.6551  | All
      |                                                         | selected.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


e(rsq)[2,1]
           c1
r1  .65509953
r2  .66338776
.65509953
6.708e-17

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.100)
------------------+--------------------------------
           lcavol |       0.5503715      0.5695460
          lweight |       0.4571544      0.6144198
              age |      -0.0169344     -0.0209135
             lbph |       0.1005039      0.0973525
              svi |       0.4690652      0.7523973
              lcp |      -0.0252770     -0.1049594
            pgg45 |       0.0050274      0.0053245
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.9191800      0.4941547
------------------+--------------------------------
Use e(b) from previous lasso2 estimation (lambda=10).
Use e(b) from previous lasso2 estimation (lambda=10).

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
        lpsa |         97    2.478387    1.154329  -.4307829   5.582932
130.58261

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          xb |         97    2.478387    .8853654   .6114653   4.534532
76.819445

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
           r |         97    2.91e-16    .6797278  -1.622706   1.634044
45.278926
r-squared
.65325455

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1   10.00000    7     1.62433    -42.79657   0.6533  | Added lcavol
      |                                                         | lweight age
      |                                                         | lbph svi lcp
      |                                                         | pgg45 _cons.
     2 |   2    0.10000    8     2.21711    -37.66535   0.6634  | Added
      |                                                         | gleason.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


e(rsq)[2,1]
           c1
r1  .65325455
r2  .66338749
.65325455
0

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.200)
------------------+--------------------------------
           lcavol |       0.5459408      0.5695460
          lweight |       0.4453915      0.6144198
              age |      -0.0162700     -0.0209135
             lbph |       0.0984370      0.0973525
              svi |       0.4431457      0.7523973
              lcp |      -0.0131979     -0.1049594
            pgg45 |       0.0048762      0.0053245
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.9370901      0.4941547
------------------+--------------------------------
Use e(b) from previous lasso2 estimation (lambda=10).
Use e(b) from previous lasso2 estimation (lambda=10).

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
        lpsa |         97    2.478387    1.154329  -.4307829   5.582932
130.58261

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          xb |         97    2.478387    .8812201   .6322407   4.516004
76.101796

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
           r |         97    4.41e-16     .681686  -1.614035   1.629223
45.540189
r-squared
.6512538

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1   10.00000    7     1.56726    -41.94746   0.6513  | Added lcavol
      |                                                         | lweight age
      |                                                         | lbph svi lcp
      |                                                         | pgg45 _cons.
     2 |   2    0.10000    8     2.21630    -37.65867   0.6634  | Added
      |                                                         | gleason.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


e(rsq)[2,1]
           c1
r1   .6512538
r2  .66338719
.6512538
0

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.300)
------------------+--------------------------------
           lcavol |       0.5415306      0.5695460
          lweight |       0.4330429      0.6144198
              age |      -0.0155897     -0.0209135
             lbph |       0.0963602      0.0973525
              svi |       0.4150099      0.7523973
              lcp |      -0.0005859     -0.1049594
            pgg45 |       0.0047227      0.0053245
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.9567125      0.4941547
------------------+--------------------------------
Use e(b) from previous lasso2 estimation (lambda=10).
Use e(b) from previous lasso2 estimation (lambda=10).

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
        lpsa |         97    2.478387    1.154329  -.4307829   5.582932
130.58261

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          xb |         97    2.478387    .8770547   .6535504   4.496546
75.384038

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
           r |         97   -1.80e-16    .6839955  -1.604488   1.624703
45.849283
r-squared
.64888676

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1   10.00000    7     1.50684    -40.98242   0.6489  | Added lcavol
      |                                                         | lweight age
      |                                                         | lbph svi lcp
      |                                                         | pgg45 _cons.
     2 |   2    0.10000    8     2.21549    -37.65198   0.6634  | Added
      |                                                         | gleason.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


e(rsq)[2,1]
           c1
r1  .64888676
r2  .66338684
.64888676
6.733e-17

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.400)
------------------+--------------------------------
           lcavol |       0.5429310      0.5234981
          lweight |       0.4203058      0.6152349
              age |      -0.0151207     -0.0190343
             lbph |       0.0943510      0.0954908
              svi |       0.3954042      0.6358643
            pgg45 |       0.0047988      0.0035248
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.9737815      0.5214696
------------------+--------------------------------
Use e(b) from previous lasso2 estimation (lambda=10).
Use e(b) from previous lasso2 estimation (lambda=10).

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
        lpsa |         97    2.478387    1.154329  -.4307829   5.582932
130.58261

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          xb |         97    2.478387     .872551   .6738324   4.477466
74.611826

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
           r |         97    2.47e-16    .6855298   -1.58652   1.637044
46.055203
r-squared
.64730983

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1   10.00000    6     1.47291    -44.38989   0.6473  | Added lcavol
      |                                                         | lweight age
      |                                                         | lbph svi
      |                                                         | pgg45 _cons.
     2 |   2    0.10000    8     2.21468    -37.64527   0.6634  | Added lcp
      |                                                         | gleason.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


e(rsq)[2,1]
           c1
r1  .64730983
r2  .66338646
.64730983
1.348e-16

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.5448927      0.5234981
          lweight |       0.4068396      0.6152349
              age |      -0.0146552     -0.0190343
             lbph |       0.0923695      0.0954908
              svi |       0.3748606      0.6358643
            pgg45 |       0.0048908      0.0035248
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.9926750      0.5214696
------------------+--------------------------------
Use e(b) from previous lasso2 estimation (lambda=10).
Use e(b) from previous lasso2 estimation (lambda=10).

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
        lpsa |         97    2.478387    1.154329  -.4307829   5.582932
130.58261

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          xb |         97    2.478387    .8679893   .6941573   4.457743
73.833739

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
           r |         97    1.18e-16    .6872318   -1.56723   1.650851
46.284175
r-squared
.64555637

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1   10.00000    6     1.43851    -43.61047   0.6456  | Added lcavol
      |                                                         | lweight age
      |                                                         | lbph svi
      |                                                         | pgg45 _cons.
     2 |   2    0.10000    8     2.21387    -37.63855   0.6634  | Added lcp
      |                                                         | gleason.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


e(rsq)[2,1]
           c1
r1  .64555637
r2  .66338603
.64555637
0

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.600)
------------------+--------------------------------
           lcavol |       0.5471817      0.5234981
          lweight |       0.3925644      0.6152349
              age |      -0.0141821     -0.0190343
             lbph |       0.0904151      0.0954908
              svi |       0.3527118      0.6358643
            pgg45 |       0.0049883      0.0035248
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.0137930      0.5214696
------------------+--------------------------------
Use e(b) from previous lasso2 estimation (lambda=10).
Use e(b) from previous lasso2 estimation (lambda=10).

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
        lpsa |         97    2.478387    1.154329  -.4307829   5.582932
130.58261

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          xb |         97    2.478387    .8633911   .6958018   4.437251
73.053527

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
           r |         97    2.68e-16    .6891834  -1.546867   1.665426
46.547422
r-squared
.64354042

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1   10.00000    6     1.40204    -42.74113   0.6435  | Added lcavol
      |                                                         | lweight age
      |                                                         | lbph svi
      |                                                         | pgg45 _cons.
     2 |   2    0.10000    8     2.21305    -37.63181   0.6634  | Added lcp
      |                                                         | gleason.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


e(rsq)[2,1]
           c1
r1  .64354042
r2  .66338557
.64354042
6.755e-17

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.700)
------------------+--------------------------------
           lcavol |       0.5498390      0.5234981
          lweight |       0.3774052      0.6152349
              age |      -0.0137011     -0.0190343
             lbph |       0.0884900      0.0954908
              svi |       0.3287573      0.6358643
            pgg45 |       0.0050919      0.0035248
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.0373481      0.5214696
------------------+--------------------------------
Use e(b) from previous lasso2 estimation (lambda=10).
Use e(b) from previous lasso2 estimation (lambda=10).

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
        lpsa |         97    2.478387    1.154329  -.4307829   5.582932
130.58261

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          xb |         97    2.478387    .8587654   .6969612   4.415912
72.272846

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
           r |         97    3.83e-16    .6914216  -1.525305   1.680865
46.850255
r-squared
.64122133

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1   10.00000    6     1.36328    -41.76953   0.6412  | Added lcavol
      |                                                         | lweight age
      |                                                         | lbph svi
      |                                                         | pgg45 _cons.
     2 |   2    0.10000    8     2.21224    -37.62505   0.6634  | Added lcp
      |                                                         | gleason.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


e(rsq)[2,1]
           c1
r1  .64122133
r2  .66338507
.64122133
1.353e-16

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.800)
------------------+--------------------------------
           lcavol |       0.5529122      0.5234981
          lweight |       0.3612776      0.6152349
              age |      -0.0132115     -0.0190343
             lbph |       0.0865965      0.0954908
              svi |       0.3027617      0.6358643
            pgg45 |       0.0052026      0.0035248
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.0635781      0.5214696
------------------+--------------------------------
Use e(b) from previous lasso2 estimation (lambda=10).
Use e(b) from previous lasso2 estimation (lambda=10).

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
        lpsa |         97    2.478387    1.154329  -.4307829   5.582932
130.58261

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          xb |         97    2.478387    .8541253   .6975675   4.393634
71.493935

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
           r |         97    1.85e-16    .6939912  -1.502396   1.697278
47.199136
r-squared
.6385496

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1   10.00000    6     1.32196    -40.68098   0.6385  | Added lcavol
      |                                                         | lweight age
      |                                                         | lbph svi
      |                                                         | pgg45 _cons.
     2 |   2    0.10000    8     2.21143    -37.61827   0.6634  | Added lcp
      |                                                         | gleason.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


e(rsq)[2,1]
           c1
r1   .6385496
r2  .66338453
.6385496
0

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.900)
------------------+--------------------------------
           lcavol |       0.5564575      0.5234981
          lweight |       0.3440875      0.6152349
              age |      -0.0127129     -0.0190343
             lbph |       0.0847364      0.0954908
              svi |       0.2744456      0.6358643
            pgg45 |       0.0053213      0.0035248
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.0927493      0.5214696
------------------+--------------------------------
Use e(b) from previous lasso2 estimation (lambda=10).
Use e(b) from previous lasso2 estimation (lambda=10).

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
        lpsa |         97    2.478387    1.154329  -.4307829   5.582932
130.58261

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          xb |         97    2.478387    .8494885   .6975409   4.370314
70.719812

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
           r |         97    1.50e-16    .6969467  -1.477969   1.714799
47.601995
r-squared
.63546451

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1   10.00000    6     1.27776    -39.45787   0.6355  | Added lcavol
      |                                                         | lweight age
      |                                                         | lbph svi
      |                                                         | pgg45 _cons.
     2 |   2    0.10000    8     2.21061    -37.61148   0.6634  | Added lcp
      |                                                         | gleason.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


e(rsq)[2,1]
           c1
r1  .63546451
r2  .66338395
.63546451
6.788e-17

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5605410      0.5234981
          lweight |       0.3257289      0.6152349
              age |      -0.0122044     -0.0190343
             lbph |       0.0829113      0.0954908
              svi |       0.2434763      0.6358643
            pgg45 |       0.0054490      0.0035248
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       1.1251603      0.5214696
------------------+--------------------------------
Use e(b) from previous lasso2 estimation (lambda=10).
Use e(b) from previous lasso2 estimation (lambda=10).

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
        lpsa |         97    2.478387    1.154329  -.4307829   5.582932
130.58261

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          xb |         97    2.478387    .8448798    .696787   4.345829
69.954538

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
           r |         97    5.05e-16    .7003545  -1.451817   1.733588
48.068648
r-squared
.63189089

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1   10.00000    6     1.23031    -38.07893   0.6319  | Added lcavol
      |                                                         | lweight age
      |                                                         | lbph svi
      |                                                         | pgg45 _cons.
     2 |   2    0.10000    8     2.20980    -37.60467   0.6634  | Added lcp
      |                                                         | gleason.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


e(rsq)[2,1]
           c1
r1  .63189089
r2  .66338334
.63189089
0

------------------+--------------------------------
         Selected |           Ridge   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5105488      0.5643413
          lweight |       0.6100509      0.6220198
              age |      -0.0178941     -0.0212482
             lbph |       0.0886328      0.0967125
              svi |       0.7046133      0.7616733
              lcp |      -0.0554655     -0.1060509
          gleason |       0.0607886      0.0492279
            pgg45 |       0.0036299      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.0477573      0.1815609
------------------+--------------------------------
Use e(b) from previous lasso2 estimation (lambda=10).
Use e(b) from previous lasso2 estimation (lambda=10).

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
        lpsa |         97    2.478387    1.154329  -.4307829   5.582932
130.58261

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          xb |         97    2.478387    .9068329    .556724   4.620687
80.58989

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
           r |         97    1.40e-16    .6719764  -1.745183    1.56272
44.252123
r-squared
.6611178

e(rsq)[2,1]
           c1
r1   .6611178
r2  .66338924
.6611178
6.684e-17

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.100)
------------------+--------------------------------
           lcavol |       0.5050524      0.5643413
          lweight |       0.6005836      0.6220198
              age |      -0.0163864     -0.0212482
             lbph |       0.0846536      0.0967125
              svi |       0.6795890      0.7616733
              lcp |      -0.0390389     -0.1060509
          gleason |       0.0523956      0.0492279
            pgg45 |       0.0033160      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.0663339      0.1815609
------------------+--------------------------------
Use e(b) from previous lasso2 estimation (lambda=10).
Use e(b) from previous lasso2 estimation (lambda=10).

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
        lpsa |         97    2.478387    1.154329  -.4307829   5.582932
130.58261

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          xb |         97    2.478387     .901502   .5819142   4.592524
79.645171

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
           r |         97    4.69e-16    .6731939  -1.742858   1.554802
44.412619
r-squared
.65988871

e(rsq)[2,1]
           c1
r1  .65988871
r2  .66338908
.65988871
0

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.200)
------------------+--------------------------------
           lcavol |       0.4992808      0.5643413
          lweight |       0.5910221      0.6220198
              age |      -0.0148419     -0.0212482
             lbph |       0.0805928      0.0967125
              svi |       0.6536565      0.7616733
              lcp |      -0.0219747     -0.1060509
          gleason |       0.0439151      0.0492279
            pgg45 |       0.0029901      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.0844730      0.1815609
------------------+--------------------------------
Use e(b) from previous lasso2 estimation (lambda=10).
Use e(b) from previous lasso2 estimation (lambda=10).

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
        lpsa |         97    2.478387    1.154329  -.4307829   5.582932
130.58261

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          xb |         97    2.478387    .8963413   .6076587   4.563619
78.735908

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
           r |         97    3.43e-18    .6748858  -1.740599   1.546481
44.636145
r-squared
.65817695

e(rsq)[2,1]
           c1
r1  .65817695
r2  .66338887
.65817695
1.339e-16

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.300)
------------------+--------------------------------
           lcavol |       0.4932148      0.5643413
          lweight |       0.5813684      0.6220198
              age |      -0.0132588     -0.0212482
             lbph |       0.0764468      0.0967125
              svi |       0.6267666      0.7616733
              lcp |      -0.0042353     -0.1060509
          gleason |       0.0353515      0.0492279
            pgg45 |       0.0026511      0.0044575
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1020996      0.1815609
------------------+--------------------------------
Use e(b) from previous lasso2 estimation (lambda=10).
Use e(b) from previous lasso2 estimation (lambda=10).

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
        lpsa |         97    2.478387    1.154329  -.4307829   5.582932
130.58261

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          xb |         97    2.478387     .891378   .6339833   4.533936
77.86636

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
           r |         97    9.05e-16    .6770922  -1.738412   1.537726
44.928481
r-squared
.65593825

e(rsq)[2,1]
           c1
r1  .65593825
r2   .6633886
.65593825
0

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.400)
------------------+--------------------------------
           lcavol |       0.4927792      0.5186256
          lweight |       0.5718474      0.6217574
              age |      -0.0118795     -0.0193045
             lbph |       0.0723928      0.0949255
              svi |       0.6146470      0.6427775
          gleason |       0.0280621      0.0422021
            pgg45 |       0.0025137      0.0027656
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1055094      0.2537330
------------------+--------------------------------
Use e(b) from previous lasso2 estimation (lambda=10).
Use e(b) from previous lasso2 estimation (lambda=10).

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
        lpsa |         97    2.478387    1.154329  -.4307829   5.582932
130.58261

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          xb |         97    2.478387    .8863477   .6600371   4.505434
76.990002

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
           r |         97    7.52e-16    .6783814  -1.729801   1.544656
45.099723
r-squared
.65462688

e(rsq)[2,1]
           c1
r1  .65462688
r2  .66338828
.65462688
6.710e-17

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
           lcavol |       0.4941626      0.5186256
          lweight |       0.5622500      0.6217574
              age |      -0.0105501     -0.0193045
             lbph |       0.0683305      0.0949255
              svi |       0.6070730      0.6427775
          gleason |       0.0210338      0.0422021
            pgg45 |       0.0024411      0.0027656
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1048456      0.2537330
------------------+--------------------------------
Use e(b) from previous lasso2 estimation (lambda=10).
Use e(b) from previous lasso2 estimation (lambda=10).

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
        lpsa |         97    2.478387    1.154329  -.4307829   5.582932
130.58261

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          xb |         97    2.478387     .881332   .6861924   4.477103
76.121115

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
           r |         97    7.47e-16    .6794662  -1.719114   1.556632
45.244077
r-squared
.65352142

e(rsq)[2,1]
           c1
r1  .65352142
r2  .66338791
.65352142
0

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.600)
------------------+--------------------------------
           lcavol |       0.4956051      0.5186256
          lweight |       0.5524971      0.6217574
              age |      -0.0091982     -0.0193045
             lbph |       0.0642069      0.0949255
              svi |       0.5993467      0.6427775
          gleason |       0.0138383      0.0422021
            pgg45 |       0.0023697      0.0027656
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1043694      0.2537330
------------------+--------------------------------
Use e(b) from previous lasso2 estimation (lambda=10).
Use e(b) from previous lasso2 estimation (lambda=10).

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
        lpsa |         97    2.478387    1.154329  -.4307829   5.582932
130.58261

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          xb |         97    2.478387    .8764095   .7126883   4.448381
75.273169

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
           r |         97   -5.47e-16     .680758  -1.708302   1.568834
45.416287
r-squared
.65220264

e(rsq)[2,1]
           c1
r1  .65220264
r2  .66338749
.65220264
0

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.700)
------------------+--------------------------------
           lcavol |       0.4971093      0.5186256
          lweight |       0.5425838      0.6217574
              age |      -0.0078234     -0.0193045
             lbph |       0.0600208      0.0949255
              svi |       0.5914607      0.6427775
          gleason |       0.0064666      0.0422021
            pgg45 |       0.0022998      0.0027656
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.1041173      0.2537330
------------------+--------------------------------
Use e(b) from previous lasso2 estimation (lambda=10).
Use e(b) from previous lasso2 estimation (lambda=10).

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
        lpsa |         97    2.478387    1.154329  -.4307829   5.582932
130.58261

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          xb |         97    2.478387    .8715883   .7395307   4.419257
74.447286

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
           r |         97    1.05e-16    .6822649   -1.69736   1.581271
45.617566
r-squared
.65066124

e(rsq)[2,1]
           c1
r1  .65066124
r2  .66338702
.65066124
0

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.800)
------------------+--------------------------------
           lcavol |       0.4985532      0.5234981
          lweight |       0.5326719      0.6152349
              age |      -0.0064321     -0.0190343
             lbph |       0.0557559      0.0954908
              svi |       0.5835750      0.6358643
            pgg45 |       0.0022121      0.0035248
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.0972199      0.5214696
------------------+--------------------------------
Use e(b) from previous lasso2 estimation (lambda=10).
Use e(b) from previous lasso2 estimation (lambda=10).

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
        lpsa |         97    2.478387    1.154329  -.4307829   5.582932
130.58261

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          xb |         97    2.478387    .8668781   .7670696   4.389721
73.644805

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
           r |         97    1.66e-16    .6839801  -1.686343   1.593402
45.847223
r-squared
.64890254

e(rsq)[2,1]
           c1
r1  .64890254
r2  .66338649
.64890254
6.733e-17

------------------+--------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.900)
------------------+--------------------------------
           lcavol |       0.4992975      0.5234981
          lweight |       0.5236155      0.6152349
              age |      -0.0050595     -0.0190343
             lbph |       0.0513361      0.0954908
              svi |       0.5765816      0.6358643
            pgg45 |       0.0020069      0.0035248
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       0.0483824      0.5214696
------------------+--------------------------------
Use e(b) from previous lasso2 estimation (lambda=10).
Use e(b) from previous lasso2 estimation (lambda=10).

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
        lpsa |         97    2.478387    1.154329  -.4307829   5.582932
130.58261

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          xb |         97    2.478387    .8622798   .7970699   4.359753
72.865597

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
           r |         97    9.27e-17    .6858277  -1.675575   1.602379
46.095248
r-squared
.64700316

e(rsq)[2,1]
           c1
r1  .64700316
r2  .66338592
.64700316
6.741e-17

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
           lcavol |       0.5000819      0.5234981
          lweight |       0.5144276      0.6152349
              age |      -0.0036627     -0.0190343
             lbph |       0.0468469      0.0954908
              svi |       0.5695171      0.6358643
            pgg45 |       0.0017981      0.0035248
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |      -0.0014767      0.5214696
------------------+--------------------------------
Use e(b) from previous lasso2 estimation (lambda=10).
Use e(b) from previous lasso2 estimation (lambda=10).

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
        lpsa |         97    2.478387    1.154329  -.4307829   5.582932
130.58261

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          xb |         97    2.478387    .8577877   .8078181   4.329356
72.108375

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
           r |         97    1.93e-16    .6878957  -1.664717   1.611452
46.373655
r-squared
.64487113

e(rsq)[2,1]
           c1
r1  .64487113
r2  .66338529
.64487113
6.750e-17
r; t=1.46 22:18:38

. *
.
. ********************************************************************************
. *** validate EBIC default gamma                                                          ***
. ********************************************************************************
.
. webuse air2, clear
(TIMESLAB: Airline passengers)
r; t=1.12 22:18:39

.
. lasso2 air L(1/24).air

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   1  2.589e+04    0     0.00000   1132.42949   0.0000  | Added _cons.
     2 |   2  2.359e+04    1     0.09413   1116.99198   0.1661  | Added
      |                                                         | L12.air.
     3 |   9  1.230e+04    2     0.55800    975.07219   0.7576  | Added
      |                                                         | L24.air.
     4 |  17 5843.21467    3     0.83360    832.60228   0.9299  | Added L.air.
     5 |  32 1447.40889    4     1.01818    698.55972   0.9782  | Added
      |                                                         | L11.air.
     6 |  46  393.49088    5     1.07091    685.29492   0.9815  | Added
      |                                                         | L19.air.
     7 |  50  271.21800    7     1.12664    689.63389   0.9828  | Added
      |                                                         | L15.air
      |                                                         | L20.air.
     8 |  53  205.16647    9     1.19399    694.16100   0.9839  | Added
      |                                                         | L14.air
      |                                                         | L18.air.
     9 |  55  170.33281    9     1.25057    688.14194   0.9847  | Added
      |                                                         | L23.air.
      |                                                         | Removed
      |                                                         | L15.air.
    10 |  59  117.40380    9     1.34817    680.05176   0.9857  | Added
      |                                                         | L5.air.
      |                                                         | Removed
      |                                                         | L19.air.
    11 |  60  106.97397   11     1.42478    687.39745   0.9863  | Added L3.air
      |                                                         | L13.air.
    12 |  61   97.47070   13     1.53152    692.87726   0.9871  | Added L2.air
      |                                                         | L9.air.
    13 |  65   67.18277   12     1.89388    664.14532   0.9893  | Removed
      |                                                         | L11.air.
    14 |  68   50.82130   13     2.08047    661.04155   0.9901  | Added
      |                                                         | L17.air.
    15 |  73   31.91726   14     2.33489    657.76334   0.9909  | Added
      |                                                         | L10.air.
    16 |  79   18.26423   15     2.62208    657.13165   0.9914  | Added
      |                                                         | L7.air.
    17 |  81   15.16328   17     2.72576    668.15309   0.9915  | Added
      |                                                         | L16.air
      |                                                         | L22.air.
    18 |  82   13.81622   18     2.80975    673.29812   0.9916  | Added
      |                                                         | L19.air.
    19 |  84   11.47047   17     2.98383    664.72054   0.9918  | Removed
      |                                                         | L7.air.
    20 |  86    9.52298   18     3.13968    669.40362   0.9919  | Added
      |                                                         | L4.air.
    21 |  87    8.67699   19     3.24017    674.78790   0.9919  | Added
      |                                                         | L8.air.
    22 |  88    7.90615   21     3.37133    686.35029   0.9920  | Added
      |                                                         | L15.air
      |                                                         | L21.air.
    23 |  94    4.52419   22     4.15532    687.42407   0.9924  | Added
      |                                                         | L7.air.
    24 |  96    3.75606   23     4.39699    692.66979   0.9924  | Added
      |                                                         | L11.air.
    25 |  97    3.42238   24     4.50778    698.58039   0.9925  | Added
      |                                                         | L6.air.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


r; t=6.93 22:18:46

.
. local myebicgamma = 1-log(e(N))/(2*log(e(p)))
r; t=0.00 22:18:46

.
. di `myebicgamma'
.24678876
r; t=0.00 22:18:46

. di e(ebicgamma)
.24678876
r; t=0.00 22:18:46

. assert reldif(`myebicgamma',e(ebicgamma))<10^(-3)
r; t=0.00 22:18:46

.
. ********************************************************************************
. *** panel example: validate within transformation                            ***
. ********************************************************************************
.
. use "http://fmwww.bc.edu/ec-p/data/macro/abdata.dta", clear
(Layard & Nickell, Unemployment in Britain, Economica 53, 1986 from Ox dist)
r; t=0.79 22:18:47

.
. lasso2 ys l(0/3).k l(0/3).n, fe l(10)

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
                k |
              --. |       0.1031105      0.1284247
              L3. |      -0.0102968     -0.0618353
                  |
                n |       0.0873134      0.1114129
------------------+--------------------------------
r; t=0.82 22:18:48

. mat A = e(b)
r; t=0.00 22:18:48

.
. lasso2 ys l(0/3).k l(0/3).n ibn.id, partial(ibn.id) l(10) nor
Warning: reduced rank encountered when partialling out (may be caused by omitted vars).

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
                k |
              --. |       0.1031105      0.1284247
              L3. |      -0.0102968     -0.0618353
                  |
                n |       0.0873134      0.1114129
------------------+--------------------------------
r; t=0.09 22:18:48

. mat B = e(b)
r; t=0.00 22:18:48

.
. comparemat A B
mreldif=0. tolerance = .01

__000000[1,3]
                        L3.
             k           k           n
y1   .10311054  -.01029679   .08731341

__000001[1,3]
                        L3.
             k           k           n
y1   .10311054  -.01029679   .08731341
r; t=0.00 22:18:48

.
. // noftools option
. lasso2 ys l(0/3).k l(0/3).n, fe l(10)

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
                k |
              --. |       0.1031105      0.1284247
              L3. |      -0.0102968     -0.0618353
                  |
                n |       0.0873134      0.1114129
------------------+--------------------------------
r; t=0.02 22:18:48

. savedresults save ftools e()
r; t=0.01 22:18:48

. cap noi assert "`e(noftools)'"==""  // will be error if ftools not installed
r; t=0.00 22:18:48

. lasso2 ys l(0/3).k l(0/3).n, fe l(10) noftools

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
                k |
              --. |       0.1031105      0.1284247
              L3. |      -0.0102968     -0.0618353
                  |
                n |       0.0873134      0.1114129
------------------+--------------------------------
r; t=0.04 22:18:48

. assert "`e(noftools)'"=="noftools"
r; t=0.00 22:18:48

. savedresults comp ftools e(), exclude(macros: lasso2opt)
r; t=0.00 22:18:48

.
. ********************************************************************************
. ***  check if partial() works with fe                                                    ***
. ***  and followed by lic()                                                                                                       ***
. ********************************************************************************
.
. clear
r; t=0.00 22:18:48

. use https://www.stata-press.com/data/r16/nlswork
(National Longitudinal Survey.  Young Women 14-26 years of age in 1968)
r; t=2.96 22:18:51

.
. lasso2 ln_w grade age c.age#c.age ttl_exp c.ttl_exp#c.ttl_exp tenure ///
>                 c.tenure#c.tenure 2.race not_smsa south i.year, fe

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   2 5523.95218    1     0.00275  -6.9888e+04   0.0233  | Added
      |                                                         | ttl_exp.
     2 |   9 2880.19324    2     0.01668  -7.2396e+04   0.1070  | Added
      |                                                         | tenure.
     3 |  21  943.13344    3     0.03511  -7.3452e+04   0.1403  | Added
      |                                                         | not_smsa.
     4 |  26  592.31529    4     0.07427  -7.3590e+04   0.1448  | Added south.
     5 |  27  539.69563    5     0.08561  -7.3603e+04   0.1455  | Added
      |                                                         | 78.year.
     6 |  29  448.06479    6     0.11132  -7.3640e+04   0.1469  | Added
      |                                                         | c.tenure#c.tenure.
     7 |  31  371.99126    7     0.13629  -7.3806e+04   0.1523  | Added
      |                                                         | 77.year.
     8 |  34  281.39775    9     0.17394  -7.3962e+04   0.1576  | Added
      |                                                         | 70.year
      |                                                         | 87.year.
     9 |  35  256.39915   10     0.19050  -7.3999e+04   0.1590  | Added
      |                                                         | 69.year.
    10 |  37  212.86708   11     0.22150  -7.4061e+04   0.1612  | Added
      |                                                         | 71.year.
    11 |  38  193.95655   14     0.23841  -7.4075e+04   0.1625  | Added
      |                                                         | c.age#c.age
      |                                                         | 80.year
      |                                                         | 83.year.
    12 |  41  146.72102   16     0.28669  -7.4174e+04   0.1660  | Added
      |                                                         | 72.year
      |                                                         | 82.year.
    13 |  45  101.12911   17     0.34256  -7.4252e+04   0.1686  | Added
      |                                                         | 88.year.
    14 |  48   76.50046   18     0.37335  -7.4279e+04   0.1698  | Added
      |                                                         | c.ttl_exp#c.ttl_exp.
    15 |  50   63.51203   19     0.39324  -7.4319e+04   0.1712  | Added age.
    16 |  51   57.86979   20     0.40355  -7.4346e+04   0.1723  | Added
      |                                                         | 75.year.
    17 |  55   39.88740   19     0.43636  -7.4454e+04   0.1752  | Removed
      |                                                         | 70.year.
    18 |  56   36.34392   18     0.44327  -7.4479e+04   0.1757  | Removed
      |                                                         | 80.year.
    19 |  57   33.11522   18     0.45041  -7.4492e+04   0.1760  | Added
      |                                                         | 85.year.
      |                                                         | Removed
      |                                                         | 87.year.
    20 |  61   22.82504   19     0.47614  -7.4512e+04   0.1769  | Added
      |                                                         | 80.year.
    21 |  63   18.94975   18     0.48742  -7.4532e+04   0.1772  | Removed
      |                                                         | 85.year.
    22 |  65   15.73241   19     0.49792  -7.4528e+04   0.1774  | Added
      |                                                         | 70.year.
    23 |  66   14.33479   20     0.50290  -7.4520e+04   0.1775  | Added
      |                                                         | 73.year.
    24 |  68   11.90099   21     0.51189  -7.4514e+04   0.1776  | Added
      |                                                         | 87.year.
    25 |  77    5.15166   21     0.53905  -7.4522e+04   0.1778  | Added
      |                                                         | 85.year.
      |                                                         | Removed
      |                                                         | 87.year.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


r; t=4.94 22:18:56

. ereturn list

scalars:
                  e(N) =  28091
            e(stdcoef) =  0
             e(stdall) =  0
               e(cons) =  0
                 e(fe) =  1
              e(alpha) =  1
               e(sqrt) =  0
                e(ols) =  0
           e(adaptive) =  0
                  e(p) =  24
          e(notpen_ct) =  0
         e(partial_ct) =  0
             e(prestd) =  0
             e(lcount) =  78
               e(lmax) =  6062.53069665433
              e(lmax0) =  6062.53069665433
               e(lmin) =  4.693997343558959
              e(lmin0) =  .606253069665433
           e(dofminus) =  4697
          e(sdofminus) =  0
              e(lebic) =  17.26630487756461
               e(lbic) =  17.26630487756461
              e(laicc) =  4.693997343558959
               e(laic) =  4.693997343558959
             e(slebic) =  59.21263172124715
              e(slbic) =  59.21263172124715
             e(slaicc) =  16.09747644186581
              e(slaic) =  16.09747644186581
          e(ebicgamma) =  0
            e(ebicmin) =  -74535.24086414839
             e(bicmin) =  -74535.24086414839
            e(aiccmin) =  -74694.94003267155
             e(aicmin) =  -74694.97145411794
           e(sebicmin) =  -74532.77610817748
            e(sbicmin) =  -74532.77610817748
           e(saiccmin) =  -74692.47527670064
            e(saicmin) =  -74692.50669814703

macros:
          e(lasso2opt) : "fe"
               e(varX) : "grade age c.age#c.age ttl_exp c.ttl_exp#c.ttl_exp.."
          e(varXmodel) : "grade age c.age#c.age ttl_exp c.ttl_exp#c.ttl_exp.."
                e(cmd) : "lasso2"
            e(predict) : "lasso2_p"
             e(method) : "lasso"
             e(depvar) : "ln_wage"

matrices:
                e(sIC) :  78 x 4
                 e(IC) :  78 x 4
                e(rsq) :  78 x 1
                e(tss) :  1 x 1
                e(ess) :  78 x 1
                e(rss) :  78 x 1
             e(stdvec) :  1 x 25
        e(slambdamat0) :  100 x 1
         e(slambdamat) :  78 x 1
         e(lambdamat0) :  100 x 1
          e(lambdamat) :  78 x 1
                 e(s0) :  78 x 1
                  e(s) :  78 x 1
                e(dof) :  78 x 1
             e(sbetas) :  78 x 25
              e(betas) :  78 x 25
                e(Psi) :  1 x 25
           e(swl1norm) :  78 x 1
            e(wl1norm) :  78 x 1
            e(sl1norm) :  78 x 1
             e(l1norm) :  78 x 1

functions:
             e(sample)
r; t=0.00 22:18:56

.
. lasso2 ln_w grade age c.age#c.age ttl_exp c.ttl_exp#c.ttl_exp tenure ///
>                 c.tenure#c.tenure 2.race not_smsa south i.year, fe partial(i.year)
Warning: reduced rank encountered when partialling out (may be caused by omitted vars).

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   2 2898.89250    1     0.00370  -7.2474e+04   0.0072  | Added
      |                                                         | ttl_exp.
     2 |   6 1998.09415    2     0.01549  -7.2992e+04   0.0257  | Added
      |                                                         | tenure.
     3 |   9 1511.48495    3     0.02240  -7.3301e+04   0.0367  | Added
      |                                                         | c.age#c.age.
     4 |  14  949.25660    4     0.03505  -7.3710e+04   0.0509  | Added
      |                                                         | not_smsa.
     5 |  19  596.16081    5     0.07446  -7.3925e+04   0.0585  | Added south.
     6 |  21  494.94318    6     0.09546  -7.3973e+04   0.0605  | Added age.
     7 |  22  450.97379    7     0.11113  -7.4001e+04   0.0618  | Added
      |                                                         | c.tenure#c.tenure.
     8 |  47   44.06059    8     0.27286  -7.4511e+04   0.0790  | Added
      |                                                         | c.ttl_exp#c.ttl_exp.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


r; t=1.47 22:18:57

. lasso2, lic(ebic)

Use lambda=48.35644138521425 (selected by EBIC).
Warning: reduced rank encountered when partialling out (may be caused by omitted vars).

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
              age |       0.0607910      0.0671831
                  |
      c.age#c.age |      -0.0009214     -0.0009470
                  |
          ttl_exp |       0.0364118      0.0372629
           tenure |       0.0318196      0.0346238
                  |
c.tenure#c.tenure |      -0.0016795     -0.0018790
                  |
         not_smsa |      -0.0832515     -0.0873545
            south |      -0.0562493     -0.0610894
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
                             (base)         (base)
              69  |       0.0491099      0.0430126
              70  |      -0.0198334     -0.0328126
              71  |      -0.0093085     -0.0283742
              72  |      -0.0316153     -0.0563319
              73  |      -0.0628361     -0.0935920
              75  |      -0.1068323     -0.1485457
              77  |      -0.1055919     -0.1582206
              78  |      -0.1128058     -0.1717528
              80  |      -0.1610137     -0.2301391
              82  |      -0.2057063     -0.2857677
              83  |      -0.2165320     -0.3021568
              85  |      -0.2096810     -0.3049752
              87  |      -0.2307205     -0.3356083
              88  |      -0.2018983     -0.3135982
------------------+--------------------------------
r; t=0.54 22:18:58

.
. lasso2 ln_w grade age c.age#c.age ttl_exp c.ttl_exp#c.ttl_exp tenure ///
>                 c.tenure#c.tenure 2.race not_smsa south i.year, fe partial(i.year) ///
>                 lic(ebic)
Warning: reduced rank encountered when partialling out (may be caused by omitted vars).

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   2 2898.89250    1     0.00370  -7.2474e+04   0.0072  | Added
      |                                                         | ttl_exp.
     2 |   6 1998.09415    2     0.01549  -7.2992e+04   0.0257  | Added
      |                                                         | tenure.
     3 |   9 1511.48495    3     0.02240  -7.3301e+04   0.0367  | Added
      |                                                         | c.age#c.age.
     4 |  14  949.25660    4     0.03505  -7.3710e+04   0.0509  | Added
      |                                                         | not_smsa.
     5 |  19  596.16081    5     0.07446  -7.3925e+04   0.0585  | Added south.
     6 |  21  494.94318    6     0.09546  -7.3973e+04   0.0605  | Added age.
     7 |  22  450.97379    7     0.11113  -7.4001e+04   0.0618  | Added
      |                                                         | c.tenure#c.tenure.
     8 |  47   44.06059    8     0.27286  -7.4511e+04   0.0790  | Added
      |                                                         | c.ttl_exp#c.ttl_exp.
Use long option for full output.

Use lambda=48.35644138521425 (selected by EBIC).
Warning: reduced rank encountered when partialling out (may be caused by omitted vars).

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
              age |       0.0607910      0.0671831
                  |
      c.age#c.age |      -0.0009214     -0.0009470
                  |
          ttl_exp |       0.0364118      0.0372629
           tenure |       0.0318196      0.0346238
                  |
c.tenure#c.tenure |      -0.0016795     -0.0018790
                  |
         not_smsa |      -0.0832515     -0.0873545
            south |      -0.0562493     -0.0610894
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
                             (base)         (base)
              69  |       0.0491099      0.0430126
              70  |      -0.0198334     -0.0328126
              71  |      -0.0093085     -0.0283742
              72  |      -0.0316153     -0.0563319
              73  |      -0.0628361     -0.0935920
              75  |      -0.1068323     -0.1485457
              77  |      -0.1055919     -0.1582206
              78  |      -0.1128058     -0.1717528
              80  |      -0.1610137     -0.2301391
              82  |      -0.2057063     -0.2857677
              83  |      -0.2165320     -0.3021568
              85  |      -0.2096810     -0.3049752
              87  |      -0.2307205     -0.3356083
              88  |      -0.2018983     -0.3135982
------------------+--------------------------------
r; t=2.07 22:19:00

.
. ********************************************************************************
. ***  check residuals with fe                                                                                             ***
. ********************************************************************************
.
. clear
r; t=0.00 22:19:00

. use https://www.stata-press.com/data/r16/nlswork
(National Longitudinal Survey.  Young Women 14-26 years of age in 1968)
r; t=2.85 22:19:03

.
. foreach opt in xb u e ue xbu {
  2.         cap drop `opt'hat_lasso2
  3.         cap drop `opt'hat_xtreg
  4. }
r; t=0.00 22:19:03

. cap drop esample
r; t=0.00 22:19:03

.
. **replace ln_w = . if year == 80
.
. lasso2 ln_w grade age c.age#c.age ttl_exp c.ttl_exp#c.ttl_exp tenure ///
>                 c.tenure#c.tenure 2.race not_smsa south , fe

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   2 5523.95218    1     0.00275  -6.9888e+04   0.0233  | Added
      |                                                         | ttl_exp.
     2 |   9 2880.19324    2     0.01668  -7.2396e+04   0.1070  | Added
      |                                                         | tenure.
     3 |  21  943.13344    3     0.03511  -7.3452e+04   0.1403  | Added
      |                                                         | not_smsa.
     4 |  26  592.31529    4     0.07427  -7.3590e+04   0.1448  | Added south.
     5 |  29  448.06479    5     0.10355  -7.3641e+04   0.1466  | Added
      |                                                         | c.tenure#c.tenure.
     6 |  38  193.95655    6     0.17281  -7.4099e+04   0.1608  | Added
      |                                                         | c.age#c.age.
     7 |  47   83.95916    7     0.20680  -7.4283e+04   0.1665  | Added
      |                                                         | c.ttl_exp#c.ttl_exp.
     8 |  49   69.70437    8     0.21298  -7.4306e+04   0.1675  | Added age.
     9 |  52   52.72880    7     0.22378  -7.4391e+04   0.1697  | Removed
      |                                                         | c.ttl_exp#c.ttl_exp.
    10 |  67   13.06133    8     0.24910  -7.4471e+04   0.1724  | Added
      |                                                         | c.ttl_exp#c.ttl_exp.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


r; t=2.24 22:19:05

. gen byte esample=e(sample)
r; t=0.00 22:19:05

. lasso2, lic(ebic) postres ols

Use lambda=14.33478964607695 (selected by EBIC).

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
              age |       0.0266178      0.0328779
                  |
      c.age#c.age |      -0.0005710     -0.0006813
                  |
          ttl_exp |       0.0371534      0.0378266
           tenure |       0.0341690      0.0342721
                  |
c.tenure#c.tenure |      -0.0018447     -0.0018569
                  |
         not_smsa |      -0.0879979     -0.0889315
            south |      -0.0599204     -0.0609728
------------------+--------------------------------
r; t=0.31 22:19:05

. mat bl2 = e(b)
r; t=0.00 22:19:05

. local selected = e(selected)
r; t=0.00 22:19:05

. di "`selected'"
age c.age#c.age ttl_exp tenure c.tenure#c.tenure not_smsa south
r; t=0.00 22:19:05

. //ereturn list
.
. // confirm post-lasso LSDV matches xtreg,fe
. foreach opt in xb u e ue xbu {
  2.         predict double `opt'hat_lasso2, ols `opt'
  3. }
Use e(betaOLS) from previous lasso2 estimation (lambda=14.33478964608).
(441 missing values generated)
Use e(betaOLS) from previous lasso2 estimation (lambda=14.33478964608).
(443 missing values generated)
Use e(betaOLS) from previous lasso2 estimation (lambda=14.33478964608).
(443 missing values generated)
Use e(betaOLS) from previous lasso2 estimation (lambda=14.33478964608).
(441 missing values generated)
Use e(betaOLS) from previous lasso2 estimation (lambda=14.33478964608).
(443 missing values generated)
r; t=0.40 22:19:06

. xtreg ln_w `selected' if esample, fe

Fixed-effects (within) regression               Number of obs     =     28,091
Group variable: idcode                          Number of groups  =      4,697

R-sq:                                           Obs per group:
     within  = 0.1726                                         min =          1
     between = 0.3491                                         avg =        6.0
     overall = 0.2622                                         max =         15

                                                F(7,23387)        =     696.82
corr(u_i, Xb)  = 0.1903                         Prob > F          =     0.0000

-------------+----------------------------------------------------------------
      ln_wage |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0328779    .0028409     11.57    0.000      .0273096     .0384462
             |
 c.age#c.age |   -.0006813    .0000472    -14.43    0.000     -.0007738    -.0005887
             |
     ttl_exp |    .0378266    .0014704     25.73    0.000      .0349446     .0407087
      tenure |    .0342721    .0016285     21.05    0.000      .0310802      .037464
             |
    c.tenure#|
    c.tenure |   -.0018569    .0001056    -17.58    0.000     -.0020639    -.0016499
             |
    not_smsa |   -.0889315    .0095319     -9.33    0.000     -.1076146    -.0702484
       south |   -.0609728    .0109305     -5.58    0.000     -.0823973    -.0395483
       _cons |    1.078853    .0419035     25.75    0.000      .9967193     1.160987
-------------+----------------------------------------------------------------
     sigma_u |  .35541321
     sigma_e |  .29070083
         rho |  .59916157   (fraction of variance due to u_i)
-------------+----------------------------------------------------------------
F test that all u_i=0: F(4696, 23387) = 6.65                 Prob > F = 0.0000
r; t=0.40 22:19:06

. foreach opt in xb u e ue xbu {
  2.         predict double `opt'hat_xtreg, `opt'
  3. }
(441 missing values generated)
(443 missing values generated)
(443 missing values generated)
(441 missing values generated)
(443 missing values generated)
r; t=0.43 22:19:06

. foreach opt in xb u e ue xbu {
  2.         di "checking option `opt'
  3.         assert reldif(`opt'hat_lasso2, `opt'hat_xtreg) < 1e-6
  4. }
checking option xb
checking option u
checking option e
checking option ue
checking option xbu
r; t=0.02 22:19:06

.
.
. ** alt approach from 2nd half
. clear
r; t=0.00 22:19:06

. use https://www.stata-press.com/data/r16/nlswork
(National Longitudinal Survey.  Young Women 14-26 years of age in 1968)
r; t=2.74 22:19:09

.
. replace ln_w = . if year == 80
(1,847 real changes made, 1,847 to missing)
r; t=0.00 22:19:09

.
. lasso2 ln_w grade age c.age#c.age ttl_exp c.ttl_exp#c.ttl_exp tenure ///
>                 c.tenure#c.tenure 2.race not_smsa south , fe

  Knot|  ID     Lambda    s      L1-Norm        EBIC     R-sq   | Action
------+---------------------------------------------------------+---------------
     1 |   2 5260.89117    1     0.00274  -6.5312e+04   0.0240  | Added
      |                                                         | ttl_exp.
     2 |   8 3010.47535    2     0.01479  -6.7521e+04   0.1031  | Added
      |                                                         | tenure.
     3 |  21  898.21965    3     0.03515  -6.8770e+04   0.1450  | Added
      |                                                         | not_smsa.
     4 |  26  564.10812    4     0.07321  -6.8901e+04   0.1496  | Added south.
     5 |  29  426.72710    5     0.10321  -6.8952e+04   0.1516  | Added
      |                                                         | c.tenure#c.tenure.
     6 |  38  184.71998    6     0.17422  -6.9405e+04   0.1664  | Added
      |                                                         | c.age#c.age.
     7 |  47   79.96087    7     0.20877  -6.9587e+04   0.1725  | Added
      |                                                         | c.ttl_exp#c.ttl_exp.
     8 |  49   66.38492    8     0.21441  -6.9601e+04   0.1732  | Added age.
     9 |  54   41.69166    7     0.23097  -6.9716e+04   0.1765  | Removed
      |                                                         | c.ttl_exp#c.ttl_exp.
    10 |  69   10.32734    8     0.25211  -6.9769e+04   0.1785  | Added
      |                                                         | c.ttl_exp#c.ttl_exp.
Use long option for full output.


Type e.g. lasso2, lic(ebic) to run the model selected by EBIC.


r; t=2.05 22:19:11

. lasso2, lic(ebic) postres ols

Use lambda=11.33424642912561 (selected by EBIC).

------------------+--------------------------------
         Selected |           Lasso   Post-est OLS
------------------+--------------------------------
              age |       0.0276373      0.0330033
                  |
      c.age#c.age |      -0.0005866     -0.0006806
                  |
          ttl_exp |       0.0367445      0.0372828
           tenure |       0.0356436      0.0357082
                  |
c.tenure#c.tenure |      -0.0019053     -0.0019142
                  |
         not_smsa |      -0.0892079     -0.0899220
            south |      -0.0597044     -0.0605564
------------------+--------------------------------
r; t=0.30 22:19:11

.
. local sel = e(selected)
r; t=0.00 22:19:11

. di "`sel'"
age c.age#c.age ttl_exp tenure c.tenure#c.tenure not_smsa south
r; t=0.00 22:19:11

.
. predict double uehat  , ue noi
Use e(b) from previous lasso2 estimation (lambda=11.33424642913).
(2,253 missing values generated)
Beta used for predict:
                     c.age#                           c.tenure#
           age       c.age     ttl_exp      tenure    c.tenure    not_smsa
y1    .0330033  -.00068058   .03728278    .0357082  -.00191421  -.08992203


         south
y1  -.06055644
r; t=0.07 22:19:12

. predict double ehat  , e noi
Use e(b) from previous lasso2 estimation (lambda=11.33424642913).
(2,255 missing values generated)
Beta used for predict:
                     c.age#                           c.tenure#
           age       c.age     ttl_exp      tenure    c.tenure    not_smsa
y1    .0330033  -.00068058   .03728278    .0357082  -.00191421  -.08992203


         south
y1  -.06055644
r; t=0.09 22:19:12

. predict double xbhat  , xb noi
Use e(b) from previous lasso2 estimation (lambda=11.33424642913).
(441 missing values generated)
Beta used for predict:
                     c.age#                           c.tenure#
           age       c.age     ttl_exp      tenure    c.tenure    not_smsa
y1    .0330033  -.00068058   .03728278    .0357082  -.00191421  -.08992203


         south
y1  -.06055644
r; t=0.07 22:19:12

. predict double xbuhat  , xbu noi
Use e(b) from previous lasso2 estimation (lambda=11.33424642913).
(2,255 missing values generated)
Beta used for predict:
                     c.age#                           c.tenure#
           age       c.age     ttl_exp      tenure    c.tenure    not_smsa
y1    .0330033  -.00068058   .03728278    .0357082  -.00191421  -.08992203


         south
y1  -.06055644
r; t=0.09 22:19:12

. predict double uhat  , u noi
Use e(b) from previous lasso2 estimation (lambda=11.33424642913).
(2,255 missing values generated)
Beta used for predict:
                     c.age#                           c.tenure#
           age       c.age     ttl_exp      tenure    c.tenure    not_smsa
y1    .0330033  -.00068058   .03728278    .0357082  -.00191421  -.08992203


         south
y1  -.06055644
r; t=0.10 22:19:12

.
. xtreg ln_w `sel' if e(sample), fe

Fixed-effects (within) regression               Number of obs     =     26,279
Group variable: idcode                          Number of groups  =      4,686

R-sq:                                           Obs per group:
     within  = 0.1786                                         min =          1
     between = 0.3530                                         avg =        5.6
     overall = 0.2662                                         max =         14

                                                F(7,21586)        =     670.64
corr(u_i, Xb)  = 0.1930                         Prob > F          =     0.0000

-------------+----------------------------------------------------------------
      ln_wage |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0330033    .0029458     11.20    0.000      .0272294     .0387772
             |
 c.age#c.age |   -.0006806    .0000487    -13.97    0.000     -.0007761    -.0005851
             |
     ttl_exp |    .0372828    .0015061     24.75    0.000      .0343307     .0402349
      tenure |    .0357082    .0017123     20.85    0.000       .032352     .0390644
             |
    c.tenure#|
    c.tenure |   -.0019142    .0001095    -17.47    0.000     -.0021289    -.0016995
             |
    not_smsa |    -.089922    .0099008     -9.08    0.000     -.1093284    -.0705157
       south |   -.0605564    .0114483     -5.29    0.000     -.0829959     -.038117
       _cons |    1.074643    .0433838     24.77    0.000      .9896076     1.159678
-------------+----------------------------------------------------------------
     sigma_u |  .35740248
     sigma_e |  .29207998
         rho |  .59956903   (fraction of variance due to u_i)
-------------+----------------------------------------------------------------
F test that all u_i=0: F(4685, 21586) = 6.23                 Prob > F = 0.0000
r; t=0.30 22:19:12

. mat bxtreg = e(b)
r; t=0.00 22:19:12

.
. predict double uehat_xtreg   , ue
(2,253 missing values generated)
r; t=0.02 22:19:12

. predict double ehat_xtreg   , e
(2,255 missing values generated)
r; t=0.14 22:19:12

. predict double xbhat_xtreg  , xb
(441 missing values generated)
r; t=0.01 22:19:12

. predict double xbuhat_xtreg  , xbu
(2,255 missing values generated)
r; t=0.12 22:19:12

. predict double uhat_xtreg  , u
(2,255 missing values generated)
r; t=0.12 22:19:13

.
. assert abs(ehat_xtreg-ehat)<10e-8 | (missing(ehat_xtreg) | missing(ehat))
r; t=0.00 22:19:13

. assert abs(uehat_xtreg-uehat)<10e-8 | (missing(uehat_xtreg) | missing(uehat))
r; t=0.01 22:19:13

. assert abs(xbhat_xtreg-xbhat)<10e-8 | (missing(xbhat_xtreg) | missing(xbhat))
r; t=0.01 22:19:13

. assert abs(xbuhat_xtreg-xbuhat)<10e-8 | (missing(xbuhat_xtreg) | missing(xbuhat))
r; t=0.00 22:19:13

. assert abs(uhat_xtreg-uhat)<10e-8 | (missing(uhat_xtreg) | missing(uhat))
r; t=0.00 22:19:13

.
.
.
. ********************************************************************************
. *** finish                                                                   ***
. ********************************************************************************
.
. cap log close