Helper function for PPI++ logistic regression
Usage
ppi_plusplus_logistic(
X_l,
Y_l,
f_l,
X_u,
f_u,
lhat = NULL,
coord = NULL,
opts = NULL,
w_l = NULL,
w_u = NULL
)
Arguments
- X_l
(matrix): n x p matrix of covariates in the labeled data.
- Y_l
(vector): n-vector of labeled outcomes.
- f_l
(vector): n-vector of predictions in the labeled data.
- X_u
(matrix): N x p matrix of covariates in the unlabeled data.
- f_u
(vector): N-vector of predictions in the unlabeled data.
- lhat
(float, optional): Power-tuning parameter (see https://arxiv.org/abs/2311.01453). The default value,
NULL
, will estimate the optimal value from the data. Settinglhat = 1
recovers PPI with no power tuning, and settinglhat = 0
recovers the classical point estimate.- coord
(int, optional): Coordinate for which to optimize
lhat = 1
. IfNULL
, it optimizes the total variance over all coordinates. Must be in (1, ..., d) where d is the dimension of the estimand.- opts
(list, optional): Options to pass to the optimizer. See ?optim for details.
- w_l
(ndarray, optional): Sample weights for the labeled data set. Defaults to a vector of ones.
- w_u
(ndarray, optional): Sample weights for the unlabeled data set. Defaults to a vector of ones.
Value
(list): A list containing the following:
- est
(vector): vector of PPI++ logistic regression coefficient estimates.
- se
(vector): vector of standard errors of the coefficients.
- lambda
(float): estimated power-tuning parameter.
- rectifier_est
(vector): vector of the rectifier logistic regression coefficient estimates.
- var_u
(matrix): covariance matrix for the gradients in the unlabeled data.
- var_l
(matrix): covariance matrix for the gradients in the labeled data.
- grads
(matrix): matrix of gradients for the labeled data.
- grads_hat_unlabeled
(matrix): matrix of predicted gradients for the unlabeled data.
- grads_hat
(matrix): matrix of predicted gradients for the labeled data.
- inv_hessian
(matrix): inverse Hessian matrix.
Details
PPI++: Efficient Prediction Powered Inference (Angelopoulos et al., 2023) https://arxiv.org/abs/2311.01453
Examples
dat <- simdat(model = "logistic")
form <- Y - f ~ X1
X_l <- model.matrix(form, data = dat[dat$set == "labeled",])
Y_l <- dat[dat$set == "labeled", all.vars(form)[1]] |> matrix(ncol = 1)
f_l <- dat[dat$set == "labeled", all.vars(form)[2]] |> matrix(ncol = 1)
X_u <- model.matrix(form, data = dat[dat$set == "unlabeled",])
f_u <- dat[dat$set == "unlabeled", all.vars(form)[2]] |> matrix(ncol = 1)
ppi_plusplus_logistic(X_l, Y_l, f_l, X_u, f_u)
#> $est
#> [,1]
#> [1,] 0.3358500
#> [2,] 0.8718309
#>
#> $se
#> [1] 0.1268198 0.1376575
#>
#> $lambda
#> [1] 0.07916276
#>
#> $rectifier_est
#> [,1]
#> [1,] -0.002091310
#> [2,] -0.006248847
#>
#> $var_u
#> [,1] [,2]
#> [1,] 0.0009736550 -0.0004881683
#> [2,] -0.0004881683 0.0010678545
#>
#> $var_l
#> [,1] [,2]
#> [1,] 0.207055409 -0.007216353
#> [2,] -0.007216353 0.147335307
#>
#> $grads
#> [,1] [,2]
#> [1,] -0.06419413 -0.172565967
#> [2,] -0.29997526 -0.176016990
#> [3,] 0.35208207 -0.381933631
#> [4,] -0.22457329 -0.232695177
#> [5,] 0.42873712 -0.306299419
#> [6,] -0.24236942 -0.223479834
#> [7,] -0.23915909 -0.225337418
#> [8,] -0.35666856 -0.103913413
#> [9,] -0.26223907 -0.210106662
#> [10,] 0.54034599 -0.107913139
#> [11,] 0.56099772 -0.058322760
#> [12,] -0.18722862 -0.243158684
#> [13,] -0.60567588 0.531473764
#> [14,] -0.47422586 0.126554738
#> [15,] 0.81857398 1.099341991
#> [16,] -0.24667152 -0.220857360
#> [17,] 0.32230285 -0.398911952
#> [18,] 0.32876016 -0.395813533
#> [19,] -0.34723943 -0.117632604
#> [20,] 0.76680238 0.751553069
#> [21,] -0.36730213 -0.087612760
#> [22,] -0.44769389 0.064628979
#> [23,] 0.39728534 -0.342970752
#> [24,] -0.33567407 -0.133518799
#> [25,] -0.42956372 0.025728872
#> [26,] 0.49825340 -0.195931829
#> [27,] -0.71967790 1.055551658
#> [28,] 0.58070329 -0.006786541
#> [29,] -0.60214476 0.518179566
#> [30,] -0.48386501 0.150564273
#> [31,] -0.35808709 -0.101789752
#> [32,] -0.09793970 -0.211698569
#> [33,] -0.19411508 -0.242165418
#> [34,] -0.68400030 0.869340905
#> [35,] -0.32145134 -0.151635019
#> [36,] -0.46882595 0.113460587
#> [37,] 0.50375707 -0.185375485
#> [38,] 0.24352158 -0.410413037
#> [39,] -0.12201769 -0.229192897
#> [40,] -0.31893484 -0.154677258
#> [41,] 0.60296394 0.056698118
#> [42,] -0.64362791 0.684353052
#> [43,] -0.67474283 0.824681352
#> [44,] -0.53073265 0.279380094
#> [45,] -0.53732268 0.299171088
#> [46,] 0.52520880 -0.141526192
#> [47,] 0.47767312 -0.232974899
#> [48,] -0.24558095 -0.221536531
#> [49,] 0.15079745 -0.357039017
#> [50,] -0.41324506 -0.006975573
#> [51,] 0.82902320 1.181844225
#> [52,] -0.32926063 -0.141881839
#> [53,] 0.68638076 0.352234287
#> [54,] 0.33416788 -0.392970302
#> [55,] -0.49547924 0.180593161
#> [56,] -0.47818683 0.136321691
#> [57,] -0.61010170 0.548351114
#> [58,] 0.81857220 1.099328374
#> [59,] -0.13707582 -0.236461199
#> [60,] -0.47448573 0.127191309
#> [61,] 0.67013644 0.286671272
#> [62,] -0.61294240 0.559311183
#> [63,] -0.42221474 0.010732606
#> [64,] 0.68212763 0.334649187
#> [65,] 0.15095113 -0.357195184
#> [66,] 0.63137785 0.146492425
#> [67,] 0.19116844 -0.389928978
#> [68,] 0.30303903 -0.406233738
#> [69,] -0.24333253 -0.222905963
#> [70,] -0.32344225 -0.149193392
#> [71,] -0.27204895 -0.202329418
#> [72,] -0.60949962 0.546041004
#> [73,] -0.41134753 -0.010638397
#> [74,] -0.22914425 -0.230581592
#> [75,] -0.51654332 0.238205505
#> [76,] -0.51312981 0.228587963
#> [77,] 0.33825164 -0.390673121
#> [78,] -0.45740046 0.086585976
#> [79,] 0.45315730 -0.272244376
#> [80,] -0.56777452 0.396364601
#> [81,] -0.22347383 -0.233177139
#> [82,] -0.08186556 -0.195446441
#> [83,] -0.64318422 0.682454635
#> [84,] 0.41094082 -0.328028069
#> [85,] -0.63087840 0.630882838
#> [86,] -0.35265209 -0.109841651
#> [87,] -0.29216560 -0.183992608
#> [88,] 0.53790353 -0.113490324
#> [89,] 0.64880002 0.206821877
#> [90,] 0.40982719 -0.329302596
#> [91,] -0.52632806 0.266390416
#> [92,] 0.36900265 -0.369221458
#> [93,] -0.24866357 -0.219591616
#> [94,] -0.18708406 -0.243174852
#> [95,] -0.09737625 -0.211194829
#> [96,] 0.70232936 0.420967691
#> [97,] 0.45494347 -0.269557429
#> [98,] -0.45540042 0.081996481
#> [99,] 0.40488373 -0.334840111
#> [100,] 0.56373282 -0.051421123
#> [101,] 0.60172315 0.053006159
#> [102,] -0.25637756 -0.214385053
#> [103,] 0.18021621 -0.382565200
#> [104,] -0.42508168 0.016530374
#> [105,] -0.23233600 -0.229001301
#> [106,] 0.38157478 -0.358329468
#> [107,] 0.20426321 -0.397291484
#> [108,] -0.34186145 -0.125148681
#> [109,] -0.30082016 -0.175125583
#> [110,] 0.80783834 1.019421974
#> [111,] -0.18186908 -0.243627789
#> [112,] -0.51274137 0.227500505
#> [113,] -0.26559646 -0.207531572
#> [114,] 0.74991329 0.655699252
#> [115,] 0.68064732 0.328599579
#> [116,] 0.37304438 -0.365854825
#> [117,] 0.64538423 0.194660323
#> [118,] 0.67368264 0.300618673
#> [119,] 0.76331709 0.731159932
#> [120,] -0.21351003 -0.237073010
#> [121,] 0.66155658 0.253738413
#> [122,] -0.40300769 -0.026394079
#> [123,] 0.50190748 -0.188954197
#> [124,] 0.40490651 -0.334815051
#> [125,] -0.17205795 -0.243781942
#> [126,] 0.31771085 -0.400918769
#> [127,] 0.36805036 -0.369996115
#> [128,] 0.63388207 0.154907686
#> [129,] -0.42864879 0.023837793
#> [130,] 0.59392464 0.030222236
#> [131,] 0.42799688 -0.307254628
#> [132,] 0.75972682 0.710493226
#> [133,] 0.32742585 -0.396480249
#> [134,] -0.66397851 0.774480627
#> [135,] -0.05688938 -0.161319527
#> [136,] -0.20642329 -0.239320215
#> [137,] 0.69781890 0.401070058
#> [138,] -0.33974664 -0.128042879
#> [139,] -0.44805919 0.065440917
#> [140,] -0.38675993 -0.055497659
#> [141,] -0.46128636 0.095600509
#> [142,] 0.46195999 -0.258739638
#> [143,] -0.34803147 -0.116506737
#> [144,] 0.57176742 -0.030682167
#> [145,] -0.24934667 -0.219150110
#> [146,] -0.59394650 0.487889771
#> [147,] -0.15313557 -0.241405173
#> [148,] 0.77315529 0.789591034
#> [149,] -0.35404808 -0.107795403
#> [150,] 0.53152407 -0.127777222
#> [151,] -0.47640512 0.131911322
#> [152,] 0.46204462 -0.258606590
#> [153,] 0.29451516 -0.408551780
#> [154,] -0.33839703 -0.129871772
#> [155,] 0.57167349 -0.030928652
#> [156,] -0.58738298 0.464208274
#> [157,] -0.49696336 0.184518223
#> [158,] -0.49153691 0.170263971
#> [159,] -0.43731239 0.042020827
#> [160,] -0.51507336 0.234050378
#> [161,] -0.40894087 -0.015242335
#> [162,] 0.48783138 -0.215165351
#> [163,] -0.16555886 -0.243370400
#> [164,] 0.66226516 0.256415424
#> [165,] 0.29842551 -0.407558802
#> [166,] 0.46254636 -0.257816546
#> [167,] -0.57860332 0.433301690
#> [168,] -0.36596376 -0.089712855
#> [169,] -0.61593336 0.570959970
#> [170,] 0.35112408 -0.382586785
#> [171,] 0.40074127 -0.339329811
#> [172,] -0.26058341 -0.211343206
#> [173,] -0.48468013 0.152632332
#> [174,] 0.34407709 -0.387172692
#> [175,] 0.58741049 0.011737497
#> [176,] 0.88616247 1.744491133
#> [177,] -0.33167528 -0.138770543
#> [178,] -0.27725924 -0.197886904
#> [179,] 0.23594814 -0.408895626
#> [180,] 0.50933258 -0.174395745
#> [181,] 0.40784419 -0.331547429
#> [182,] -0.27632173 -0.198702158
#> [183,] 0.47246300 -0.241755917
#> [184,] -0.44935342 0.068326573
#> [185,] 0.69839785 0.403603429
#> [186,] -0.26686867 -0.206532203
#> [187,] -0.23565041 -0.227269959
#> [188,] 0.70245861 0.421543367
#> [189,] -0.58258413 0.447207108
#> [190,] 0.69201786 0.376016365
#> [191,] -0.41211191 -0.009166383
#> [192,] -0.56126920 0.374787220
#> [193,] 0.79798394 0.949978486
#> [194,] -0.38693648 -0.055192638
#> [195,] -0.10297120 -0.215996671
#> [196,] 0.24235289 -0.410209817
#> [197,] -0.29886830 -0.177176463
#> [198,] -0.21093861 -0.237939186
#> [199,] 0.61224216 0.084899675
#> [200,] 0.34482595 -0.386703641
#> [201,] -0.27544827 -0.199455438
#> [202,] 0.34571764 -0.386139467
#> [203,] -0.66199111 0.765408618
#> [204,] 0.25061418 -0.411405882
#> [205,] -0.26487738 -0.208090709
#> [206,] -0.52942651 0.275508359
#> [207,] 0.52027016 -0.152008575
#> [208,] -0.25080354 -0.218195765
#> [209,] -0.41236861 -0.008670991
#> [210,] 0.66347291 0.260995883
#> [211,] -0.13068862 -0.233701275
#> [212,] -0.38366394 -0.060806404
#> [213,] -0.19344840 -0.242280569
#> [214,] 0.43549026 -0.297377271
#> [215,] -0.39866763 -0.034373346
#> [216,] -0.42754947 0.021574687
#> [217,] -0.23637069 -0.226881586
#> [218,] -0.33907682 -0.128952342
#> [219,] -0.47255371 0.122472815
#> [220,] -0.41480866 -0.003935517
#> [221,] -0.68650787 0.881682881
#> [222,] 0.50343928 -0.185992610
#> [223,] 0.48756372 -0.215646404
#> [224,] 0.44815212 -0.279630077
#> [225,] 0.34636398 -0.385726671
#> [226,] -0.44620606 0.061333598
#> [227,] -0.50796228 0.214237245
#> [228,] 0.74330501 0.620138854
#> [229,] -0.43105792 0.028832009
#> [230,] 0.34824211 -0.384508792
#> [231,] -0.36952719 -0.084090412
#> [232,] -0.50248366 0.199294580
#> [233,] 0.31031702 -0.403806330
#> [234,] -0.52393235 0.259404416
#> [235,] 0.87083902 1.570758614
#> [236,] 0.58791557 0.013153182
#> [237,] 0.51428323 -0.164402907
#> [238,] 0.22962941 -0.407264329
#> [239,] -0.17649088 -0.243826423
#> [240,] -0.16179737 -0.242940812
#> [241,] -0.44507065 0.058831288
#> [242,] -0.41807141 0.002471762
#> [243,] -0.14472581 -0.239164487
#> [244,] -0.66842623 0.795003217
#> [245,] 0.24628671 -0.410849122
#> [246,] -0.32189360 -0.151095294
#> [247,] -0.36340182 -0.093693951
#> [248,] 0.37906475 -0.360603025
#> [249,] -0.17012854 -0.243703057
#> [250,] -0.50404257 0.203518137
#> [251,] -0.18101829 -0.243677476
#> [252,] -0.40332470 -0.025805369
#> [253,] -0.39980728 -0.032292624
#> [254,] 0.17515516 -0.378780840
#> [255,] 0.69682387 0.396730162
#> [256,] -0.66688198 0.787843115
#> [257,] -0.47722387 0.133934558
#> [258,] -0.07331818 -0.185092982
#> [259,] 0.48705974 -0.216550451
#> [260,] -0.60082946 0.513266071
#> [261,] -0.40302159 -0.026368290
#> [262,] -0.57875193 0.433817588
#> [263,] 0.33098918 -0.394669002
#> [264,] 0.61836506 0.104095925
#> [265,] 0.53051164 -0.130007624
#> [266,] 0.38517819 -0.354978938
#> [267,] 0.57350275 -0.026110752
#> [268,] -0.57306454 0.414247942
#> [269,] 0.31559906 -0.401786790
#> [270,] -0.08245948 -0.196119469
#> [271,] -0.19971454 -0.241039325
#> [272,] -0.22692017 -0.231632068
#> [273,] 0.67132388 0.291319377
#> [274,] 0.35348864 -0.380961725
#> [275,] 0.35444194 -0.380294284
#> [276,] -0.24605569 -0.221242074
#> [277,] 0.20448499 -0.397402944
#> [278,] -0.14933086 -0.240484555
#> [279,] 0.23228367 -0.407990297
#> [280,] -0.39947726 -0.032896217
#> [281,] -0.68935434 0.895822562
#> [282,] 0.52907420 -0.133157071
#> [283,] -0.22245839 -0.233613127
#> [284,] 0.87072364 1.569526375
#> [285,] 0.36044867 -0.375926358
#> [286,] 0.74543095 0.631465251
#> [287,] -0.31314671 -0.161488237
#> [288,] -0.35756142 -0.102578549
#> [289,] 0.46354373 -0.256239645
#> [290,] -0.32339598 -0.149250484
#> [291,] 0.36770684 -0.370273825
#> [292,] 0.29751529 -0.407800610
#> [293,] 0.25982897 -0.412083958
#> [294,] 0.63859869 0.170988113
#> [295,] -0.31392344 -0.160589339
#> [296,] 0.26744055 -0.412127681
#> [297,] 0.51469678 -0.163557692
#> [298,] -0.23084290 -0.229751215
#> [299,] -0.22789262 -0.231177898
#> [300,] -0.52754791 0.269968954
#>
#> $grads_hat_unlabeled
#> [,1] [,2]
#> [1,] -0.28976042 -0.1863527353
#> [2,] -0.21784211 -0.2354840602
#> [3,] -0.15694438 -0.2421753417
#> [4,] -0.53475154 0.2913983840
#> [5,] -0.26762680 -0.2059305072
#> [6,] 0.29330920 -0.4088338870
#> [7,] -0.48142790 0.1444162926
#> [8,] -0.15309466 -0.2413960805
#> [9,] -0.12572333 -0.2312291785
#> [10,] -0.33462924 -0.1349029523
#> [11,] 0.68114300 0.3306212387
#> [12,] -0.55986825 0.3701995204
#> [13,] -0.21089792 -0.2379524284
#> [14,] -0.34105675 -0.1262540287
#> [15,] -0.34594991 -0.1194552137
#> [16,] -0.19110646 -0.2426529211
#> [17,] -0.24738157 -0.2204099186
#> [18,] 0.43792068 -0.2940741648
#> [19,] -0.64352473 0.6839113230
#> [20,] -0.39715339 -0.0371220135
#> [21,] -0.11117631 -0.2222595133
#> [22,] -0.24741703 -0.2203874684
#> [23,] 0.52610725 -0.1395938897
#> [24,] -0.26673974 -0.2066340731
#> [25,] -0.36891272 -0.0850669974
#> [26,] 0.30338523 -0.4061276132
#> [27,] 0.20760263 -0.3989237376
#> [28,] -0.26115167 -0.2109212844
#> [29,] 0.22049338 -0.4043104315
#> [30,] -0.76016626 1.2986727404
#> [31,] 0.39064863 -0.3496968126
#> [32,] -0.48329289 0.1491162781
#> [33,] -0.21123454 -0.2378424363
#> [34,] -0.48690451 0.1583059741
#> [35,] 0.52725268 -0.1371190178
#> [36,] -0.68736582 0.8859300985
#> [37,] -0.11417204 -0.2243243173
#> [38,] -0.29462089 -0.1815365506
#> [39,] -0.46466020 0.1035320342
#> [40,] -0.67591739 0.8302700727
#> [41,] -0.17053714 -0.2437227962
#> [42,] -0.51267613 0.2273179961
#> [43,] 0.39412452 -0.3462176760
#> [44,] -0.50211136 0.1982892367
#> [45,] -0.21483950 -0.2366026438
#> [46,] 0.43474767 -0.2983767531
#> [47,] 0.61723224 0.1005086624
#> [48,] -0.55286788 0.3475847852
#> [49,] -0.45804356 0.0880689583
#> [50,] 0.56501777 -0.0481511871
#> [51,] 0.67072197 0.2889605084
#> [52,] 0.34759054 -0.3849344053
#> [53,] -0.41727999 0.0009096829
#> [54,] -0.11981585 -0.2279038839
#> [55,] -0.62819933 0.6199265232
#> [56,] -0.33599347 -0.1330939699
#> [57,] -0.22088278 -0.2342722169
#> [58,] -0.43209100 0.0309882335
#> [59,] -0.68820497 0.8900964184
#> [60,] -0.10050677 -0.2139360898
#> [61,] 0.44499246 -0.2841840127
#> [62,] -0.17726049 -0.2438148829
#> [63,] -0.37648180 -0.0728315155
#> [64,] -0.63450041 0.6458478919
#> [65,] -0.41526508 -0.0030443833
#> [66,] -0.59644445 0.4970344631
#> [67,] -0.15906303 -0.2425390334
#> [68,] -0.16712249 -0.2435074394
#> [69,] 0.38164141 -0.3582684411
#> [70,] -0.32845894 -0.1429048504
#> [71,] -0.21639790 -0.2360317976
#> [72,] -0.25628776 -0.2144484468
#> [73,] -0.52106463 0.2511148797
#> [74,] 0.22708014 -0.4065112535
#> [75,] -0.16617240 -0.2434270641
#> [76,] 0.61691208 0.0994977808
#> [77,] 0.51865169 -0.1553928521
#> [78,] -0.11103706 -0.2221607043
#> [79,] -0.73586849 1.1482908918
#> [80,] 0.73665303 0.5853764210
#> [81,] 0.42534216 -0.3106433753
#> [82,] 0.69230890 0.3772591633
#> [83,] -0.17728194 -0.2438144799
#> [84,] -0.47896318 0.1382521897
#> [85,] -0.69263939 0.9123145698
#> [86,] 0.41235528 -0.3263948701
#> [87,] -0.16736325 -0.2435263878
#> [88,] -0.20779644 -0.2389191811
#> [89,] -0.72191917 1.0680608740
#> [90,] -0.30674933 -0.1687134685
#> [91,] -0.41732491 0.0009982165
#> [92,] -0.37267479 -0.0790415921
#> [93,] -0.20418921 -0.2399371100
#> [94,] 0.26362445 -0.4121638700
#> [95,] -0.29159582 -0.1845558084
#> [96,] -0.43790740 0.0432923579
#> [97,] 0.47998987 -0.2289936972
#> [98,] -0.07728051 -0.1900506240
#> [99,] -0.17630906 -0.2438283206
#> [100,] -0.30584243 -0.1697119678
#> [101,] -0.64054544 0.6712207471
#> [102,] -0.19280649 -0.2423876152
#> [103,] 0.32331311 -0.3984485120
#> [104,] -0.19652308 -0.2417158682
#> [105,] -0.45740945 0.0866066913
#> [106,] -0.67440288 0.8230679831
#> [107,] -0.34479856 -0.1210716552
#> [108,] -0.32307277 -0.1496488431
#> [109,] -0.33906500 -0.1289683522
#> [110,] -0.22930828 -0.2305024669
#> [111,] -0.22493140 -0.2325359771
#> [112,] -0.07161640 -0.1828766594
#> [113,] -0.26866695 -0.2050975135
#> [114,] 0.31664946 -0.4013593605
#> [115,] -0.31056260 -0.1644450295
#> [116,] -0.24500899 -0.2218888301
#> [117,] -0.15781750 -0.2423307929
#> [118,] 0.24120160 -0.4099986133
#> [119,] 0.61597102 0.0965339810
#> [120,] -0.39214241 -0.0460881854
#> [121,] -0.39268483 -0.0451272298
#> [122,] 0.52769359 -0.1361629777
#> [123,] 0.44522750 -0.2838481320
#> [124,] 0.45152548 -0.2746755301
#> [125,] -0.33074702 -0.1399719550
#> [126,] 0.36501558 -0.3724176072
#> [127,] -0.17910773 -0.2437641062
#> [128,] -0.18186061 -0.2436283176
#> [129,] 0.62061836 0.1112799929
#> [130,] -0.77273488 1.3823901835
#> [131,] -0.40998497 -0.0132506930
#> [132,] 0.36865951 -0.3695014131
#> [133,] -0.41670973 -0.0002127293
#> [134,] -0.15570075 -0.2419403842
#> [135,] -0.41288227 -0.0076780980
#> [136,] -0.60485402 0.5283660655
#> [137,] -0.28523815 -0.1906673267
#> [138,] 0.31348906 -0.4026195100
#> [139,] -0.40948333 -0.0142086669
#> [140,] -0.39816174 -0.0352936691
#> [141,] -0.39938710 -0.0330609739
#> [142,] -0.22820512 -0.2310302552
#> [143,] -0.34860544 -0.1156878088
#> [144,] -0.31040640 -0.1646220957
#> [145,] 0.34798470 -0.3846773267
#> [146,] -0.54249230 0.3149991407
#> [147,] 0.46523835 -0.2535407340
#> [148,] 0.54172706 -0.1047330858
#> [149,] -0.44150630 0.0510458745
#> [150,] -0.71999463 1.0573132459
#> [151,] 0.38342789 -0.3566191717
#> [152,] 0.56572743 -0.0463376500
#> [153,] -0.27654340 -0.1985100256
#> [154,] -0.51961312 0.2469491964
#> [155,] -0.41499881 -0.0035644558
#> [156,] -0.64500209 0.6902503675
#> [157,] 0.25764725 -0.4119855160
#> [158,] 0.43262314 -0.3012111346
#> [159,] 0.50862444 -0.1758063243
#> [160,] -0.24161664 -0.2239230539
#> [161,] -0.18819500 -0.2430456313
#> [162,] 0.61976438 0.1085496556
#> [163,] -0.24852217 -0.2196825300
#> [164,] -0.37300577 -0.0785061889
#> [165,] -0.35476899 -0.1067327629
#> [166,] -0.28151081 -0.1941024884
#> [167,] -0.22599343 -0.2320574449
#> [168,] -0.13117864 -0.2339295927
#> [169,] -0.48259211 0.1473466134
#> [170,] -0.16185266 -0.2429481543
#> [171,] -0.32603725 -0.1459648362
#> [172,] -0.23747254 -0.2262791134
#> [173,] -0.14657530 -0.2397219982
#> [174,] -0.53238811 0.2843113862
#> [175,] -0.34356211 -0.1227961217
#> [176,] 0.60515445 0.0632613632
#> [177,] -0.33291846 -0.1371511034
#> [178,] 0.72401246 0.5220236604
#> [179,] -0.21479029 -0.2366203261
#> [180,] -0.24001486 -0.2248505747
#> [181,] 0.36370537 -0.3734408546
#> [182,] -0.28021787 -0.1952684852
#> [183,] -0.43778741 0.0430357114
#> [184,] 0.22870044 -0.4069962502
#> [185,] -0.31018556 -0.1648721045
#> [186,] -0.80433345 1.6140088766
#> [187,] -0.14533711 -0.2393528442
#> [188,] 0.85083692 1.3714895173
#> [189,] -0.31066986 -0.1643233327
#> [190,] 0.36330279 -0.3737525767
#> [191,] 0.38063342 -0.3591879396
#> [192,] -0.57581255 0.4236588296
#> [193,] 0.65966923 0.2466450292
#> [194,] -0.17039612 -0.2437161685
#> [195,] -0.38891973 -0.0517494481
#> [196,] -0.56378351 0.3830731625
#> [197,] -0.54879806 0.3346715922
#> [198,] 0.28218107 -0.4108985769
#> [199,] -0.37308196 -0.0783828208
#> [200,] 0.52825568 -0.1349414110
#> [201,] -0.51020626 0.2204382249
#> [202,] 0.61384261 0.0898718220
#> [203,] 0.30329466 -0.4061554659
#> [204,] 0.38288861 -0.3571196717
#> [205,] 0.64168836 0.1816872428
#> [206,] -0.47324885 0.1241667644
#> [207,] -0.21063171 -0.2380387116
#> [208,] 0.18450766 -0.3855838797
#> [209,] -0.35304944 -0.1092607506
#> [210,] -0.62152654 0.5930475466
#> [211,] -0.22016240 -0.2345664897
#> [212,] 0.41383788 -0.3246656923
#> [213,] 0.56219156 -0.0553200651
#> [214,] -0.15732898 -0.2422447804
#> [215,] -0.18150868 -0.2436496702
#> [216,] 0.55612196 -0.0704295460
#> [217,] -0.21389138 -0.2369396592
#> [218,] -0.26820027 -0.2054723169
#> [219,] -0.17141718 -0.2437597704
#> [220,] 0.39453964 -0.3457957733
#> [221,] -0.66911581 0.7982125656
#> [222,] -0.73542391 1.1456687330
#> [223,] -0.38447668 -0.0594200944
#> [224,] -0.21331286 -0.2371414635
#> [225,] -0.41847903 0.0032782845
#> [226,] -0.46438579 0.1028832839
#> [227,] -0.44213108 0.0524028802
#> [228,] -0.18923433 -0.2429144063
#> [229,] 0.26716662 -0.4121341618
#> [230,] -0.42527002 0.0169136119
#> [231,] -0.19132607 -0.2426201367
#> [232,] -0.27651692 -0.1985329940
#> [233,] -0.34182504 -0.1251987995
#> [234,] -0.18105354 -0.2436755531
#> [235,] 0.40274470 -0.3371755522
#> [236,] -0.44156380 0.0511706274
#> [237,] 0.61823282 0.1036763212
#> [238,] -0.44347266 0.0553277673
#> [239,] -0.50569116 0.2080090854
#> [240,] 0.55930149 -0.0625630333
#> [241,] -0.29449763 -0.1816609701
#> [242,] -0.33671509 -0.1321312758
#> [243,] 0.31841312 -0.4006224508
#> [244,] -0.33631034 -0.1326717425
#> [245,] -0.33258492 -0.1375867594
#> [246,] -0.43854357 0.0446551043
#> [247,] -0.09788646 -0.2116511686
#> [248,] 0.52849973 -0.1344100802
#> [249,] -0.17504419 -0.2438327403
#> [250,] -0.47769710 0.1351066576
#> [251,] -0.44108447 0.0501315138
#> [252,] 0.27711699 -0.4115151732
#> [253,] -0.41979611 0.0058934880
#> [254,] -0.52472279 0.2617032210
#> [255,] -0.37220651 -0.0797976271
#> [256,] -0.41507847 -0.0034089259
#> [257,] -0.44032805 0.0484955953
#> [258,] -0.38685355 -0.0553359545
#> [259,] -0.18154845 -0.2436473158
#> [260,] -0.31889808 -0.1547213299
#> [261,] -0.14379312 -0.2388693009
#> [262,] -0.69007561 0.8994274942
#> [263,] -0.70810044 0.9925288357
#> [264,] -0.57116399 0.4077878680
#> [265,] -0.24405741 -0.2224690048
#> [266,] -0.33025903 -0.1406008737
#> [267,] 0.48276409 -0.2241639209
#> [268,] -0.63780041 0.6596369812
#> [269,] -0.51013535 0.2202415722
#> [270,] -0.35276100 -0.1096825531
#> [271,] 0.38146341 -0.3584313975
#> [272,] -0.61026908 0.5489941394
#> [273,] -0.68664154 0.8823437846
#> [274,] -0.86807164 2.2102934554
#> [275,] -0.25812496 -0.2131386021
#> [276,] -0.23798506 -0.2259954436
#> [277,] -0.35910299 -0.1002592366
#> [278,] -0.40588680 -0.0210178403
#> [279,] -0.48613368 0.1563348453
#> [280,] -0.53696720 0.2980925443
#> [281,] -0.79804157 1.5652235972
#> [282,] -0.78302094 1.4542662686
#> [283,] 0.16741167 -0.3725120523
#> [284,] -0.45346398 0.0775852740
#> [285,] -0.78391914 1.4606951987
#> [286,] -0.14211439 -0.2383141180
#> [287,] -0.50676072 0.2109361953
#> [288,] -0.29607894 -0.1800557156
#> [289,] -0.26103647 -0.2110070230
#> [290,] -0.11984676 -0.2279223921
#> [291,] -0.45863279 0.0894307834
#> [292,] -0.69524706 0.9255404703
#> [293,] -0.31092575 -0.1640326304
#> [294,] -0.31972034 -0.1537329231
#> [295,] -0.43444335 0.0359307975
#> [296,] -0.16797476 -0.2435719401
#> [297,] -0.31186986 -0.1629557182
#> [298,] -0.33729698 -0.1313520445
#> [299,] 0.26284389 -0.4121568930
#> [300,] -0.26059121 -0.2113374328
#>
#> $grads_hat
#> [,1] [,2]
#> [1,] -0.06419413 -0.172565967
#> [2,] 0.70002474 0.410754690
#> [3,] -0.64791793 0.702852176
#> [4,] -0.22457329 -0.232695177
#> [5,] 0.42873712 -0.306299419
#> [6,] -0.24236942 -0.223479834
#> [7,] -0.23915909 -0.225337418
#> [8,] -0.35666856 -0.103913413
#> [9,] -0.26223907 -0.210106662
#> [10,] 0.54034599 -0.107913139
#> [11,] -0.43900228 0.045639802
#> [12,] -0.18722862 -0.243158684
#> [13,] 0.39432412 -0.346014980
#> [14,] -0.47422586 0.126554738
#> [15,] -0.18142602 -0.243654516
#> [16,] -0.24667152 -0.220857360
#> [17,] 0.32230285 -0.398911952
#> [18,] 0.32876016 -0.395813533
#> [19,] 0.65276057 0.221132511
#> [20,] -0.23319762 -0.228560049
#> [21,] -0.36730213 -0.087612760
#> [22,] 0.55230611 -0.079730772
#> [23,] 0.39728534 -0.342970752
#> [24,] -0.33567407 -0.133518799
#> [25,] 0.57043628 -0.034166483
#> [26,] 0.49825340 -0.195931829
#> [27,] 0.28032210 -0.411148466
#> [28,] -0.41929671 0.004900221
#> [29,] -0.60214476 0.518179566
#> [30,] -0.48386501 0.150564273
#> [31,] -0.35808709 -0.101789752
#> [32,] -0.09793970 -0.211698569
#> [33,] -0.19411508 -0.242165418
#> [34,] -0.68400030 0.869340905
#> [35,] -0.32145134 -0.151635019
#> [36,] -0.46882595 0.113460587
#> [37,] -0.49624293 0.182610390
#> [38,] 0.24352158 -0.410413037
#> [39,] -0.12201769 -0.229192897
#> [40,] -0.31893484 -0.154677258
#> [41,] 0.60296394 0.056698118
#> [42,] -0.64362791 0.684353052
#> [43,] -0.67474283 0.824681352
#> [44,] 0.46926735 -0.247024480
#> [45,] -0.53732268 0.299171088
#> [46,] -0.47479120 0.127940337
#> [47,] -0.52232688 0.254753821
#> [48,] -0.24558095 -0.221536531
#> [49,] 0.15079745 -0.357039017
#> [50,] -0.41324506 -0.006975573
#> [51,] -0.17097680 -0.243742213
#> [52,] -0.32926063 -0.141881839
#> [53,] -0.31361924 -0.160941940
#> [54,] -0.66583212 0.782996412
#> [55,] -0.49547924 0.180593161
#> [56,] 0.52181317 -0.148758707
#> [57,] -0.61010170 0.548351114
#> [58,] -0.18142780 -0.243654413
#> [59,] -0.13707582 -0.236461199
#> [60,] -0.47448573 0.127191309
#> [61,] -0.32986356 -0.141109187
#> [62,] -0.61294240 0.559311183
#> [63,] 0.57778526 -0.014687175
#> [64,] 0.68212763 0.334649187
#> [65,] -0.84904887 2.009101652
#> [66,] -0.36862215 -0.085527790
#> [67,] 0.19116844 -0.389928978
#> [68,] 0.30303903 -0.406233738
#> [69,] -0.24333253 -0.222905963
#> [70,] -0.32344225 -0.149193392
#> [71,] -0.27204895 -0.202329418
#> [72,] -0.60949962 0.546041004
#> [73,] -0.41134753 -0.010638397
#> [74,] -0.22914425 -0.230581592
#> [75,] -0.51654332 0.238205505
#> [76,] 0.48687019 -0.216889880
#> [77,] 0.33825164 -0.390673121
#> [78,] -0.45740046 0.086585976
#> [79,] -0.54684270 0.328527970
#> [80,] 0.43222548 -0.301737525
#> [81,] -0.22347383 -0.233177139
#> [82,] -0.08186556 -0.195446441
#> [83,] 0.35681578 -0.378601606
#> [84,] -0.58905918 0.470208695
#> [85,] -0.63087840 0.630882838
#> [86,] -0.35265209 -0.109841651
#> [87,] -0.29216560 -0.183992608
#> [88,] -0.46209647 0.097496066
#> [89,] 0.64880002 0.206821877
#> [90,] 0.40982719 -0.329302596
#> [91,] 0.47367194 -0.239739572
#> [92,] 0.36900265 -0.369221458
#> [93,] -0.24866357 -0.219591616
#> [94,] -0.18708406 -0.243174852
#> [95,] -0.09737625 -0.211194829
#> [96,] 0.70232936 0.420967691
#> [97,] 0.45494347 -0.269557429
#> [98,] -0.45540042 0.081996481
#> [99,] 0.40488373 -0.334840111
#> [100,] -0.43626718 0.039794291
#> [101,] -0.39827685 -0.035084450
#> [102,] -0.25637756 -0.214385053
#> [103,] 0.18021621 -0.382565200
#> [104,] -0.42508168 0.016530374
#> [105,] -0.23233600 -0.229001301
#> [106,] 0.38157478 -0.358329468
#> [107,] -0.79573679 1.547706279
#> [108,] -0.34186145 -0.125148681
#> [109,] -0.30082016 -0.175125583
#> [110,] 0.80783834 1.019421974
#> [111,] -0.18186908 -0.243627789
#> [112,] -0.51274137 0.227500505
#> [113,] -0.26559646 -0.207531572
#> [114,] -0.25008671 -0.218667502
#> [115,] -0.31935268 -0.154175521
#> [116,] 0.37304438 -0.365854825
#> [117,] 0.64538423 0.194660323
#> [118,] -0.32631736 -0.145613212
#> [119,] -0.23668291 -0.226711893
#> [120,] -0.21351003 -0.237073010
#> [121,] 0.66155658 0.253738413
#> [122,] 0.59699231 0.039098664
#> [123,] -0.49809252 0.187517975
#> [124,] -0.59509349 0.492079665
#> [125,] -0.17205795 -0.243781942
#> [126,] -0.68228915 0.860979480
#> [127,] -0.63194964 0.635290535
#> [128,] -0.36611793 -0.089471659
#> [129,] -0.42864879 0.023837793
#> [130,] 0.59392464 0.030222236
#> [131,] -0.57200312 0.410635256
#> [132,] -0.24027318 -0.224702430
#> [133,] 0.32742585 -0.396480249
#> [134,] -0.66397851 0.774480627
#> [135,] -0.05688938 -0.161319527
#> [136,] -0.20642329 -0.239320215
#> [137,] -0.30218110 -0.173678004
#> [138,] -0.33974664 -0.128042879
#> [139,] -0.44805919 0.065440917
#> [140,] -0.38675993 -0.055497659
#> [141,] -0.46128636 0.095600509
#> [142,] 0.46195999 -0.258739638
#> [143,] -0.34803147 -0.116506737
#> [144,] 0.57176742 -0.030682167
#> [145,] -0.24934667 -0.219150110
#> [146,] 0.40605350 -0.333547462
#> [147,] -0.15313557 -0.241405173
#> [148,] -0.22684471 -0.231666977
#> [149,] -0.35404808 -0.107795403
#> [150,] 0.53152407 -0.127777222
#> [151,] -0.47640512 0.131911322
#> [152,] 0.46204462 -0.258606590
#> [153,] -0.70548484 0.978649406
#> [154,] -0.33839703 -0.129871772
#> [155,] -0.42832651 0.023173300
#> [156,] -0.58738298 0.464208274
#> [157,] -0.49696336 0.184518223
#> [158,] 0.50846309 -0.176127051
#> [159,] 0.56268761 -0.054067982
#> [160,] -0.51507336 0.234050378
#> [161,] -0.40894087 -0.015242335
#> [162,] -0.51216862 0.225899654
#> [163,] -0.16555886 -0.243370400
#> [164,] -0.33773484 -0.130763970
#> [165,] 0.29842551 -0.407558802
#> [166,] -0.53745364 0.299568763
#> [167,] -0.57860332 0.433301690
#> [168,] -0.36596376 -0.089712855
#> [169,] -0.61593336 0.570959970
#> [170,] 0.35112408 -0.382586785
#> [171,] -0.59925873 0.507425536
#> [172,] -0.26058341 -0.211343206
#> [173,] -0.48468013 0.152632332
#> [174,] -0.65592291 0.738077161
#> [175,] -0.41258951 -0.008244266
#> [176,] -0.11383753 -0.224099497
#> [177,] -0.33167528 -0.138770543
#> [178,] -0.27725924 -0.197886904
#> [179,] 0.23594814 -0.408895626
#> [180,] 0.50933258 -0.174395745
#> [181,] 0.40784419 -0.331547429
#> [182,] 0.72367827 0.520394956
#> [183,] 0.47246300 -0.241755917
#> [184,] -0.44935342 0.068326573
#> [185,] 0.69839785 0.403603429
#> [186,] -0.26686867 -0.206532203
#> [187,] -0.23565041 -0.227269959
#> [188,] 0.70245861 0.421543367
#> [189,] -0.58258413 0.447207108
#> [190,] -0.30798214 -0.167345865
#> [191,] -0.41211191 -0.009166383
#> [192,] -0.56126920 0.374787220
#> [193,] -0.20201606 -0.240494708
#> [194,] -0.38693648 -0.055192638
#> [195,] -0.10297120 -0.215996671
#> [196,] 0.24235289 -0.410209817
#> [197,] -0.29886830 -0.177176463
#> [198,] -0.21093861 -0.237939186
#> [199,] -0.38775784 -0.053770415
#> [200,] 0.34482595 -0.386703641
#> [201,] -0.27544827 -0.199455438
#> [202,] 0.34571764 -0.386139467
#> [203,] -0.66199111 0.765408618
#> [204,] -0.74938582 1.230184724
#> [205,] -0.26487738 -0.208090709
#> [206,] -0.52942651 0.275508359
#> [207,] 0.52027016 -0.152008575
#> [208,] -0.25080354 -0.218195765
#> [209,] -0.41236861 -0.008670991
#> [210,] -0.33652709 -0.132382472
#> [211,] -0.13068862 -0.233701275
#> [212,] -0.38366394 -0.060806404
#> [213,] -0.19344840 -0.242280569
#> [214,] -0.56450974 0.385479036
#> [215,] -0.39866763 -0.034373346
#> [216,] -0.42754947 0.021574687
#> [217,] -0.23637069 -0.226881586
#> [218,] -0.33907682 -0.128952342
#> [219,] -0.47255371 0.122472815
#> [220,] -0.41480866 -0.003935517
#> [221,] 0.31349213 -0.402618323
#> [222,] -0.49656072 0.183451368
#> [223,] -0.51243628 0.226647380
#> [224,] -0.55184788 0.344332328
#> [225,] -0.65363602 0.727918792
#> [226,] -0.44620606 0.061333598
#> [227,] -0.50796228 0.214237245
#> [228,] -0.25669499 -0.214160458
#> [229,] -0.43105792 0.028832009
#> [230,] 0.34824211 -0.384508792
#> [231,] -0.36952719 -0.084090412
#> [232,] -0.50248366 0.199294580
#> [233,] -0.68968298 0.897464011
#> [234,] -0.52393235 0.259404416
#> [235,] -0.12916098 -0.232971556
#> [236,] -0.41208443 -0.009219387
#> [237,] 0.51428323 -0.164402907
#> [238,] -0.77037059 1.366307809
#> [239,] -0.17649088 -0.243826423
#> [240,] -0.16179737 -0.242940812
#> [241,] -0.44507065 0.058831288
#> [242,] -0.41807141 0.002471762
#> [243,] -0.14472581 -0.239164487
#> [244,] -0.66842623 0.795003217
#> [245,] 0.24628671 -0.410849122
#> [246,] -0.32189360 -0.151095294
#> [247,] -0.36340182 -0.093693951
#> [248,] 0.37906475 -0.360603025
#> [249,] -0.17012854 -0.243703057
#> [250,] -0.50404257 0.203518137
#> [251,] -0.18101829 -0.243677476
#> [252,] -0.40332470 -0.025805369
#> [253,] 0.60019272 0.048477853
#> [254,] -0.82484484 1.783763734
#> [255,] -0.30317613 -0.172610500
#> [256,] 0.33311802 -0.393540002
#> [257,] -0.47722387 0.133934558
#> [258,] -0.07331818 -0.185092982
#> [259,] 0.48705974 -0.216550451
#> [260,] -0.60082946 0.513266071
#> [261,] -0.40302159 -0.026368290
#> [262,] 0.42124807 -0.315756740
#> [263,] 0.33098918 -0.394669002
#> [264,] -0.38163494 -0.064244642
#> [265,] -0.46948836 0.115053207
#> [266,] -0.61482181 0.566617725
#> [267,] -0.42649725 0.019417804
#> [268,] -0.57306454 0.414247942
#> [269,] 0.31559906 -0.401786790
#> [270,] -0.08245948 -0.196119469
#> [271,] -0.19971454 -0.241039325
#> [272,] -0.22692017 -0.231632068
#> [273,] 0.67132388 0.291319377
#> [274,] 0.35348864 -0.380961725
#> [275,] 0.35444194 -0.380294284
#> [276,] -0.24605569 -0.221242074
#> [277,] -0.79551501 1.546030384
#> [278,] -0.14933086 -0.240484555
#> [279,] 0.23228367 -0.407990297
#> [280,] -0.39947726 -0.032896217
#> [281,] 0.31064566 -0.403686999
#> [282,] -0.47092580 0.118522318
#> [283,] -0.22245839 -0.233613127
#> [284,] -0.12927636 -0.233027622
#> [285,] 0.36044867 -0.375926358
#> [286,] -0.25456905 -0.215649090
#> [287,] -0.31314671 -0.161488237
#> [288,] -0.35756142 -0.102578549
#> [289,] -0.53645627 0.296544544
#> [290,] -0.32339598 -0.149250484
#> [291,] -0.63229316 0.636707251
#> [292,] 0.29751529 -0.407800610
#> [293,] 0.25982897 -0.412083958
#> [294,] 0.63859869 0.170988113
#> [295,] -0.31392344 -0.160589339
#> [296,] -0.73255945 1.128879055
#> [297,] 0.51469678 -0.163557692
#> [298,] -0.23084290 -0.229751215
#> [299,] -0.22789262 -0.231177898
#> [300,] -0.52754791 0.269968954
#>
#> $inv_hessian
#> [,1] [,2]
#> [1,] 4.8140377 0.5479603
#> [2,] 0.5479603 6.1836819
#>