This function is now deprecated. Please use ridgeP instead.

ridgeS(S, lambda, type = "Alt", target = default.target(S))

Arguments

S

Sample covariance matrix.

lambda

A numeric representing the value of the penalty parameter.

type

A character indicating the type of ridge estimator to be used. Must be one of: "Alt", "ArchI", "ArchII".

target

A target matrix (in precision terms) for Type I ridge estimators.

Value

Function returns a regularized precision matrix.

Details

See ridgeP.

See also

Author

Carel F.W. Peeters <carel.peeters@wur.nl>, Wessel N. van Wieringen

Examples


## Obtain some (high-dimensional) data
p = 25
n = 10
set.seed(333)
X = matrix(rnorm(n*p), nrow = n, ncol = p)
colnames(X)[1:25] = letters[1:25]
Cx <- covML(X)

## Obtain regularized precision matrix
ridgeS(Cx, lambda = 10, type = "Alt")
#> Warning: This function is deprecated. Please use ridgeP instead.
#>               a             b            c             d            e
#> a  0.7586005611 -3.388106e-03 -0.062306628 -0.0026003511  0.017829395
#> b -0.0033881061  8.242435e-01 -0.020123673 -0.0086472201 -0.031021296
#> c -0.0623066280 -2.012367e-02  0.764718837 -0.0387376011  0.026085391
#> d -0.0026003511 -8.647220e-03 -0.038737601  0.8175180716  0.025132790
#> e  0.0178293946 -3.102130e-02  0.026085391  0.0251327896  0.774812407
#> f  0.0008224896  7.036266e-03  0.016128380  0.0022115795 -0.007716194
#> g  0.0239384853  2.987486e-02 -0.012622966 -0.0372816975  0.062273754
#> h -0.0184532319 -2.016088e-02 -0.017811658  0.0111872795 -0.005983202
#> i -0.0470808853 -1.320536e-03 -0.050429118 -0.0102469052 -0.005016085
#> j  0.0104108210  1.273107e-02  0.041011188  0.0004608857  0.012722811
#> k -0.0131022276  2.557898e-02  0.020638624  0.0126209008  0.050816129
#> l  0.0277590914 -2.068251e-03  0.006432918  0.0140749509 -0.015112009
#> m -0.0020174916  2.716174e-03 -0.019386166  0.0215940085 -0.028209810
#> n -0.0050899852 -3.421883e-02  0.028203144  0.0374757352 -0.058307497
#> o -0.0298904142 -1.737302e-03 -0.033993574 -0.0067855046  0.023577321
#> p -0.0135277622  1.138140e-02  0.012192115 -0.0041639552  0.036093905
#> q  0.0551271528  2.630552e-02  0.047234421  0.0041346960  0.033640610
#> r -0.0409270257  1.074517e-02 -0.037103191 -0.0067177023  0.033946832
#> s  0.0187078578  9.049344e-05 -0.020540566 -0.0284800378  0.022291853
#> t -0.0037077889 -1.690321e-02 -0.014231135 -0.0024523956 -0.018163057
#> u -0.0198084868 -8.668786e-04 -0.034835952 -0.0118549709  0.027191508
#> v -0.0335506701 -2.568611e-02 -0.067083077 -0.0323202749  0.035487211
#> w  0.0157456815  2.298104e-02  0.010338930  0.0038751229  0.012513934
#> x  0.0292757599  4.649014e-03  0.006331822  0.0273137627 -0.014949799
#> y  0.0070194748  1.148079e-03  0.009556118  0.0140203937 -0.012091685
#>               f            g            h             i             j
#> a  0.0008224896  0.023938485 -0.018453232 -0.0470808853  0.0104108210
#> b  0.0070362659  0.029874865 -0.020160876 -0.0013205357  0.0127310720
#> c  0.0161283801 -0.012622966 -0.017811658 -0.0504291179  0.0410111882
#> d  0.0022115795 -0.037281697  0.011187280 -0.0102469052  0.0004608857
#> e -0.0077161936  0.062273754 -0.005983202 -0.0050160851  0.0127228115
#> f  0.8303406862 -0.027948754 -0.001694060 -0.0008401972 -0.0042258829
#> g -0.0279487543  0.730220491 -0.007778146  0.0046553159  0.0229314532
#> h -0.0016940600 -0.007778146  0.811790777 -0.0016188175  0.0334725837
#> i -0.0008401972  0.004655316 -0.001618817  0.8112361283  0.0281494771
#> j -0.0042258829  0.022931453  0.033472584  0.0281494771  0.8030401602
#> k -0.0185728401 -0.035677847 -0.012348125  0.0253943227 -0.0251907952
#> l  0.0023936548  0.002304446  0.001210866  0.0008949424  0.0220445024
#> m -0.0018737321  0.009864846 -0.004756187 -0.0313568497  0.0448545754
#> n  0.0168437455  0.068879430 -0.047938427  0.0277609348  0.0043522696
#> o  0.0147906192  0.016179835  0.004670393 -0.0058931715 -0.0037850078
#> p  0.0008642891 -0.034133310 -0.017715835  0.0070383765 -0.0058047255
#> q -0.0185548657 -0.032054257  0.022673030  0.0251858785 -0.0368767434
#> r -0.0052481289 -0.002607246  0.012193002 -0.0236799071 -0.0032747580
#> s -0.0004541730 -0.060722864 -0.004402116 -0.0028112502  0.0260398598
#> t -0.0105699848 -0.009197778 -0.026308197  0.0011667515  0.0179069907
#> u  0.0183676161  0.013238884  0.010435589  0.0016139404 -0.0078895059
#> v  0.0397788162  0.016005142 -0.009825413 -0.0095763668  0.0090720048
#> w -0.0368897092 -0.035477080  0.014557746 -0.0056232667 -0.0092374685
#> x -0.0014562788  0.010277123  0.007403657 -0.0012875400  0.0246045874
#> y -0.0100608024  0.009426456  0.017442178  0.0007104261  0.0052519063
#>               k             l             m            n            o
#> a -0.0131022276  0.0277590914 -0.0020174916 -0.005089985 -0.029890414
#> b  0.0255789789 -0.0020682507  0.0027161744 -0.034218827 -0.001737302
#> c  0.0206386237  0.0064329182 -0.0193861661  0.028203144 -0.033993574
#> d  0.0126209008  0.0140749509  0.0215940085  0.037475735 -0.006785505
#> e  0.0508161286 -0.0151120086 -0.0282098101 -0.058307497  0.023577321
#> f -0.0185728401  0.0023936548 -0.0018737321  0.016843745  0.014790619
#> g -0.0356778467  0.0023044464  0.0098648456  0.068879430  0.016179835
#> h -0.0123481250  0.0012108659 -0.0047561873 -0.047938427  0.004670393
#> i  0.0253943227  0.0008949424 -0.0313568497  0.027760935 -0.005893171
#> j -0.0251907952  0.0220445024  0.0448545754  0.004352270 -0.003785008
#> k  0.7919840968  0.0145247777  0.0267107840  0.009680268 -0.007959987
#> l  0.0145247777  0.8281242740 -0.0393495308  0.017837074  0.001717317
#> m  0.0267107840 -0.0393495308  0.7921869253  0.019705584 -0.003267645
#> n  0.0096802678  0.0178370735  0.0197055844  0.722693528  0.011566322
#> o -0.0079599867  0.0017173170 -0.0032676445  0.011566322  0.831133082
#> p -0.0289796530  0.0232900959  0.0417812937 -0.008226868  0.017578383
#> q -0.0403380771 -0.0115900459  0.0127985120  0.061999123  0.013663539
#> r -0.0206727117 -0.0054939353 -0.0181878881  0.059407408 -0.031004871
#> s  0.0080620186 -0.0085836621 -0.0011216986  0.034433413  0.007897329
#> t  0.0006461893  0.0049746259 -0.0045811257 -0.032851992  0.001310240
#> u -0.0071545162  0.0018665882 -0.0009302928  0.012171909 -0.039476483
#> v  0.0114430467  0.0096174706  0.0168930005 -0.001362309 -0.038506838
#> w -0.0301450863 -0.0143661301 -0.0253453570  0.065639858  0.001297911
#> x  0.0075322245 -0.0558881608 -0.0663671412  0.038799832 -0.009921826
#> y  0.0028295809 -0.0369055638 -0.0367185905  0.040816631 -0.008922838
#>               p            q            r             s             t
#> a -0.0135277622  0.055127153 -0.040927026  1.870786e-02 -0.0037077889
#> b  0.0113814004  0.026305523  0.010745169  9.049344e-05 -0.0169032091
#> c  0.0121921153  0.047234421 -0.037103191 -2.054057e-02 -0.0142311346
#> d -0.0041639552  0.004134696 -0.006717702 -2.848004e-02 -0.0024523956
#> e  0.0360939054  0.033640610  0.033946832  2.229185e-02 -0.0181630567
#> f  0.0008642891 -0.018554866 -0.005248129 -4.541730e-04 -0.0105699848
#> g -0.0341333099 -0.032054257 -0.002607246 -6.072286e-02 -0.0091977785
#> h -0.0177158353  0.022673030  0.012193002 -4.402116e-03 -0.0263081972
#> i  0.0070383765  0.025185879 -0.023679907 -2.811250e-03  0.0011667515
#> j -0.0058047255 -0.036876743 -0.003274758  2.603986e-02  0.0179069907
#> k -0.0289796530 -0.040338077 -0.020672712  8.062019e-03  0.0006461893
#> l  0.0232900959 -0.011590046 -0.005493935 -8.583662e-03  0.0049746259
#> m  0.0417812937  0.012798512 -0.018187888 -1.121699e-03 -0.0045811257
#> n -0.0082268677  0.061999123  0.059407408  3.443341e-02 -0.0328519922
#> o  0.0175783825  0.013663539 -0.031004871  7.897329e-03  0.0013102396
#> p  0.7937112327 -0.010501867  0.016366395 -1.453934e-02  0.0147201267
#> q -0.0105018671  0.757364872 -0.015103087 -1.108296e-03  0.0247241993
#> r  0.0163663948 -0.015103087  0.807436924  5.143353e-03  0.0110409176
#> s -0.0145393446 -0.001108296  0.005143353  8.220992e-01 -0.0014786838
#> t  0.0147201267  0.024724199  0.011040918 -1.478684e-03  0.8315488933
#> u  0.0281843153  0.013628334 -0.029953009  6.678695e-03 -0.0023284664
#> v -0.0024803522  0.031688866 -0.019089549 -1.096010e-02  0.0013064244
#> w  0.0275664464 -0.063035943 -0.036020971  2.733150e-03 -0.0023237007
#> x  0.0487962438 -0.025856194 -0.028478077 -5.798014e-04  0.0075267137
#> y  0.0303086817 -0.010854167 -0.029443191 -7.038769e-04  0.0131367455
#>               u            v             w             x             y
#> a -0.0198084868 -0.033550670  0.0157456815  0.0292757599  0.0070194748
#> b -0.0008668786 -0.025686113  0.0229810411  0.0046490144  0.0011480793
#> c -0.0348359521 -0.067083077  0.0103389296  0.0063318217  0.0095561180
#> d -0.0118549709 -0.032320275  0.0038751229  0.0273137627  0.0140203937
#> e  0.0271915077  0.035487211  0.0125139342 -0.0149497995 -0.0120916851
#> f  0.0183676161  0.039778816 -0.0368897092 -0.0014562788 -0.0100608024
#> g  0.0132388837  0.016005142 -0.0354770805  0.0102771226  0.0094264560
#> h  0.0104355893 -0.009825413  0.0145577461  0.0074036567  0.0174421783
#> i  0.0016139404 -0.009576367 -0.0056232667 -0.0012875400  0.0007104261
#> j -0.0078895059  0.009072005 -0.0092374685  0.0246045874  0.0052519063
#> k -0.0071545162  0.011443047 -0.0301450863  0.0075322245  0.0028295809
#> l  0.0018665882  0.009617471 -0.0143661301 -0.0558881608 -0.0369055638
#> m -0.0009302928  0.016893000 -0.0253453570 -0.0663671412 -0.0367185905
#> n  0.0121719092 -0.001362309  0.0656398583  0.0387998319  0.0408166311
#> o -0.0394764835 -0.038506838  0.0012979109 -0.0099218258 -0.0089228384
#> p  0.0281843153 -0.002480352  0.0275664464  0.0487962438  0.0303086817
#> q  0.0136283336  0.031688866 -0.0630359426 -0.0258561943 -0.0108541671
#> r -0.0299530088 -0.019089549 -0.0360209711 -0.0284780774 -0.0294431907
#> s  0.0066786951 -0.010960102  0.0027331505 -0.0005798014 -0.0007038769
#> t -0.0023284664  0.001306424 -0.0023237007  0.0075267137  0.0131367455
#> u  0.8144249032 -0.044021397 -0.0001474572 -0.0114020196 -0.0068419484
#> v -0.0440213967  0.777514000  0.0413707831  0.0163870077  0.0151914605
#> w -0.0001474572  0.041370783  0.7818068418 -0.0417448243 -0.0263768835
#> x -0.0114020196  0.016387008 -0.0417448243  0.7686584964 -0.0648558659
#> y -0.0068419484  0.015191461 -0.0263768835 -0.0648558659  0.7975906091