Statistical Modelling and Variable Selection in Climate Science
375
which is “Gaussian” by default, impl represents implementation language of optimization, which is “cpp” by default, lambda.min.ratio represents the ratio of
maximum and minimum values of lambda (and ignored if lambda is specified),
nlambda represents the number of lambda values (and is ignored if lambda is
specified), lambda represents the sequence of lambda, warm represents the start
direction, which is “lambda” (by default).
Smaller value of lambda.min.ratio will make most of the irrelevant regression coefficients to be zero at a faster rate. A good value is chosen by carrying out the
analysis with various choices of λ. The choice of experimenter governs the choice
of number of λ (denoted by nlambda).
In this case, X and y are obtained using the following R commands:
X=matrix(10, 6, data
=
c(windspeed, precipitation,
relhum, cars, popden, alutox))
y=matrix(10, 1, data=c(rain))
The outcome of the LASSO command is as follows:
> lasso(X, y, family = "gaussian", impl = "cpp", lambda.min.ratio =
1e-04, nlambda = 5, lambda = NULL, warm = "lambda")
$beta_standard
[,1]
[,2]
[,3]
[,4]
[,5]
[1,]
0 1.093604 2.2540010 2.36140700 2.37006178
[2,]
0 1.211091 1.3580289 1.36199061 1.36741534
[3,]
0 5.645381 7.1753399 7.36416278 7.37978940
[4,]
0 0.000000 -0.5473151 -0.66697505 -0.67714038
[5,]
0 0.000000 0.0000000 0.02745814 0.03623476
[6,]
0 1.172396 0.8320210 0.78825473 0.78336277
$lambda
[1] 6.8514073913 0.6851407391 0.0685140739 0.0068514074 0.0006851407
$alpha
[1] 1
$delta
[1] 0
$beta
6.85140739126796 0.685140739126797 0.0685140739126797 0.00685140739126797 0.000685140739126797
[1,]
0
0.595512226
1.227395626
1.2858825615
1.2905954387
[2,]
0
0.403999981
0.453016174
0.4543377503
0.4561473537
[3,]
0
0.816642613
1.037961474
1.0652759794
1.0675364769
[4,]
0
0.000000000
-0.002455242
-0.0029920340
-0.0030376354
[5,]
0
0.000000000
0.000000000
0.0001125857
0.0001485722
[6,]
0
0.005371423
0.003811968
0.0036114497
0.0035890369
$a0
[,1]
[,2]
[,3]
[,4]
[,5]
[1,] 127.97 55.18544 31.88029 29.52176 29.27646
attr(,"names")
[1] "6.85140739126796"
"0.685140739126797"
"0.0685140739126797"
"0.00685140739126797"
"0.000685140739126797"
$family
[1] "gaussian"
The screenshot of this outcome when executed over the R software is as follows:
Précédent

- 376/553

Suivant