У меня есть 10000 копий начальной загрузки модели, которую я запустил.Эти копии хранятся во вложенном списке с исходными коэффициентами.Пример приведен ниже:
list(base_coef_se = structure(c(-9.37986685725317, 0.155678551220836,
-3.62414019245961, -0.126804461815305, 0.0146375312358676, -0.000723522127475158,
0.0174594869103186, -7.46626988904293e-05, 1.08083404078253,
0.0952045612199575, 1.67294090295162, 0.121031513957132, 0.0149927757855495,
0.00157604325139599, 0.0269592751077193, 0.00192361234439622), .Dim = c(8L,
2L), .Dimnames = list(c("(Intercept)", "time", "post", "time_post",
"contCliDur", "time:contCliDur", "post:contCliDur", "time_post:contCliDur"
), c("Estimate", "Std. Error"))), resampled_coef_se = list(structure(c(-18.1612691912385,
0.256905751754698, -4.9612118679509, -0.253544835981255, 0.0163792352375458,
-0.00118132154881255, 0.0198470852677465, 0.00057693661223781,
1.38557380020857, 0.0879276751691295, 1.4125787404075, 0.128967738894805,
0.0102751056701331, 0.00105336789985494, 0.0104957583658257,
0.00155826008709203), .Dim = c(8L, 2L), .Dimnames = list(c("(Intercept)",
"time", "post", "time_post", "contCliDur", "time:contCliDur",
"post:contCliDur", "time_post:contCliDur"), c("Estimate", "Std. Error"
))), structure(c(-17.5982152596069, 0.197745601965269, -5.1815949738114,
-0.147733895583491, 0.0130946696793787, -0.00180310765529369,
0.0207317469135769, 0.00185166728927098, 1.36483120763596, 0.0846122583915089,
1.48154771359069, 0.114675315805788, 0.00512778978793877, NaN,
0.0054378244176285, 0.00101629158255635), .Dim = c(8L, 2L), .Dimnames = list(
c("(Intercept)", "time", "post", "time_post", "contCliDur",
"time:contCliDur", "post:contCliDur", "time_post:contCliDur"
), c("Estimate", "Std. Error"))), structure(c(-17.8156032348215,
0.203638221423209, -5.54545554497033, -0.2357111749042, -0.0520860748296176,
0.00279430370426871, 0.0212642160770137, -0.00507772138662614,
1.5709863634196, 0.0989975430258171, 1.58692634951883, 0.139686105703606,
NaN, NaN, 0.00694934556471572, NaN), .Dim = c(8L, 2L), .Dimnames = list(
c("(Intercept)", "time", "post", "time_post", "contCliDur",
"time:contCliDur", "post:contCliDur", "time_post:contCliDur"
), c("Estimate", "Std. Error"))), structure(c(-19.055423401444,
0.314396242584355, -5.02238308926687, -0.299987297223747, 0.0257428538623797,
-0.00215468595968354, 0.0217907808457957, 0.000559888687392484,
1.37101351960185, 0.0744785913294841, 1.31232283263669, 0.105968566966246,
0.00776185471854608, NaN, 0.00926264411513221, 0.0018716663487157
), .Dim = c(8L, 2L), .Dimnames = list(c("(Intercept)", "time",
"post", "time_post", "contCliDur", "time:contCliDur", "post:contCliDur",
"time_post:contCliDur"), c("Estimate", "Std. Error"))), structure(c(-18.1683481681929,
0.233625037662062, -4.27888073347339, -0.189412908192303, 0.0171844363916739,
-0.00215434913420407, 0.0336838348659315, 0.00141701445199322,
1.29356290378277, 0.074235714231958, 1.400292094346, 0.106600510398338,
0.00794211843447276, NaN, 0.00931211025043822, 0.000693403053287574
), .Dim = c(8L, 2L), .Dimnames = list(c("(Intercept)", "time",
"post", "time_post", "contCliDur", "time:contCliDur", "post:contCliDur",
"time_post:contCliDur"), c("Estimate", "Std. Error"))), structure(c(-19.6456927995778,
0.355516079978919, -6.2614931925808, -0.394755281844465, 0.0169406686316253,
-0.00124163438771531, 0.00633423553496649, 0.00139567445078552,
1.35837303807007, 0.0738393372234729, 1.36535901494921, 0.115652150406974,
0.00613771071584745, 0.000601199039177029, 0.0160142457064001,
0.0015998278376742), .Dim = c(8L, 2L), .Dimnames = list(c("(Intercept)",
"time", "post", "time_post", "contCliDur", "time:contCliDur",
"post:contCliDur", "time_post:contCliDur"), c("Estimate", "Std. Error"
))), structure(c(-19.3425934566239, 0.296180224015335, -6.1650935167006,
-0.276221654694225, 0.00566217553267832, -0.00122405494660451,
0.0160084689361796, 0.0009203729965434, 1.95871850007256, 0.11730715496438,
1.92361227205151, 0.162237900750083, 0.00707973087099433, 0.00129152169259667,
NaN, 0.00177714130604943), .Dim = c(8L, 2L), .Dimnames = list(
c("(Intercept)", "time", "post", "time_post", "contCliDur",
"time:contCliDur", "post:contCliDur", "time_post:contCliDur"
), c("Estimate", "Std. Error"))), structure(c(-17.4531841827594,
0.165349049543091, -4.01873594765036, -0.330287811263644, 0.00416716287166357,
-0.000231294633694726, 0.00828180933942113, 0.000161330881795571,
1.50573197109658, 0.095036724861813, 1.62497573110345, 0.1548046048241,
0.00690403446471702, NaN, 0.00796949977372255, 0.0015805070552712
), .Dim = c(8L, 2L), .Dimnames = list(c("(Intercept)", "time",
"post", "time_post", "contCliDur", "time:contCliDur", "post:contCliDur",
"time_post:contCliDur"), c("Estimate", "Std. Error"))), structure(c(-19.3847969742215,
0.292559718925597, -3.48307505395726, -0.433167491139887, -0.169440471730703,
0.0101960632857228, 0.00209832446923212, -0.00983216827003008,
2.14106308783924, 0.131506063666155, 1.95248284216704, 0.186968371865016,
0.0122440611245784, 0.000313174491130102, 0.0135836174130594,
0.00172399058719801), .Dim = c(8L, 2L), .Dimnames = list(c("(Intercept)",
"time", "post", "time_post", "contCliDur", "time:contCliDur",
"post:contCliDur", "time_post:contCliDur"), c("Estimate", "Std. Error"
))), structure(c(-20.5941702062624, 0.408889860728984, -5.5087408765675,
-0.475680840525492, 0.0291226166686693, -0.0037119900593914,
0.0481648136775649, 0.00323449766328247, 4.2628537959608, 0.347784069726454,
2.03084546983051, 0.507838680371248, 0.027403943437017, 0.0073583231654617,
0.0577295541667351, 0.0129648944440415), .Dim = c(8L, 2L), .Dimnames = list(
c("(Intercept)", "time", "post", "time_post", "contCliDur",
"time:contCliDur", "post:contCliDur", "time_post:contCliDur"
), c("Estimate", "Std. Error"))), structure(c(-18.9865695627832,
0.293742281192121, -6.59056007331337, -0.225800364392639, 0.0163550115124361,
-0.00234049323787844, 0.0484697925960991, -0.00398580816001745,
0.777961584388928, 0.0161957963991534, 1.66491381314735, NaN,
NaN, NaN, NaN, 0.00184713232624521), .Dim = c(8L, 2L), .Dimnames = list(
c("(Intercept)", "time", "post", "time_post", "contCliDur",
"time:contCliDur", "post:contCliDur", "time_post:contCliDur"
), c("Estimate", "Std. Error"))), structure(c(-18.7334544812796,
0.286039420614192, -6.36391423369863, -0.231744090998075, 0.0176012397396632,
-0.00117635449820784, 0.0165462123647037, 0.00101617397446609,
1.17251203806065, 0.054921970477589, 1.21187284205995, 0.0909847055069732,
0.00250450873107377, NaN, NaN, 0.000951038826653789), .Dim = c(8L,
2L), .Dimnames = list(c("(Intercept)", "time", "post", "time_post",
"contCliDur", "time:contCliDur", "post:contCliDur", "time_post:contCliDur"
), c("Estimate", "Std. Error"))), structure(c(-18.0053450559172,
0.196256826524639, -5.70257570580529, -0.219113338409512, 0.0145769381878011,
-0.00130384629808055, 0.00857651238366853, 0.00178915282580236,
1.3973478727735, 0.0816111614668502, 1.54208486761238, 0.128031203777085,
0.00573276605426401, 0.000102056047462359, 0.0057245581909566,
0.00140008122989998), .Dim = c(8L, 2L), .Dimnames = list(c("(Intercept)",
"time", "post", "time_post", "contCliDur", "time:contCliDur",
"post:contCliDur", "time_post:contCliDur"), c("Estimate", "Std. Error"
))), structure(c(-18.9467132338507, 0.307046072590829, -4.36459628871609,
-0.344083153911098, 0.0145552110031218, -0.00170455668398209,
0.0231173071868347, 0.00134512912224554, 1.5333389749591, 0.0890066760111158,
1.44490961706742, 0.128825772537411, 0.00526913460476195, NaN,
0.00549026208064555, 0.00119916686642883), .Dim = c(8L, 2L), .Dimnames = list(
c("(Intercept)", "time", "post", "time_post", "contCliDur",
"time:contCliDur", "post:contCliDur", "time_post:contCliDur"
), c("Estimate", "Std. Error"))), structure(c(-19.8213585563008,
0.351561807570256, -6.97163835579792, -0.330452031519617, -0.0498716266145522,
0.00289956454644365, 0.0151320842727762, -0.00292503150929392,
1.45205883811615, 0.0743804636507862, 1.41446351103397, 0.10854044727661,
NaN, NaN, 0.0116872034516858, NaN), .Dim = c(8L, 2L), .Dimnames = list(
c("(Intercept)", "time", "post", "time_post", "contCliDur",
"time:contCliDur", "post:contCliDur", "time_post:contCliDur"
), c("Estimate", "Std. Error"))), structure(c(-19.6564146950556,
0.360114938214185, -5.55958545674022, -0.449769554288, 0.0272063864647111,
-0.00252867163911472, 0.0162976628720583, 0.00310805241730064,
1.43726587489255, 0.0756491192049468, 1.27956954800585, 0.115469060566085,
0.00632020030456727, NaN, 0.0081692956442115, 0.00143884739370199
), .Dim = c(8L, 2L), .Dimnames = list(c("(Intercept)", "time",
"post", "time_post", "contCliDur", "time:contCliDur", "post:contCliDur",
"time_post:contCliDur"), c("Estimate", "Std. Error"))), structure(c(-18.3396588956918,
0.274627100211186, -4.65176632385331, -0.369556528110478, -0.185616572553173,
0.0106244670646204, 0.0143118598698815, -0.0109865123424944,
1.56929053425984, 0.0927113879956869, 1.46191470310708, 0.126358362454476,
0.0154001602746626, NaN, 0.0174417320996838, 0.00115401606924451
), .Dim = c(8L, 2L), .Dimnames = list(c("(Intercept)", "time",
"post", "time_post", "contCliDur", "time:contCliDur", "post:contCliDur",
"time_post:contCliDur"), c("Estimate", "Std. Error"))), structure(c(-18.8864373653337,
0.288994708709617, -5.2349815269174, -0.330691253353902, -0.0394234803160128,
0.00185619670092243, 0.00977023264284671, -0.00163716427792251,
1.82907605462599, 0.109444035616113, 1.73027838307847, 0.147982688577937,
0.0133411974453402, NaN, 0.0176253084931375, 0.00143146732482391
), .Dim = c(8L, 2L), .Dimnames = list(c("(Intercept)", "time",
"post", "time_post", "contCliDur", "time:contCliDur", "post:contCliDur",
"time_post:contCliDur"), c("Estimate", "Std. Error"))), structure(c(-18.7647233096223,
0.290335180483557, -5.87640127095435, -0.265426422281286, 0.0118278744394877,
-0.000711403091766041, -0.0344559948502025, 0.00284203735723108,
1.35960526598831, 0.0764751543634797, 1.3373086730687, 0.106493915428396,
0.00796618822647401, 0.000766822039387406, NaN, 0.000366510084702099
), .Dim = c(8L, 2L), .Dimnames = list(c("(Intercept)", "time",
"post", "time_post", "contCliDur", "time:contCliDur", "post:contCliDur",
"time_post:contCliDur"), c("Estimate", "Std. Error"))), structure(c(-19.7209531026486,
0.352997774246738, -3.40584748582673, -0.436052197276833, 0.029164289836885,
-0.00282464985087045, 0.00975881756418428, 0.00385237360441112,
1.56189506221244, 0.0893999561887213, 1.33682434436739, 0.130514283460853,
0.00831966396418846, 0.000750255067015981, NaN, 0.00130733574599046
), .Dim = c(8L, 2L), .Dimnames = list(c("(Intercept)", "time",
"post", "time_post", "contCliDur", "time:contCliDur", "post:contCliDur",
"time_post:contCliDur"), c("Estimate", "Std. Error")))))
Многие реплики не смогли сойтись и будут перезапущены.
Вопрос
Как индексироватьсписок без этих элементов с NaN?
Как мне удалить все элементы с NaN из списка?Обратите внимание, я не хочу удалять только NaN или каждую строку с NaN.