This is an accessor returns the @mediators slot in a mediation_data object.
Usage
# S4 method for class 'mediation_data'
mediators(object)
Value
m A data.frame whose rows are samples and columns are values of mediators across those samples.
Examples
exper <- demo_joy() |>
mediation_data("PHQ", "treatment", starts_with("ASV"))
mediators(exper)
#> ASV1 ASV2 ASV3 ASV4 ASV5
#> 1 0.78041075 0.34879581 -0.84725024 0.78720616 -0.40496921
#> 2 -1.99037774 -1.40278560 0.43512561 -0.89294471 -1.51734210
#> 3 -0.18847337 -0.79706892 1.02132256 -2.25977871 0.82735951
#> 4 -2.00438379 0.14130874 0.71731429 1.58020734 0.25393266
#> 5 0.52805106 0.01548852 -0.25376230 1.94145854 -0.89673154
#> 6 -0.41939486 -1.10258157 0.35896247 -0.53394917 1.13788036
#> 7 0.70527315 0.04129511 -0.35351708 1.82642226 0.05993424
#> 8 0.09153625 -1.49027444 0.33891581 -0.36703002 0.81740171
#> 9 1.49700998 0.53720944 0.40569979 -0.61482286 0.12978855
#> 10 0.80813351 0.95595948 1.55271848 1.14707997 0.93684458
#> 11 -0.54602775 -0.37791511 -0.03684076 -0.64345233 -0.88881141
#> 12 0.33735228 -0.34628331 1.03082935 1.00301211 -0.14867147
#> 13 -0.61925027 0.02777542 0.73796569 0.97749456 -0.13420599
#> 14 0.01127337 -0.31919086 -0.40878499 0.16962096 0.42620627
#> 15 0.42796269 1.31538777 -0.20227655 -0.81654042 -0.08607170
#> 16 -0.48807106 0.13979266 2.12800457 0.19920965 -0.63049556
#> 17 1.70067191 0.04349727 -0.80527478 -0.10783350 -1.13181001
#> 18 0.97664343 0.16848741 -1.18952883 0.95717307 0.70382335
#> 19 1.49751242 0.43199294 0.41755378 1.60531415 -0.39625029
#> 20 -2.64173567 2.42242300 -0.73411239 0.58523235 -1.05232706
#> 21 0.55350973 -0.37502765 0.32780579 0.11154975 -1.23966549
#> 22 -1.12258357 0.03242112 0.53695518 -0.23521289 1.33340339
#> 23 1.22645651 0.69510851 -1.31424076 -0.45966620 -0.84138188
#> 24 -1.62486570 0.95133396 -0.33670930 1.17844649 -0.27768842
#> 25 0.57301774 -1.67341301 1.05413891 -0.09103139 -0.19855320
#> 26 -0.67411254 -3.47884708 -1.29977623 0.89870458 -0.59012499
#> 27 0.52784848 -0.91313836 -0.10227487 -0.81139625 -2.09935744
#> 28 0.60416767 -0.16912596 0.67408777 0.79632150 0.11178201
#> 29 1.59533596 0.61633521 -0.10623687 -0.84033385 -1.09262103
#> 30 -0.64584840 -1.12840724 -0.04755695 -0.76702028 -0.80800975
#> 31 0.76604119 0.21285883 -0.77595855 -0.84168407 -0.45862253
#> 32 2.13386839 0.23539005 -0.22189855 0.33120119 -0.74230471
#> 33 -1.23703734 -1.18821420 -0.62349378 -0.55114479 0.05478116
#> 34 1.69506056 -0.19845861 -0.30199979 -1.11118332 -1.76315544
#> 35 0.15810095 0.80225554 -0.06193442 0.52074840 -1.39802897
#> 36 0.30208546 3.55654983 0.71980294 -0.71910300 0.46024497
#> 37 -0.62110509 -2.17872234 0.15692043 -0.72980198 -1.08282401
#> 38 0.46110679 1.83872748 -0.37281193 -0.13309006 0.19352317
#> 39 1.48855525 -0.02179367 0.70652626 -0.85641241 -0.44375071
#> 40 -0.53898091 0.19320972 -0.30678791 -0.03578401 1.35600300
#> 41 -1.98474061 0.59453686 -2.15184910 0.23350757 0.74998637
#> 42 0.69817338 0.89081158 0.27195901 0.48170157 -0.31211255
#> 43 -1.86946528 -1.29470705 -1.27160693 0.11389699 0.52259779
#> 44 -1.81058507 -0.79153587 -0.74476596 -1.18828058 -2.71643615
#> 45 0.14281298 -1.61897343 -0.42727714 1.30717641 -1.02485959
#> 46 0.38308655 0.85333603 -0.01062975 0.23176509 -0.03454462
#> 47 -1.05977044 -0.51402354 1.87118746 -0.72221129 -0.21732995
#> 48 -0.10222304 0.09650102 -1.12479340 0.72757269 1.09084813
#> 49 -1.32641470 1.27515699 0.70977115 1.53690394 -0.48658116
#> 50 0.29340430 0.40180168 0.21893813 0.31168548 1.21887672
#> 51 -1.08998162 0.14113898 0.66506896 -0.66799802 -0.37457381
#> 52 -0.41372622 -0.12179735 0.83696462 0.43384273 0.09772799
#> 53 1.85895693 1.43897313 -0.81400610 1.13474338 -1.05441268
#> 54 -0.04282727 -0.69913979 1.31336575 -1.42071496 0.69325644
#> 55 0.92163265 0.99953737 0.86759632 0.42498677 0.01565507
#> 56 2.35577133 -0.09032139 0.37237035 0.14824571 0.52042996
#> 57 -0.26525297 -0.62970314 -2.11756538 -0.92595003 0.70467528
#> 58 1.69906095 1.12409262 0.18737554 0.66257950 0.82609181
#> 59 0.76506663 -0.65658161 1.59981234 -0.72786055 0.20557161
#> 60 -1.27106909 -0.52319168 1.64878081 -0.14518789 0.59560915
#> 61 0.71705631 0.39773975 0.24630057 -0.55462644 0.38256428
#> 62 -0.11489473 -1.68695035 -1.40769898 0.08825469 0.39650461
#> 63 -0.54655095 2.51585265 0.60442828 0.54955115 1.15599956
#> 64 -1.39706753 0.18917310 -0.84137681 -0.22824855 -1.32264618
#> 65 -0.99212697 0.75697346 0.13745070 2.28817778 -0.01290144
#> 66 -0.33254871 -0.97456858 1.25882583 1.20787751 0.85190596
#> 67 -0.19149308 1.03512192 -0.64320471 1.59656447 1.26450221
#> 68 -0.05480136 -0.42282484 -1.57529641 -0.31275985 -0.12054063
#> 69 -0.29141877 -0.44438149 0.26167048 -1.21211242 0.44751992
#> 70 -0.22545585 0.08596092 -0.12393300 -0.03740420 -0.35669808
#> 71 0.35416672 1.20955545 1.64537752 -1.20386793 0.18850297
#> 72 0.21935252 0.22968520 0.93219957 0.93235033 0.11594225
#> 73 1.16831154 0.06417516 2.20175408 -0.45106462 1.08933866
#> 74 0.49292917 -1.05335992 1.20289115 0.32427771 1.58418510
#> 75 -0.96311186 1.33341806 0.02475518 0.06971827 0.89044392
#> 76 0.40446558 -1.49048607 -0.25223633 0.13011057 0.89350694
#> 77 -1.08936403 0.22773109 0.55119485 -1.37924140 -1.94357254
#> 78 0.21209221 -0.11782518 1.68845806 1.08803539 -0.99981527
#> 79 -2.05940492 2.40005514 0.49988396 0.34253404 -0.49999882
#> 80 -1.36740058 -0.58814697 0.74167996 -0.48964979 0.17516746
#> 81 -0.61748312 -1.86382962 0.60071951 0.07963845 0.51360711
#> 82 -1.06655510 -0.24854598 -0.74733382 1.20965384 1.17741282
#> 83 1.62163236 0.56396135 1.01620705 1.34837209 -0.76907082
#> 84 -0.20855863 1.11857365 0.63772469 0.22746781 0.67249594
#> 85 -0.89064458 -0.41577298 2.23925810 1.20316317 0.37116325
#> 86 0.69144507 0.46773182 0.91300547 -0.81256672 1.38633720
#> 87 -1.53392869 0.65894887 -2.01210205 0.30692485 0.65491045
#> 88 0.86604994 0.43016920 -1.48274976 1.76598483 -0.75662835
#> 89 -1.53760233 0.02445538 -0.83151188 -0.64480546 0.38066094
#> 90 -0.68311760 0.35256135 0.85775004 1.16686365 1.16804181
#> 91 -0.72888043 1.17206644 -0.62143257 -0.72281913 -1.30017464
#> 92 -0.31292626 -1.12831499 -1.41908566 0.07402619 0.14072026
#> 93 -0.77979387 0.49963516 -1.45908905 0.61725855 -0.10905362
#> 94 -0.63530553 -1.56436180 -0.43443104 -0.22869218 0.65223422
#> 95 0.56929286 -0.26865767 0.51351203 -1.37629874 0.05356634
#> 96 2.32905963 -0.50366026 -0.15918995 -0.04370443 -0.20207038
#> 97 1.09681539 0.84462062 1.09597539 -2.53861474 0.37457094
#> 98 -0.34394379 -0.81294015 -0.90373319 -0.47583934 -0.12243913
#> 99 -1.62983880 0.54337272 -1.06685600 -0.50014865 0.06919877
#> 100 -1.27960688 -0.35982979 -0.15629664 -0.21622745 0.09534741