Helper function for PPI logistic regression
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.
- opts
(list, optional): Options to pass to the optimizer. See ?optim for details.
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.
- 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
Prediction Powered Inference (Angelopoulos et al., 2023) https://www.science.org/doi/10.1126/science.adi6000
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_logistic(X_l, Y_l, f_l, X_u, f_u)
#> $est
#> [,1]
#> [1,] 0.5773930
#> [2,] 0.6695684
#>
#> $se
#> [1] 0.199319 0.200047
#>
#> $rectifier_est
#> [,1]
#> [1,] -0.02496952
#> [2,] 0.14324919
#>
#> $var_u
#> [,1] [,2]
#> [1,] 0.19987254 -0.05497816
#> [2,] -0.05497816 0.16392911
#>
#> $var_l
#> [,1] [,2]
#> [1,] 0.32771460 -0.05073625
#> [2,] -0.05073625 0.29796373
#>
#> $grads
#> [,1] [,2]
#> [1,] 0.4516672 -5.203119e-01
#> [2,] -0.2234180 -2.230498e-01
#> [3,] -0.2642815 -1.762117e-01
#> [4,] -0.2487258 -1.961470e-01
#> [5,] 0.6411082 2.666086e-03
#> [6,] -0.4506309 2.552559e-01
#> [7,] -0.2312590 -2.154591e-01
#> [8,] 0.5342269 -3.512778e-01
#> [9,] -0.1946209 -2.449928e-01
#> [10,] -0.3754564 3.841898e-02
#> [11,] -0.4994832 4.291802e-01
#> [12,] 0.6698552 1.301928e-01
#> [13,] -0.1931575 -2.458517e-01
#> [14,] -0.1782893 -2.531177e-01
#> [15,] 0.5605566 -2.795982e-01
#> [16,] -0.2757693 -1.598649e-01
#> [17,] -0.4240700 1.718307e-01
#> [18,] -0.2770270 -1.579922e-01
#> [19,] -0.2257115 -2.208995e-01
#> [20,] -0.1574386 -2.586521e-01
#> [21,] -0.4277925 1.830661e-01
#> [22,] -0.1043729 -2.450698e-01
#> [23,] -0.2832929 -1.484197e-01
#> [24,] 0.5331505 -3.540142e-01
#> [25,] -0.3309082 -6.261016e-02
#> [26,] 0.4374665 -5.415298e-01
#> [27,] -0.2078722 -2.360734e-01
#> [28,] -0.4726900 3.304217e-01
#> [29,] 0.3048260 -6.381862e-01
#> [30,] -0.6910079 1.426487e+00
#> [31,] -0.3845470 6.151009e-02
#> [32,] -0.2324998 -2.141962e-01
#> [33,] -0.5329337 5.645724e-01
#> [34,] 0.3915242 -5.954435e-01
#> [35,] -0.2770162 -1.580083e-01
#> [36,] 0.5436412 -3.267058e-01
#> [37,] -0.2396965 -2.065407e-01
#> [38,] -0.1913866 -2.468571e-01
#> [39,] 0.6226135 -7.135553e-02
#> [40,] -0.3294098 -6.566011e-02
#> [41,] 0.5071699 -4.156259e-01
#> [42,] -0.5310764 5.566879e-01
#> [43,] -0.4360866 2.086312e-01
#> [44,] -0.2688689 -1.698483e-01
#> [45,] -0.1854225 -2.499665e-01
#> [46,] -0.4840736 3.713618e-01
#> [47,] -0.3013813 -1.185308e-01
#> [48,] 0.6826566 1.923011e-01
#> [49,] -0.6894871 1.416023e+00
#> [50,] -0.1188848 -2.531287e-01
#> [51,] 0.4647235 -4.988474e-01
#> [52,] -0.4033000 1.118279e-01
#> [53,] 0.3799133 -6.055916e-01
#> [54,] 0.6698826 1.303224e-01
#> [55,] 0.5970836 -1.641387e-01
#> [56,] 0.6664116 1.140661e-01
#> [57,] -0.4014272 1.066391e-01
#> [58,] 0.8514668 1.486270e+00
#> [59,] -0.2832444 -1.484953e-01
#> [60,] 0.3412239 -6.294990e-01
#> [61,] -0.2296169 -2.171047e-01
#> [62,] -0.4717596 3.271407e-01
#> [63,] 0.6762085 1.605855e-01
#> [64,] -0.4382134 2.153061e-01
#> [65,] -0.3352592 -5.362604e-02
#> [66,] -0.4582586 2.806335e-01
#> [67,] -0.3134193 -9.679606e-02
#> [68,] 0.6718802 1.397893e-01
#> [69,] -0.3865998 6.684134e-02
#> [70,] -0.1884934 -2.484189e-01
#> [71,] 0.6205049 -7.942124e-02
#> [72,] 0.6953161 2.572237e-01
#> [73,] -0.3028884 -1.158902e-01
#> [74,] -0.1581392 -2.585580e-01
#> [75,] -0.1933953 -2.457138e-01
#> [76,] -0.2171969 -2.285878e-01
#> [77,] 0.7858392 8.481177e-01
#> [78,] 0.6035191 -1.417320e-01
#> [79,] -0.6243412 1.012093e+00
#> [80,] 0.5643830 -2.684007e-01
#> [81,] -0.4013818 1.065139e-01
#> [82,] -0.1683308 -2.564578e-01
#> [83,] -0.2629717 -1.779882e-01
#> [84,] 0.4949028 -4.418431e-01
#> [85,] -0.3250865 -7.433259e-02
#> [86,] -0.5830288 7.946601e-01
#> [87,] -0.2686272 -1.701891e-01
#> [88,] -0.3606467 2.604157e-03
#> [89,] -0.2401493 -2.060403e-01
#> [90,] 0.5678145 -2.581855e-01
#> [91,] -0.2759126 -1.596523e-01
#> [92,] -0.3487499 -2.455627e-02
#> [93,] -0.2652918 -1.748291e-01
#> [94,] -0.2162386 -2.294023e-01
#> [95,] 0.5475283 -3.162208e-01
#> [96,] -0.3407617 -4.199101e-02
#> [97,] 0.2930427 -6.381266e-01
#> [98,] 0.6659952 1.121327e-01
#> [99,] -0.4163825 1.490936e-01
#> [100,] 0.3342714 -6.321911e-01
#> [101,] 0.6631745 9.912424e-02
#> [102,] 0.6644860 1.051529e-01
#> [103,] 0.6248283 -6.280282e-02
#> [104,] 0.4441023 -5.318882e-01
#> [105,] -0.3979245 9.703272e-02
#> [106,] -0.7499823 1.877185e+00
#> [107,] 0.6280405 -5.025072e-02
#> [108,] -0.1420222 -2.590292e-01
#> [109,] -0.1524870 -2.591294e-01
#> [110,] -0.2623347 -1.788457e-01
#> [111,] -0.1328581 -2.576584e-01
#> [112,] 0.4092217 -5.772992e-01
#> [113,] -0.3784040 4.581362e-02
#> [114,] 0.5868737 -1.983832e-01
#> [115,] -0.2824695 -1.497007e-01
#> [116,] -0.4283814 1.848568e-01
#> [117,] -0.3373584 -4.922325e-02
#> [118,] -0.3279432 -6.862330e-02
#> [119,] 0.6705399 1.334282e-01
#> [120,] -0.4933050 4.056632e-01
#> [121,] -0.4044453 1.150188e-01
#> [122,] -0.4503071 2.541927e-01
#> [123,] -0.5028051 4.420130e-01
#> [124,] 0.5409099 -3.339539e-01
#> [125,] -0.3042377 -1.135064e-01
#> [126,] -0.4275689 1.823869e-01
#> [127,] -0.1585479 -2.585000e-01
#> [128,] -0.2728565 -1.641392e-01
#> [129,] -0.4576797 2.786849e-01
#> [130,] 0.6258477 -5.883866e-02
#> [131,] 0.2954103 -6.382519e-01
#> [132,] -0.2472111 -1.979515e-01
#> [133,] -0.2802257 -1.531559e-01
#> [134,] -0.2356238 -2.109420e-01
#> [135,] -0.2036769 -2.391178e-01
#> [136,] -0.5379563 5.861164e-01
#> [137,] 0.4861083 -4.595407e-01
#> [138,] 0.7319505 4.669448e-01
#> [139,] 0.3892016 -5.975843e-01
#> [140,] -0.2826536 -1.494149e-01
#> [141,] -0.3896775 7.491565e-02
#> [142,] -0.3450230 -3.277047e-02
#> [143,] -0.2824830 -1.496797e-01
#> [144,] -0.2684590 -1.704258e-01
#> [145,] -0.3542500 -1.217735e-02
#> [146,] -0.6040733 9.020564e-01
#> [147,] 0.5353247 -3.484718e-01
#> [148,] -0.2540583 -1.896006e-01
#> [149,] -0.3474631 -2.740819e-02
#> [150,] -0.1356501 -2.582064e-01
#> [151,] -0.4928225 4.038458e-01
#> [152,] -0.4345838 2.039446e-01
#> [153,] 0.7014902 2.902176e-01
#> [154,] 0.4030017 -5.840469e-01
#> [155,] 0.4644805 -4.992643e-01
#> [156,] 0.4608855 -5.053538e-01
#> [157,] 0.5972242 -1.636561e-01
#> [158,] -0.4358968 2.080380e-01
#> [159,] -0.2108444 -2.337945e-01
#> [160,] 0.7542549 6.128526e-01
#> [161,] -0.3054384 -1.113696e-01
#> [162,] 0.7400248 5.180245e-01
#> [163,] -0.4846618 3.735178e-01
#> [164,] 0.6868664 2.134933e-01
#> [165,] 0.4540515 -5.165330e-01
#> [166,] 0.3402363 -6.299111e-01
#> [167,] -0.4689972 3.174585e-01
#> [168,] 0.5869813 -1.980304e-01
#> [169,] -0.3043512 -1.133051e-01
#> [170,] 0.5692074 -2.539918e-01
#> [171,] 0.3612462 -6.190206e-01
#> [172,] 0.7712582 7.349373e-01
#> [173,] 0.7868191 8.560287e-01
#> [174,] 0.8627235 1.624388e+00
#> [175,] -0.2580710 -1.844762e-01
#> [176,] -0.6354098 1.075094e+00
#> [177,] -0.3309987 -6.242536e-02
#> [178,] 0.6298099 -4.326064e-02
#> [179,] -0.4533319 2.641688e-01
#> [180,] 0.2417798 -6.212110e-01
#> [181,] 0.3038058 -6.382368e-01
#> [182,] -0.2204395 -2.257550e-01
#> [183,] 0.6012398 -1.497416e-01
#> [184,] 0.4498203 -5.231959e-01
#> [185,] -0.2030653 -2.395447e-01
#> [186,] -0.6446544 1.129370e+00
#> [187,] 0.3219170 -6.357723e-01
#> [188,] -0.2661952 -1.735837e-01
#> [189,] -0.1893116 -2.479874e-01
#> [190,] -0.3564778 -7.076370e-03
#> [191,] -0.2977893 -1.247315e-01
#> [192,] -0.1938669 -2.454385e-01
#> [193,] -0.1146231 -2.511301e-01
#> [194,] 0.6004958 -1.523389e-01
#> [195,] -0.5155467 4.924717e-01
#> [196,] 0.7178505 3.821332e-01
#> [197,] 0.7404547 5.207982e-01
#> [198,] -0.4079750 1.249392e-01
#> [199,] 0.4727988 -4.846171e-01
#> [200,] 0.4159022 -5.696013e-01
#> [201,] 0.5400411 -3.362390e-01
#> [202,] 0.4478666 -5.262060e-01
#> [203,] 0.5859358 -2.014502e-01
#> [204,] -0.2362104 -2.103192e-01
#> [205,] -0.2469325 -1.982807e-01
#> [206,] 0.5449923 -3.230842e-01
#> [207,] -0.2508592 -1.935642e-01
#> [208,] -0.2939542 -1.312070e-01
#> [209,] 0.5325551 -3.555212e-01
#> [210,] 0.6964686 2.633149e-01
#> [211,] 0.3054819 -6.381481e-01
#> [212,] -0.5929979 8.446945e-01
#> [213,] -0.2807074 -1.524185e-01
#> [214,] -0.4155960 1.468025e-01
#> [215,] 0.6693779 1.279434e-01
#> [216,] -0.2003320 -2.413994e-01
#> [217,] -0.2885974 -1.400009e-01
#> [218,] 0.5676634 -2.586387e-01
#> [219,] -0.4539238 2.661328e-01
#> [220,] -0.1221192 -2.544489e-01
#> [221,] -0.4492802 2.508287e-01
#> [222,] 0.1889817 -5.740938e-01
#> [223,] -0.2230766 -2.233648e-01
#> [224,] 0.6470967 2.793862e-02
#> [225,] -0.1139432 -2.507835e-01
#> [226,] -0.4385911 2.164963e-01
#> [227,] -0.5422311 6.047109e-01
#> [228,] 0.5319654 -3.570095e-01
#> [229,] 0.3650173 -6.165932e-01
#> [230,] -0.1633967 -2.576440e-01
#> [231,] -0.3932986 8.454044e-02
#> [232,] 0.4401337 -5.377118e-01
#> [233,] -0.3201615 -8.398267e-02
#> [234,] -0.4025572 1.097656e-01
#> [235,] -0.3957721 9.119267e-02
#> [236,] -0.2512610 -1.930722e-01
#> [237,] -0.3534867 -1.391368e-02
#> [238,] -0.3081734 -1.064481e-01
#> [239,] 0.7451085 5.511783e-01
#> [240,] 0.8041300 1.002708e+00
#> [241,] 0.8394986 1.350470e+00
#> [242,] -0.2375113 -2.089245e-01
#> [243,] 0.5671113 -2.602924e-01
#> [244,] -0.2235926 -2.228881e-01
#> [245,] 0.5003327 -4.304606e-01
#> [246,] -0.2131328 -2.319715e-01
#> [247,] -0.2025327 -2.399129e-01
#> [248,] -0.3088377 -1.052412e-01
#> [249,] 0.8803206 1.864428e+00
#> [250,] 0.2487769 -6.251442e-01
#> [251,] 0.6781289 1.699387e-01
#> [252,] 0.4634497 -5.010250e-01
#> [253,] 0.7632587 6.762456e-01
#> [254,] 0.3567723 -6.217136e-01
#> [255,] -0.3247715 -7.495721e-02
#> [256,] -0.4383977 2.158866e-01
#> [257,] -0.3862918 6.603879e-02
#> [258,] -0.3601928 1.541510e-03
#> [259,] 0.6300304 -4.238593e-02
#> [260,] 0.6168686 -9.315633e-02
#> [261,] -0.5463930 6.230448e-01
#> [262,] -0.2190343 -2.269971e-01
#> [263,] 0.3834970 -6.026068e-01
#> [264,] -0.5132500 4.832300e-01
#> [265,] 0.2350382 -6.169239e-01
#> [266,] -0.3660050 1.530500e-02
#> [267,] -0.1174579 -2.524926e-01
#> [268,] 0.5115359 -4.058568e-01
#> [269,] -0.4007431 1.047531e-01
#> [270,] -0.3584436 -2.533614e-03
#> [271,] -0.6234423 1.007069e+00
#> [272,] -0.1651327 -2.572626e-01
#> [273,] -0.2438574 -2.018596e-01
#> [274,] 0.7621408 6.682241e-01
#> [275,] -0.2158416 -2.297369e-01
#> [276,] -0.3594323 -2.340310e-04
#> [277,] 0.7947018 9.211552e-01
#> [278,] -0.2688190 -1.699187e-01
#> [279,] -0.3637893 1.001781e-02
#> [280,] -0.1908849 -2.471350e-01
#> [281,] -0.2733577 -1.634100e-01
#> [282,] -0.2896369 -1.383173e-01
#> [283,] -0.4923061 4.019034e-01
#> [284,] 0.3627295 -6.180831e-01
#> [285,] -0.3051892 -1.118144e-01
#> [286,] 0.4067400 -5.800398e-01
#> [287,] -0.3595367 9.340877e-06
#> [288,] 0.7920972 8.993381e-01
#> [289,] 0.7057500 3.135109e-01
#> [290,] -0.1287620 -2.566432e-01
#> [291,] -0.2049992 -2.381801e-01
#> [292,] -0.5697805 7.304264e-01
#> [293,] -0.2326060 -2.140873e-01
#> [294,] 0.5446391 -3.240332e-01
#> [295,] 0.4435918 -5.326469e-01
#> [296,] 0.3675656 -6.148712e-01
#> [297,] 0.3898966 -5.969495e-01
#> [298,] -0.4165938 1.497100e-01
#> [299,] -0.3255580 -7.339593e-02
#> [300,] 0.3910882 -5.958496e-01
#>
#> $grads_hat_unlabeled
#> [,1] [,2]
#> [1,] -0.15385619 -0.259030571
#> [2,] -0.18887440 -0.248218966
#> [3,] -0.24054865 -0.205597202
#> [4,] -0.28676752 -0.142937629
#> [5,] 0.56397228 -0.269612453
#> [6,] 0.62926454 -0.045420854
#> [7,] 0.60175727 -0.147930463
#> [8,] -0.13742085 -0.258494272
#> [9,] -0.50720489 0.459213680
#> [10,] -0.36437031 0.011399380
#> [11,] -0.22719483 -0.219477980
#> [12,] -0.29005719 -0.137633463
#> [13,] 0.62237383 -0.072276135
#> [14,] -0.25716383 -0.185649527
#> [15,] -0.14537381 -0.259228034
#> [16,] -0.33736010 -0.049219707
#> [17,] 0.51557359 -0.396614960
#> [18,] 0.39862232 -0.588556295
#> [19,] -0.16850262 -0.256410824
#> [20,] 0.61401142 -0.103795610
#> [21,] -0.27707023 -0.157927562
#> [22,] 0.56518581 -0.266025685
#> [23,] -0.46730236 0.311560407
#> [24,] 0.39593948 -0.591220622
#> [25,] -0.46208207 0.293597104
#> [26,] -0.50452800 0.448720664
#> [27,] -0.30834291 -0.106140526
#> [28,] 0.65286185 0.052896125
#> [29,] -0.54021243 0.595900193
#> [30,] -0.35963102 0.000229360
#> [31,] -0.38383046 0.059659201
#> [32,] -0.18731932 -0.249024044
#> [33,] 0.39615271 -0.591011590
#> [34,] 0.80408628 1.002320157
#> [35,] -0.37028688 0.025663980
#> [36,] -0.27736896 -0.157480232
#> [37,] 0.39620285 -0.590962374
#> [38,] 0.83244490 1.275159970
#> [39,] 0.52709314 -0.369135455
#> [40,] -0.65691555 1.203785615
#> [41,] -0.48357967 0.369554379
#> [42,] 0.53710359 -0.343891887
#> [43,] 0.66226761 0.094975845
#> [44,] -0.21933278 -0.226735085
#> [45,] -0.27521045 -0.160691774
#> [46,] -0.42351740 0.170175509
#> [47,] -0.24323876 -0.202567305
#> [48,] -0.44569988 0.239190603
#> [49,] 0.67146206 0.137800820
#> [50,] -0.34224479 -0.038802651
#> [51,] -0.30829353 -0.106230139
#> [52,] -0.30739107 -0.107863599
#> [53,] 0.34773940 -0.626533690
#> [54,] -0.20045467 -0.241317985
#> [55,] -0.31605367 -0.091844157
#> [56,] -0.28011575 -0.153323964
#> [57,] -0.33156947 -0.061257128
#> [58,] 0.50666876 -0.416732286
#> [59,] -0.61229215 0.945869929
#> [60,] 0.40443851 -0.582523955
#> [61,] -0.30680304 -0.108923505
#> [62,] 0.56686158 -0.261038874
#> [63,] -0.26344467 -0.177348795
#> [64,] -0.45676791 0.275623410
#> [65,] -0.31375098 -0.096176495
#> [66,] 0.53787924 -0.341882043
#> [67,] 0.48472970 -0.462232982
#> [68,] -0.16520314 -0.257246324
#> [69,] -0.34414938 -0.034675742
#> [70,] -0.22398509 -0.222523499
#> [71,] 0.75729809 0.633972921
#> [72,] -0.26273300 -0.178310096
#> [73,] 0.48984633 -0.452129321
#> [74,] -0.25487138 -0.188575951
#> [75,] 0.35731385 -0.621398376
#> [76,] 0.69219817 0.240898702
#> [77,] -0.49301541 0.404572091
#> [78,] -0.23621736 -0.210311741
#> [79,] -0.44318161 0.231088461
#> [80,] 0.71852095 0.386044923
#> [81,] -0.35205397 -0.017156564
#> [82,] -0.36209847 0.006016485
#> [83,] -0.33766151 -0.048583900
#> [84,] -0.18360594 -0.250828152
#> [85,] -0.31801671 -0.088108573
#> [86,] -0.38740883 0.068954492
#> [87,] -0.22483675 -0.221726497
#> [88,] 0.54747657 -0.316361575
#> [89,] 0.61188953 -0.111610446
#> [90,] -0.26302137 -0.177921209
#> [91,] -0.57053103 0.733997781
#> [92,] -0.14340964 -0.259130826
#> [93,] 0.46220234 -0.503139953
#> [94,] -0.31237952 -0.098731322
#> [95,] -0.39450098 0.087766287
#> [96,] -0.21624350 -0.229398238
#> [97,] 0.64630554 0.024561869
#> [98,] -0.41148090 0.134921336
#> [99,] -0.17609380 -0.253961234
#> [100,] 0.65230773 0.050470111
#> [101,] -0.14823865 -0.259272651
#> [102,] 0.69277962 0.243926211
#> [103,] -0.57454332 0.753227243
#> [104,] -0.22891239 -0.217801680
#> [105,] -0.27912646 -0.154829851
#> [106,] 0.45200569 -0.519779148
#> [107,] -0.56283474 0.697749390
#> [108,] -0.64943693 1.158060043
#> [109,] 0.58837640 -0.193441783
#> [110,] 0.60384296 -0.140587283
#> [111,] -0.28623566 -0.143784790
#> [112,] 0.63502963 -0.022323358
#> [113,] -0.50320547 0.443568461
#> [114,] -0.61500461 0.960568766
#> [115,] 0.40635912 -0.580454709
#> [116,] -0.22104929 -0.225209220
#> [117,] -0.40690699 0.121923738
#> [118,] -0.35374615 -0.013324115
#> [119,] -0.58933502 0.826137789
#> [120,] -0.45173379 0.258885557
#> [121,] -0.24164798 -0.204368408
#> [122,] 0.62606740 -0.057981798
#> [123,] 0.62696877 -0.054458235
#> [124,] 0.45473281 -0.515441740
#> [125,] -0.57288545 0.745253827
#> [126,] -0.31522098 -0.093416984
#> [127,] -0.61147779 0.941480244
#> [128,] 0.46119575 -0.504833912
#> [129,] -0.22970121 -0.217020959
#> [130,] 0.55578881 -0.293267726
#> [131,] 0.53740624 -0.343108605
#> [132,] -0.40645405 0.120648527
#> [133,] -0.34020793 -0.043175705
#> [134,] 0.61846166 -0.087166154
#> [135,] 0.63877436 -0.007006753
#> [136,] -0.25501453 -0.188394838
#> [137,] -0.29187271 -0.134658815
#> [138,] -0.27155698 -0.166017884
#> [139,] 0.31191331 -0.637543647
#> [140,] -0.28402186 -0.147279841
#> [141,] 0.52908206 -0.364221978
#> [142,] 0.58088762 -0.217734503
#> [143,] -0.28756422 -0.141663219
#> [144,] 0.43531013 -0.544560505
#> [145,] -0.26296352 -0.177999298
#> [146,] -0.20493271 -0.238227773
#> [147,] 0.60803316 -0.125626890
#> [148,] 0.80938555 1.050013968
#> [149,] 0.69666943 0.264379389
#> [150,] -0.28453576 -0.146472988
#> [151,] -0.12153041 -0.254221030
#> [152,] -0.25210643 -0.192031749
#> [153,] -0.29802657 -0.124325973
#> [154,] 0.75320612 0.605644545
#> [155,] -0.25927361 -0.182907406
#> [156,] -0.28519686 -0.145431056
#> [157,] 0.51881006 -0.389061757
#> [158,] 0.63099430 -0.038551521
#> [159,] -0.46088394 0.289517291
#> [160,] -0.17769650 -0.253351394
#> [161,] 0.55554870 -0.293947909
#> [162,] -0.31781357 -0.088496932
#> [163,] -0.31144005 -0.100470443
#> [164,] 0.44139464 -0.535879988
#> [165,] 0.43446131 -0.545739763
#> [166,] 0.27114211 -0.634245172
#> [167,] -0.42123379 0.163369396
#> [168,] -0.10411517 -0.244893834
#> [169,] 0.59004761 -0.187906598
#> [170,] -0.57001593 0.731545667
#> [171,] -0.27255658 -0.164574374
#> [172,] -0.29263626 -0.133397730
#> [173,] 0.70957534 0.334806321
#> [174,] -0.33619842 -0.051661679
#> [175,] 0.18691802 -0.571599357
#> [176,] -0.24323573 -0.202570759
#> [177,] -0.38944347 0.074298346
#> [178,] -0.34500908 -0.032800911
#> [179,] 0.70120060 0.288649993
#> [180,] -0.56996616 0.731308938
#> [181,] -0.10645784 -0.246449982
#> [182,] -0.21026217 -0.234248889
#> [183,] -0.23854224 -0.207806334
#> [184,] 0.62065497 -0.078849728
#> [185,] 0.43547845 -0.544325743
#> [186,] 0.14582606 -0.510744842
#> [187,] -0.37510588 0.037545458
#> [188,] -0.26674310 -0.172824328
#> [189,] -0.67742471 1.334835250
#> [190,] 0.33487987 -0.631974903
#> [191,] 0.55663295 -0.290870158
#> [192,] -0.24618863 -0.199155663
#> [193,] 0.63101896 -0.038453216
#> [194,] -0.28633454 -0.143627504
#> [195,] -0.22922963 -0.217488514
#> [196,] -0.22293266 -0.223497280
#> [197,] -0.24330692 -0.202489529
#> [198,] 0.87350050 1.767535524
#> [199,] 0.58151297 -0.215737588
#> [200,] -0.13044269 -0.257090435
#> [201,] 0.78028045 0.803983663
#> [202,] -0.56846544 0.724187354
#> [203,] -0.18392232 -0.250680973
#> [204,] -0.27559318 -0.160125846
#> [205,] -0.65562898 1.195843324
#> [206,] -0.36839029 0.021052656
#> [207,] -0.36805892 0.020250711
#> [208,] -0.19284019 -0.246034570
#> [209,] 0.60375126 -0.140911574
#> [210,] -0.21877067 -0.227227611
#> [211,] -0.72406080 1.667589537
#> [212,] 0.49000540 -0.451810312
#> [213,] 0.74937428 0.579611596
#> [214,] 0.34273589 -0.628849047
#> [215,] -0.33604631 -0.051980443
#> [216,] -0.46820139 0.314684946
#> [217,] -0.34659307 -0.029327067
#> [218,] -0.26099757 -0.180632046
#> [219,] 0.47116988 -0.487546975
#> [220,] -0.31767296 -0.088765512
#> [221,] -0.21654675 -0.229141552
#> [222,] -0.39113445 0.078772023
#> [223,] -0.28975100 -0.138131824
#> [224,] 0.58579862 -0.201897619
#> [225,] -0.52046000 0.512461724
#> [226,] -0.37327292 0.032998354
#> [227,] 0.27187548 -0.634455111
#> [228,] -0.34215681 -0.038992402
#> [229,] 0.54130049 -0.332923394
#> [230,] 0.52826554 -0.366245211
#> [231,] -0.26495872 -0.175286052
#> [232,] 0.70630624 0.316585164
#> [233,] -0.07962153 -0.222383266
#> [234,] 0.52341724 -0.378084735
#> [235,] 0.56490832 -0.266847646
#> [236,] -0.61820663 0.978075761
#> [237,] -0.22772224 -0.218966692
#> [238,] -0.04674182 -0.170183807
#> [239,] 0.55916518 -0.283619613
#> [240,] -0.53979129 0.594068838
#> [241,] -0.53195397 0.560407915
#> [242,] -0.26321643 -0.177657664
#> [243,] 0.22298222 -0.608022906
#> [244,] 0.56628565 -0.262757164
#> [245,] 0.68868695 0.222779367
#> [246,] 0.56920927 -0.253986139
#> [247,] 0.44668728 -0.528002834
#> [248,] -0.54072956 0.598152154
#> [249,] 0.50113654 -0.428745526
#> [250,] -0.43307759 0.199271309
#> [251,] -0.45941264 0.284529206
#> [252,] 0.57571914 -0.234020496
#> [253,] 0.52531848 -0.373477299
#> [254,] 0.70794529 0.325687805
#> [255,] 0.47016072 -0.489346993
#> [256,] -0.33270531 -0.058922627
#> [257,] -0.29836549 -0.123745713
#> [258,] -0.33947672 -0.044735361
#> [259,] 0.71620544 0.372585014
#> [260,] -0.25525342 -0.188092106
#> [261,] -0.50271072 0.441646447
#> [262,] -0.23048568 -0.216237780
#> [263,] 0.50081338 -0.429435916
#> [264,] -0.23407868 -0.212564769
#> [265,] -0.28816073 -0.140704781
#> [266,] 0.36515901 -0.616499183
#> [267,] 0.55520597 -0.294917464
#> [268,] -0.36546892 0.014021194
#> [269,] -0.12457952 -0.255341830
#> [270,] -0.17487551 -0.254403338
#> [271,] -0.15862009 -0.258489567
#> [272,] 0.59120207 -0.184058383
#> [273,] -0.40064007 0.104469384
#> [274,] 0.43956754 -0.538528668
#> [275,] -0.26670945 -0.172871052
#> [276,] -0.37983662 0.049439660
#> [277,] -0.40601197 0.119405936
#> [278,] 0.60019055 -0.153401702
#> [279,] -0.38263388 0.056580223
#> [280,] -0.29150176 -0.135269339
#> [281,] -0.30349432 -0.114822006
#> [282,] -0.25044287 -0.194071969
#> [283,] -0.28449860 -0.146531429
#> [284,] -0.29899018 -0.122673096
#> [285,] 0.56048551 -0.279804195
#> [286,] 0.26459965 -0.632125046
#> [287,] -0.51355243 0.484443261
#> [288,] -0.36642669 0.016316921
#> [289,] -0.14336105 -0.259127729
#> [290,] 0.58443102 -0.206343589
#> [291,] -0.29967082 -0.121499899
#> [292,] -0.59605625 0.860345179
#> [293,] -0.45443513 0.267832413
#> [294,] 0.55980525 -0.281772961
#> [295,] -0.32680496 -0.070907983
#> [296,] -0.34289957 -0.037387981
#> [297,] -0.36328033 0.008810244
#> [298,] 0.44591241 -0.529175150
#> [299,] -0.17258643 -0.255183613
#> [300,] 0.68238316 0.190938248
#>
#> $grads_hat
#> [,1] [,2]
#> [1,] -0.5483328 6.316688e-01
#> [2,] 0.7765820 7.753021e-01
#> [3,] 0.7357185 4.905460e-01
#> [4,] -0.2487258 -1.961470e-01
#> [5,] -0.3588918 -1.492472e-03
#> [6,] -0.4506309 2.552559e-01
#> [7,] -0.2312590 -2.154591e-01
#> [8,] 0.5342269 -3.512778e-01
#> [9,] -0.1946209 -2.449928e-01
#> [10,] 0.6245436 -6.390708e-02
#> [11,] 0.5005168 -4.300683e-01
#> [12,] -0.3301448 -6.416684e-02
#> [13,] 0.8068425 1.026953e+00
#> [14,] -0.1782893 -2.531177e-01
#> [15,] 0.5605566 -2.795982e-01
#> [16,] 0.7242307 4.198403e-01
#> [17,] -0.4240700 1.718307e-01
#> [18,] -0.2770270 -1.579922e-01
#> [19,] -0.2257115 -2.208995e-01
#> [20,] -0.1574386 -2.586521e-01
#> [21,] -0.4277925 1.830661e-01
#> [22,] -0.1043729 -2.450698e-01
#> [23,] -0.2832929 -1.484197e-01
#> [24,] 0.5331505 -3.540142e-01
#> [25,] -0.3309082 -6.261016e-02
#> [26,] -0.5625335 6.963473e-01
#> [27,] -0.2078722 -2.360734e-01
#> [28,] -0.4726900 3.304217e-01
#> [29,] 0.3048260 -6.381862e-01
#> [30,] -0.6910079 1.426487e+00
#> [31,] 0.6154530 -9.844457e-02
#> [32,] -0.2324998 -2.141962e-01
#> [33,] -0.5329337 5.645724e-01
#> [34,] 0.3915242 -5.954435e-01
#> [35,] -0.2770162 -1.580083e-01
#> [36,] 0.5436412 -3.267058e-01
#> [37,] 0.7603035 6.551350e-01
#> [38,] -0.1913866 -2.468571e-01
#> [39,] 0.6226135 -7.135553e-02
#> [40,] -0.3294098 -6.566011e-02
#> [41,] 0.5071699 -4.156259e-01
#> [42,] -0.5310764 5.566879e-01
#> [43,] -0.4360866 2.086312e-01
#> [44,] -0.2688689 -1.698483e-01
#> [45,] -0.1854225 -2.499665e-01
#> [46,] 0.5159264 -3.957980e-01
#> [47,] -0.3013813 -1.185308e-01
#> [48,] -0.3173434 -8.939415e-02
#> [49,] 0.3105129 -6.377109e-01
#> [50,] -0.1188848 -2.531287e-01
#> [51,] -0.5352765 5.745810e-01
#> [52,] 0.5967000 -1.654542e-01
#> [53,] 0.3799133 -6.055916e-01
#> [54,] 0.6698826 1.303224e-01
#> [55,] -0.4029164 1.107620e-01
#> [56,] 0.6664116 1.140661e-01
#> [57,] 0.5985728 -1.590109e-01
#> [58,] -0.1485332 -2.592708e-01
#> [59,] -0.2832444 -1.484953e-01
#> [60,] -0.6587761 1.215328e+00
#> [61,] -0.2296169 -2.171047e-01
#> [62,] 0.5282404 -3.663073e-01
#> [63,] -0.3237915 -7.689379e-02
#> [64,] 0.5617866 -2.760209e-01
#> [65,] -0.3352592 -5.362604e-02
#> [66,] 0.5417414 -3.317576e-01
#> [67,] -0.3134193 -9.679606e-02
#> [68,] 0.6718802 1.397893e-01
#> [69,] 0.6134002 -1.060541e-01
#> [70,] -0.1884934 -2.484189e-01
#> [71,] -0.3794951 4.857330e-02
#> [72,] -0.3046839 -1.127141e-01
#> [73,] -0.3028884 -1.158902e-01
#> [74,] -0.1581392 -2.585580e-01
#> [75,] -0.1933953 -2.457138e-01
#> [76,] -0.2171969 -2.285878e-01
#> [77,] -0.2141608 -2.311332e-01
#> [78,] 0.6035191 -1.417320e-01
#> [79,] 0.3756588 -6.089644e-01
#> [80,] -0.4356170 2.071641e-01
#> [81,] 0.5986182 -1.588541e-01
#> [82,] -0.1683308 -2.564578e-01
#> [83,] -0.2629717 -1.779882e-01
#> [84,] 0.4949028 -4.418431e-01
#> [85,] -0.3250865 -7.433259e-02
#> [86,] 0.4169712 -5.683259e-01
#> [87,] -0.2686272 -1.701891e-01
#> [88,] -0.3606467 2.604157e-03
#> [89,] -0.2401493 -2.060403e-01
#> [90,] 0.5678145 -2.581855e-01
#> [91,] -0.2759126 -1.596523e-01
#> [92,] 0.6512501 4.585601e-02
#> [93,] -0.2652918 -1.748291e-01
#> [94,] -0.2162386 -2.294023e-01
#> [95,] -0.4524717 2.613216e-01
#> [96,] -0.3407617 -4.199101e-02
#> [97,] 0.2930427 -6.381266e-01
#> [98,] -0.3340048 -5.623590e-02
#> [99,] 0.5836175 -2.089752e-01
#> [100,] -0.6657286 1.259060e+00
#> [101,] -0.3368255 -5.034509e-02
#> [102,] -0.3355140 -5.309408e-02
#> [103,] 0.6248283 -6.280282e-02
#> [104,] 0.4441023 -5.318882e-01
#> [105,] 0.6020755 -1.468144e-01
#> [106,] -0.7499823 1.877185e+00
#> [107,] 0.6280405 -5.025072e-02
#> [108,] -0.1420222 -2.590292e-01
#> [109,] -0.1524870 -2.591294e-01
#> [110,] -0.2623347 -1.788457e-01
#> [111,] -0.1328581 -2.576584e-01
#> [112,] 0.4092217 -5.772992e-01
#> [113,] -0.3784040 4.581362e-02
#> [114,] -0.4131263 1.396507e-01
#> [115,] -0.2824695 -1.497007e-01
#> [116,] 0.5716186 -2.466672e-01
#> [117,] -0.3373584 -4.922325e-02
#> [118,] -0.3279432 -6.862330e-02
#> [119,] -0.3294601 -6.555802e-02
#> [120,] -0.4933050 4.056632e-01
#> [121,] -0.4044453 1.150188e-01
#> [122,] 0.5496929 -3.102948e-01
#> [123,] 0.4971949 -4.370811e-01
#> [124,] 0.5409099 -3.339539e-01
#> [125,] -0.3042377 -1.135064e-01
#> [126,] 0.5724311 -2.441804e-01
#> [127,] -0.1585479 -2.585000e-01
#> [128,] -0.2728565 -1.641392e-01
#> [129,] 0.5423203 -3.302233e-01
#> [130,] 0.6258477 -5.883866e-02
#> [131,] -0.7045897 1.522309e+00
#> [132,] -0.2472111 -1.979515e-01
#> [133,] -0.2802257 -1.531559e-01
#> [134,] -0.2356238 -2.109420e-01
#> [135,] -0.2036769 -2.391178e-01
#> [136,] -0.5379563 5.861164e-01
#> [137,] 0.4861083 -4.595407e-01
#> [138,] -0.2680495 -1.710010e-01
#> [139,] 0.3892016 -5.975843e-01
#> [140,] 0.7173464 3.792001e-01
#> [141,] -0.3896775 7.491565e-02
#> [142,] -0.3450230 -3.277047e-02
#> [143,] 0.7175170 3.801920e-01
#> [144,] -0.2684590 -1.704258e-01
#> [145,] -0.3542500 -1.217735e-02
#> [146,] -0.6040733 9.020564e-01
#> [147,] 0.5353247 -3.484718e-01
#> [148,] -0.2540583 -1.896006e-01
#> [149,] 0.6525369 5.147268e-02
#> [150,] 0.8643499 1.645268e+00
#> [151,] -0.4928225 4.038458e-01
#> [152,] 0.5654162 -2.653425e-01
#> [153,] -0.2985098 -1.234982e-01
#> [154,] 0.4030017 -5.840469e-01
#> [155,] 0.4644805 -4.992643e-01
#> [156,] 0.4608855 -5.053538e-01
#> [157,] 0.5972242 -1.636561e-01
#> [158,] -0.4358968 2.080380e-01
#> [159,] -0.2108444 -2.337945e-01
#> [160,] -0.2457451 -1.996746e-01
#> [161,] -0.3054384 -1.113696e-01
#> [162,] -0.2599752 -1.819852e-01
#> [163,] 0.5153382 -3.971593e-01
#> [164,] 0.6868664 2.134933e-01
#> [165,] 0.4540515 -5.165330e-01
#> [166,] 0.3402363 -6.299111e-01
#> [167,] 0.5310028 -3.594293e-01
#> [168,] 0.5869813 -1.980304e-01
#> [169,] -0.3043512 -1.133051e-01
#> [170,] -0.4307926 1.922283e-01
#> [171,] 0.3612462 -6.190206e-01
#> [172,] -0.2287418 -2.179696e-01
#> [173,] -0.2131809 -2.319325e-01
#> [174,] -0.1372765 -2.584725e-01
#> [175,] 0.7419290 5.303512e-01
#> [176,] -0.6354098 1.075094e+00
#> [177,] 0.6690013 1.261716e-01
#> [178,] 0.6298099 -4.326064e-02
#> [179,] -0.4533319 2.641688e-01
#> [180,] 0.2417798 -6.212110e-01
#> [181,] 0.3038058 -6.382368e-01
#> [182,] -0.2204395 -2.257550e-01
#> [183,] 0.6012398 -1.497416e-01
#> [184,] 0.4498203 -5.231959e-01
#> [185,] -0.2030653 -2.395447e-01
#> [186,] 0.3553456 -6.225297e-01
#> [187,] -0.6780830 1.339185e+00
#> [188,] -0.2661952 -1.735837e-01
#> [189,] -0.1893116 -2.479874e-01
#> [190,] -0.3564778 -7.076370e-03
#> [191,] 0.7022107 2.941268e-01
#> [192,] -0.1938669 -2.454385e-01
#> [193,] -0.1146231 -2.511301e-01
#> [194,] 0.6004958 -1.523389e-01
#> [195,] -0.5155467 4.924717e-01
#> [196,] -0.2821495 -1.501966e-01
#> [197,] -0.2595453 -1.825509e-01
#> [198,] -0.4079750 1.249392e-01
#> [199,] 0.4727988 -4.846171e-01
#> [200,] 0.4159022 -5.696013e-01
#> [201,] 0.5400411 -3.362390e-01
#> [202,] 0.4478666 -5.262060e-01
#> [203,] 0.5859358 -2.014502e-01
#> [204,] -0.2362104 -2.103192e-01
#> [205,] -0.2469325 -1.982807e-01
#> [206,] 0.5449923 -3.230842e-01
#> [207,] -0.2508592 -1.935642e-01
#> [208,] -0.2939542 -1.312070e-01
#> [209,] 0.5325551 -3.555212e-01
#> [210,] 0.6964686 2.633149e-01
#> [211,] 0.3054819 -6.381481e-01
#> [212,] 0.4070021 -5.797533e-01
#> [213,] -0.2807074 -1.524185e-01
#> [214,] -0.4155960 1.468025e-01
#> [215,] -0.3306221 -6.319437e-02
#> [216,] -0.2003320 -2.413994e-01
#> [217,] -0.2885974 -1.400009e-01
#> [218,] -0.4323366 1.969811e-01
#> [219,] -0.4539238 2.661328e-01
#> [220,] -0.1221192 -2.544489e-01
#> [221,] 0.5507198 -3.074614e-01
#> [222,] 0.1889817 -5.740938e-01
#> [223,] -0.2230766 -2.233648e-01
#> [224,] 0.6470967 2.793862e-02
#> [225,] -0.1139432 -2.507835e-01
#> [226,] -0.4385911 2.164963e-01
#> [227,] 0.4577689 -5.105163e-01
#> [228,] 0.5319654 -3.570095e-01
#> [229,] 0.3650173 -6.165932e-01
#> [230,] -0.1633967 -2.576440e-01
#> [231,] 0.6067014 -1.304119e-01
#> [232,] -0.5598663 6.839892e-01
#> [233,] -0.3201615 -8.398267e-02
#> [234,] -0.4025572 1.097656e-01
#> [235,] -0.3957721 9.119267e-02
#> [236,] -0.2512610 -1.930722e-01
#> [237,] -0.3534867 -1.391368e-02
#> [238,] -0.3081734 -1.064481e-01
#> [239,] -0.2548915 -1.885506e-01
#> [240,] 0.8041300 1.002708e+00
#> [241,] -0.1605014 -2.581925e-01
#> [242,] -0.2375113 -2.089245e-01
#> [243,] 0.5671113 -2.602924e-01
#> [244,] -0.2235926 -2.228881e-01
#> [245,] -0.4996673 4.298882e-01
#> [246,] -0.2131328 -2.319715e-01
#> [247,] -0.2025327 -2.399129e-01
#> [248,] 0.6911623 2.355243e-01
#> [249,] -0.1196794 -2.534686e-01
#> [250,] 0.2487769 -6.251442e-01
#> [251,] -0.3218711 -8.066068e-02
#> [252,] 0.4634497 -5.010250e-01
#> [253,] -0.2367413 -2.097523e-01
#> [254,] 0.3567723 -6.217136e-01
#> [255,] -0.3247715 -7.495721e-02
#> [256,] 0.5616023 -2.765581e-01
#> [257,] -0.3862918 6.603879e-02
#> [258,] 0.6398072 -2.738170e-03
#> [259,] -0.3699696 2.489008e-02
#> [260,] 0.6168686 -9.315633e-02
#> [261,] 0.4536070 -5.172422e-01
#> [262,] -0.2190343 -2.269971e-01
#> [263,] -0.6165030 9.687400e-01
#> [264,] -0.5132500 4.832300e-01
#> [265,] 0.2350382 -6.169239e-01
#> [266,] 0.6339950 -2.651137e-02
#> [267,] -0.1174579 -2.524926e-01
#> [268,] -0.4884641 3.875513e-01
#> [269,] -0.4007431 1.047531e-01
#> [270,] -0.3584436 -2.533614e-03
#> [271,] -0.6234423 1.007069e+00
#> [272,] -0.1651327 -2.572626e-01
#> [273,] -0.2438574 -2.018596e-01
#> [274,] 0.7621408 6.682241e-01
#> [275,] -0.2158416 -2.297369e-01
#> [276,] -0.3594323 -2.340310e-04
#> [277,] -0.2052982 -2.379653e-01
#> [278,] -0.2688190 -1.699187e-01
#> [279,] -0.3637893 1.001781e-02
#> [280,] -0.1908849 -2.471350e-01
#> [281,] -0.2733577 -1.634100e-01
#> [282,] -0.2896369 -1.383173e-01
#> [283,] -0.4923061 4.019034e-01
#> [284,] -0.6372705 1.085895e+00
#> [285,] -0.3051892 -1.118144e-01
#> [286,] 0.4067400 -5.800398e-01
#> [287,] -0.3595367 9.340877e-06
#> [288,] -0.2079028 -2.360505e-01
#> [289,] -0.2942500 -1.307129e-01
#> [290,] -0.1287620 -2.566432e-01
#> [291,] -0.2049992 -2.381801e-01
#> [292,] 0.4302195 -5.515170e-01
#> [293,] -0.2326060 -2.140873e-01
#> [294,] 0.5446391 -3.240332e-01
#> [295,] 0.4435918 -5.326469e-01
#> [296,] -0.6324344 1.057949e+00
#> [297,] 0.3898966 -5.969495e-01
#> [298,] -0.4165938 1.497100e-01
#> [299,] -0.3255580 -7.339593e-02
#> [300,] 0.3910882 -5.958496e-01
#>
#> $inv_hessian
#> [,1] [,2]
#> [1,] 4.8608453 0.8828392
#> [2,] 0.8828392 5.2163213
#>