WPj8|KkCuK(|9f+AIXFI-i*?ym@0}U
zvwv=IVWR#zzR#2LYcVINFRNC1H+K9wX-VamnnUpoX4_-(!1LilF8S*43_7LfpIvi`
zk`8lm%=V9}0GLKlu+fdzxNAMhyoQ^8`Zpe+0-I~8RYU3XvUC;@`ac#iFEg1Y-267-W+|L=%5fjMexQPBeLc|AKY-OJt0
zApg)1a%FD)1w8D)!5;8^Ra(KB?d$sIbCdxy0iOxhg*VLw&SmV#?y)Zd0k%(ch{9k=YPZ(QlntoJ+9}T%}-pJb8dd2
z^HeX3)=8+v$+Vd6ep;DWh2RQ=?*|7}hrn%KTrr?Rt83AZzt#oWJczHnY!rLcT3dvg`cwFPEY4_+4>}prX>iS)zo0aosD!pHE{>Y&iZMR0_}T_
zP!e>LUKK0MsgVU??KbMoNU8C?oqr_z9RZBS5~5nY~5&7WjcsYy6^
zFmV0g-2P4^M%qb5+~M>?)KxL9218lTtZ_1wu^VtfS@cLY_|Oz5z1;0~iJ1)cK|9^0LEaxy
z_&%)H56Q`nlLp%h><#|n;j1WG4!rg-lY8wE8v<+tFxr!uz+t@@ws4qMvz-&HuHd*E
zK(rgv_hsPSA2N@`gB0y=Y25~i_a9sj(xC3*T($r9R>Q9irC-o4q6!sr=)cG)r}_x+
zTO9X#)^j-4FQ&=d5(2s&OCUL?)g{!kt#P&Ap@Bi>T`<;%kE)X6x_A|##)gC!AKj)o
z34xl0emv}skE(pZd^zZVA;ILMQSnt=K--8&k7DVuit`xN&W3UTkKjIrc8>F$%|HSpAf-%1K~Er&4VVo}Av@MkyzQa!=K{E5rpRZ5)Uq*o^i>
zf$+U~Mo(9{rSPITRm`ZUE<+xi2Ffb7*(jlxQzlr2(*1V3V96
zKVqcV`zQU9WiK@XjvP%t?+_t2jg73(!q|<#Kzlz1DuxGrPRZNpHc!2zM?n~gO74|L
z*=?oFM_ek4z}%S48pS{3;Q3G>{8Xp57ulVhzIXL&1jc3d#r@GUX%JyCinEc(t(0O=
z_IYG~`&LDzh&nX&n?3u)+Ys*5eSP*w{$!8AwsCQncWGQL0Poib*p;dIu@3$}n&O(b
z@!R|Et@k%lxuujfVmT)M_}OVXZ~f}5Vfkad-g(xN8gXVlBQd?A=#W#Y{{UBO13+0h
zCcNiz?OHqPzfJG?;Js=
zNe8PEnp3dLSFhM1N8lrTa&?EH)kovGNR`5?nl4Iv!?qHQ$Lt3#zm!n)4!`en=#PxR
zI?}8Pv0%sNES$Bc`~72TCYRe08SkjI`}XcvKXEk4XeQ6duUG~*_Ih%C&R?Y|h;d?0rExl7(rRixo7-|v)Wkn0UQ6gOE>X5?x$P;%>TfAO2$~S?lKn3ZE(GN`gc-HUdTlQC3u40=ByjZMnc
z2Kj)#*Yc^X?fv2l_W}-B9#@vTAKpbo$foVB+Mv+JAwuQe7OWd*OE(
zBcE?^_W_eE9^3;!2W7z)6Z6dce$S2Ntb&QVfr(NHylD_;XtBb2?#031(po?5grUZ&
zRVJR$C%;p@2MvtR__BtD7Utbl+9=7P3$I<|8{#hK+dY
zB2_U(7rV03NN&5$*7Dt2+sjBGeBk>&IPmGtpBK|=0v4E*O%GgnE-Uvx{K*hmbNJ?#
z($Sknx!(@IVMKy2PPOIV7IXP{GChHXvlSvNN}Iz
zeB9dvrAl6cPe`M661ZQkF+p73H}Nr(?d=FMq&%nvd)~_?a5?Y9X4@N_M{ZFQ+~^c1
zPb8E?MISm)b-7`OllUJ`>(pjnjR2YYLBwWKeyg*V)+1`qS8G(W$O=IH8`oe3F_=k1
z%Cv>mE;z(^n&??79Cd2=4jm>|buWOKypg>h^dr_jAQUGf9NzgIBNBeW{FNbroQ+2;
z@Di%%P+q(7>HuxJhVryNjO@)M6=Hm&=euEmZqB*#j{#rsj8e+RR1bj1du390ELj$*
zvmWZ}uP-pCLE8APz0p^vKf7Ni30sT81A;Y9n(^@NRsy^=ln0BjE8?|;d5!L*&9g2Wh|urck*I!M
zYWQukN8Ac}=9kWU&t1j>7h~Q{1r(cHb7i!4qjfk-%13dF2@s{PknV?q{a$6EpfY%x
zWqxVa7n1iGsRCbQ>3F8w1)cFc<52SQjeZ#`HHv1Q3L)K%LEyj;|Eq5mySDHij3qWO
z$)ttY3!dknE*ck8A93uuf{_#ug~kR|XvH1g^>AID479Q*IX;-$#H4jFu)Jz5+A^TK
z_tA4eNO2V0Gevy|-Y>~_UYo|=E_V2qynf7upH%jY!%`;FyHWtk3iv^C
zj2NeZ`{P4}4=)#)A8UY`q()@p4GAu>Te;%Rvac@Wo&h(6$*3`DZw`6;%SuH|j?!-&
zS4S8_%UijfpBrp^T#4TRjRMC8sz;#X{M<-RS%b|d;zCdIY=I^D@itr^IGE7kASvK(
zHjK3e2zB75kvO`!RAna_;_>Q)(hAVu6MCs;#k_v{m~6fkIDdIypvz|%=-Z5OGH!D6
z6bAJ4zoocbCa#$HrkM~bFt^gHStfgw{@DWWrfMd$%NHmRC=^VRW-0&UE&Qaa6+M>j
zm>HP^P^Drr&8@>PJ*jvCOCwAeR=rhT`6aYPVnqBHKDtA$x-+@a7-h0>V|B0Z8KzPw
zNFW#GZ<3lrmEcCXA=wjYtj<
z%g5?S=0M(ZybbY;`L5I`~Vpk~-0y
zB%>hJ)3kTt-U9k`d)CJkeynvB3l`Qm)hUzC(7I!_!O`AsCSTIikBTmyobx)nvf&{e
zxCQPn0EeOwc{z{ieJx{PYuie(c=|=q%~4%2I_x1I2T4?Ll;ZX92|kdF=c4lNbMg46
z6lzhRkI>Ijb6+2WK4~j2r8BG*h$!=>dris>dLk)Q^|I5;?zJ1j4Bp_eAsw(do~^32
zQ$wcqDlC`^AmN7zyC3kJAt&|_s)zOldRkU^t^
z9UFyCYyd3L48LeS)c+CQgoArm^e1|gO@gb0O3J^4ysjavIy=|@68ekNrwxYwwZI=O
zV0C4X<*#VE0#%*4O1=|&=w3w!d*+<}tK;=lhOgw$U)|(CK42xg4R;IoJ<*D%`FL+W
z9eZBU!`8EqPQZ$7p5la|6gXAUNgj{E{&XK}umhHqoleA}C&3fxdrgGRRhH$Bj;WvS
zZd{2)N~^&V+M8x@nrAd8R`7iLy8)lhT@Lv>Gs9NM7G|s9oPoq-nrD6VP@@oNeJ3!t
zlLhlQR6YFqZg1Od(?p;`twPOM`w!p8bIO7H|NA^TwVC1BJKWn78`z?}P?Zn{&w#Gf
zGKOcg&Y^#^9cj4EtQ@|El<%IFLfv?aJh8upHwD`AMtO^3%{A4WC;zg{U?bqe!;-E{lwE=VX?-)4=%hpc3CoWjP;j6#-bBv
znpl@NVn6y<)QPcPNtUra?gBvliu;pAT*$qX7Ja(MnIM1Fn)%q3>2i?GeRzEAiInoZ6c{vU{&p5>YPrx3h0^h+uou@H;$p!d-ul5N0FQCy1c_0D=f4XX
z;0a^1KQVBS`U^0)M9_g@hj_e6?Dje95p+uX;d+QJrsJz1l_dYaoXGq&{)c;t|Hla8d9s!>nZ>o11qBn7Et@CRvhchq-|3aMnIv-n@Cb5U(-dj{SN
znck~mQ4vz9mzCky?`s;j4o}dyjoY+z4qc2PQBj88Km4YoNaZdK-dWj&SL~Di5+Ghc
zF@Emlt3>}=1ro<^h+z~X6=+6r_-dAj>Bi{k4I*y^a^3_+Lz?EJ@8ex-Sjig77oS~j-
z%{vHst6uO=Db2mFpKFw9gY<$(lGC%1*LSq9S+ZcV|ofgbxq3js*u|X`)mE@cij^*8;
ze5!J?$!oCKb_QDFfs>Bgv_&LD@)gzEQNR9GD)fpn%=i`>VjDEv09;R5#>^!B{2bZ3
z9dRUMox-gvSQe*}w``e3#9R>&CuYB?oXr!F^c}^ks;ZC>K^2WZ;
zKmAcW(DwJHHw2(MaZkf4UW5&*Z%@8(QkX=xu7msNu4Y^@4(<7XfhT~8x{vL6-(z}X
zP-4(=P(n85%A~8&(bb9k3)ewaTG!nMfg;18y&(C6k0Fg65eo)ST0*s6L$7eV7%r5%
zma+Hu-MaS4ThO1B4e|bdZHkSWhK~mWiOSMnrO46Cr1+%mSA;rR}
z-=l?QQhC!irBkv}$iYjqvFp-a8IW=`@TEAL(}u$lxW$74WvrHEKJMWsr{+LmmqI?W6|+W-tuAZ&ku!q6Fku1W+3NJ&B&fchgEde{D&oe(zRuHK#!hIdd6oL4qyj;em`d*J?8>UkmW@yTY_tVo&Sz
zX{WpSK$y+9ME5&+Uwrlokwx{uLQS6YS)@W@&N&wH`lcsB7TGD}kPB|mI+YRWn`*V9
zJW%B+4|!f_4owSCK&M~T0%Sw~-&eW*yWF*l?DNcgT;0_>NxU1bsivozcOCKSe*t`s
Bz{&ss
literal 0
HcmV?d00001
diff --git a/articles/img/power-benchmarks-plot.png b/articles/img/power-benchmarks-plot.png
new file mode 100644
index 0000000000000000000000000000000000000000..3e20f211b256fa21bf0a16b8833a60eaceccd299
GIT binary patch
literal 9507
zcmcgScT`hPvzt(*7bzl0lcF>WNQbC2r3DN~2N43IbOAw1#6}T_A}CS?k*0u@AV^bs
zlP)4vh|+tnc{haL_s)6kuXnyAckk}b?3CTv&CJ{ziqzAjr{SUj0MK92QZodA464FL
zsfjnCN821w!xX85QiqxVC;)&43JO30DzN~K256|nfigJ=0QD*WG!du(l~@HdS^*7}
zI0Y0E@qR|i`q7=j%
z4*Fto1K0r^c7TxMqMHLziPX($%*nyybMOQl8sN|hIIIGZA%u$?fN*gGP)WcMa5%yM
zjzDOP)NLdX2CxbPSo8o6`eBK1=tF?8ppt;kalsP^Gcz-r-p&w3XaIyw90~#PIRuCj
zfk*&CBoGJ@B|3r7)E;ruGW7(2p@w+D8eB8&0N?{x)Gng#CCnx61P#`E)x8Sq5x?GA
zbL)yJyM4OuoA*uGx%Q=OL)TFvsCcLN_gO4gk7pF03T^S)WZEb2hWU=3Ed=aQrPXz<
z^1SAQb#N+<>OJ_wudOyL7m?L(=y(7*{V4z_B>tD{;~O9@VkjFl>><;qS)zA)AGf~}
z-Q1sJksbSS@o2b_e%_lj^?at|GGsRA;!4bQ$v~{^FEV8DoyQp_AN>4!xq(e
z{*cL(@LW<*_Kdtd6c<`IMvab+Z!lngO{4ztO2AdznWfg?w#TCW-uqW)nH{;fjt@o>`l9oqD$jObr-|cF9ef8iU6fkBPuNyw(PJcUwt0dN=W4Dv
zMN2(BHq#DsTe;}+-hz5+HHJAmp`7<)*DZVS;Ung+FX&=P9cBS%7-S^iq5g@xC~oxg
z&Xvh!H-Xnb|U~eq2%xvd{$w3MR(T0>{-(f
z)}S{uYVYHcy=8wS50g=E2dc)oJi_Y8CTyhH#kiw`n1kBjg<*((cJvK=a4)~riTPcn
z?QLrCOpV?(c>HANRtdyS>6z#6_3nGWF0s4epULWt+3AVtqenJ72_cL$n0sGaYRoef
z>{|tpt3g%!6a6P&UF-LI`PRaGOvL_!Diz`!G@XBK6DZisn?U
zMH|>$r}Y|+C^qyhDO(z-+4}QV@}id7vQIqi*{KSSCS}Bn*WvU4we*dg&s1Mhh*fni
z$-K&l_HH8kw-x@(DO{o6LQyLUj=()OaS4u@y2JjUp!z}>qW&_|
zv3g-33XjlkgEhMFs|z(dyYp=RK_%CS%-JpTUhywQ)+|>8_e$+O0Vn^-SKQsEQoJmU+ql+dJWgD!Va5C0loZ%?mj{*jD&
zKW`2Zot%m-w9si#jVh?_xm%HXm!b5rcm9?KYxc#4ckDpz_8#XIe6w_xl|gjX(zQbB
zlgXR`3q_;Ca$$k0@#Pyv9<1WLx_cHcRU~Mntd8jZ2*W
zv$__Z*}2QqqvirkGV422jqo^QYz|s*if@bGuoR3gBi9)|D<$+bx&q*Ccp0c&lX8#b
zkSA4WpJN
zv!K0{*AUR`CM?j2D#?%|)=}jF;`&uH6=7lsGhr6bnaZLjLnoJhG1>TbGhu@4M(-kt
zG(9H$drk0tjQ_XkuB!}~mKq+hPw@cL#fZO35Bn+qJq#h1L;W(3;v9>2x+ce!Se9rt
zhCDMXnDLaO5L1rGziOa$#H~(V@EQ)@X;{FU
z=lx-rQvl&qdosnMjS-xofHXHDx9jnTgKI<@mk}Cug!y@wKIAS@buN{Z^NNIv7=CDo
z^gYB6PitU93$R@DJlLUm82Cw~T0>dXKToygdeG0+fi5hu?1A?aA!L-Oj#RcF=%xDG-+vGPSTFR(dnP0qqp%Yo6iZqn};daEFA$1#ACZ;WEEn3pcD4_3)*%PSdYNL(a5o$@eT?!rYb?zk4oi?B>EpmsXrx
z3KU0{&rhqSWRK|!rXgNd!7~&3u46bu9xC?I&QWMT}G_I5?0lCfGBeXyj+Dz
z=!E-pUpveyl|3X%pC@gMId2x{3aXDLkw8tjzBB1#)|C6l&A+-gM)SL(MH&hD|4*x!AY2mu$V|6tHBLsk_D{7Vi-28
zyEY){iHm@T$+R8PVWvXum%Zxx#7m;1b{x4i5ZT!~eAcTDiI)ri}L(9Ctgecf|vh36QJxzyXOBpgx@7?~RO4@~klqlcryjPI%5G~Y$3u(XI
z_m2Rj%kts+`+EP7iS+;e==4P9-n1gHp&?Ed1!C{IDoMD;(DwfR3xKP9`zT4ep#aoh
z#g;>sUaL*ZmESV^bMg*Xpsqn~=GAc-{}n~jrZL<3X`f`6_GF9k;M7QqRf!kcKbQ9Y
zpY{cn$Fk)@8WAgp8bt&&XWtKtcr$UR#hWb@%A1|5xbcvo%wksVwA4AL=tI4-X9_=N
z=|4Bf*`)%p#5I>l{@8Er*ds}RVT7RFSTvNOx6X0wVCu6@09SsNy8aQ5Cd&+Wavh3X
zXbO!~WZL&0YdE(PKEn^zDP1L^AgCrYV4v*Zc+32macg}*gXf>QqEL}27&$ln;*kHZ
z#al6Z?+r2z**~A^p2xd#$;|8<-XOmM9Xx3X`cG%uk9p}p@)LKykjhYj>iOw}gW)OC
z+1+UsNhrh+N&QC}0}bc1B#vPplE@`K|FU`=R!Y(x$vM^ILyL(%0Ab7pS3WF=6MTHW
z7zYUxjTj@A_6;7DhVh1h7=Z9e3oB3oqmrPb&T+|5YQdiK99VI6yr3e$MOeG!xc$pv9TPR}diid~`X@sOOa$2!pI
zB59WRR{)Xf|4Y%iw%^c@!KN7(9RaUf)fEO?8>ekHa^o115TEj*b%1&uSgG
z^NW>&4qr)ULyE0B_cWECuAeCKI0{M$_5CqIvDaX
zt{wLyX?ML?goX@L&$gpXmS6Gdd{w|)XgO8N(B+R-u*~is$s?8PYAR$MzaO|nfu5P^
zZ?4w&1@b_nYLnObqYl@d*Rlq>!-p!@)m31l`8@jipl4yS(b@XG-~w>F*-Hy_x3@e7
z`i2`B!Jy1&-!u$^9va-5z1=SD4W4~~CU_M{^Za>GQ@L&^NSQMFs9jR`s{b2Ck8dt5
z{+*&QQHj}n?dVI%7jEw651g}pNj5r`c71uFSA@!Eq{q}dDm3?mDhKyFj^L8ZSKja2-1hk}H1t+b
zv=_uRsKtYX5hI`!Sm|uqRcM%F7T`V6l%QYo+qvI4P6|4Z)i@X#=TYYoUdUgn9k#E8
zvl!zy%*nvDcyMw9JTK!!HToXMeUJDFab2HM`7HlMVnsb3l;2;6&Uf|Y4KhrPH{EQP
z+V*G8fn-Q*0a~zB709qykY~pCME9P>vAJd+^UrQ$IQwD8MUk)K1Nrjj#x~J{z{bf0
zp#HAhuAv0Moo)dCeP=h)#UX77CHd`lk$uuFKF}JiQk6DPC;DogZp4`i=+MIe!MIf-
z;)4EG<(;^yX&y`}TouCjnfb10{A;XlZXiswbm))I-FQx;nAL^~d;UyKFxg-`Kjb)L
zIqz5^&bda8@G^pid>P8LqHpIc5f@*BRc~&8LLHaM9OCYer4aQ1+uY9*hBI%q?cc+R
zqdMVdeneVOXv`%!Mciol#?BA+qU!bSdVW8UT#5x9e^}Wre(RLMljcAHU#oYb=+au|(oFO?BmFVY$040S+F~Z2ZCIrMdNobn6P9
zK%4*Q&?0m5l`9E?flKi_1@<*)$y+ZH)?pY!2F#kcB<);|VJ8ZfAEtUTT8dFbF?k`e
zF(O+rAww)S?e0GA?I7M4>4VPdwUQpxQF1em~M>
z=ob&*gM19%&z=cM(}J*Se`b+@bMh26sC3?}bs#s}HeA!`Z1V94cytaJ3lv^gEEVYZ
zB)TCIEyS^;niH%^+1kqtWG^C540*F{1B56QMy|WvJF?C)chee^|BTgI|GP`@O@Vs#
z2iJiKn>^i{Gn;TkQAqf9Rmg&iXK#wYKy*_o*Xk6#5xqk8?m{5r=p{+sQJm7BZZ&BS
z@aC3G<#CMTr2B&eu2SwNyILQ02Lv&xsh+>3f6)!=u;kf0XLd=TQu&Sixhx5R_OU&V{
zU7g3xTJ~izMB;smzzkUn7#-UNp;9SfaCd)cdw|g;A=5orQgt_OlDT|%hjvN#UE-ve
z{|8NG7BIWVx4&Lf!5Xvd?$I*%@=C7eb&FX|?X%m1Y7w7gO1Joq1!?Jb1XXVJe=;%7
zQ%f2m7(^PqGtP2&R{Z*Q5&i@3FDx@0S>@LdEzQ4rtaV;=&ckH@>_LfeulmIvs^P$ee3;)f(+T(?Tx3mUM=xF09Q9dWf}#rWw!W?2HrKl)!I8B`=31*
zhfT$3{k_nP$c1s9lh?dPBR
zf3Al14*uKQOe|t>z!+T8F#zd6On1#R`ujAGW;kzny
z5zE(syiJh;2Zsf0HE+6#;9pjSTY$Y>-3{l}i%#`}R13Q%FRScBv3cg>-Dcys*tI`w
zHVY?x+n#EJXCkJFC(uiZWgz9rsxn40w55|Jqiiwnnt`3G#jHV9_7%S)Y3y33N*(>z
z`acy#>JLpRV>VytAcMy4gNx4>O=l;5WE=aYICe7!h8?uB8)2*lh}!+R5O3
zZ=`FQh&?Sn#XMbLma-|?Z!dvuC+-5>IIoRu<6@3pt5-{lEq|b-Zbus9<+NaTgee@W
zzx_i$nD&qR@e6?I8Rsh1V*kG(*jfLi1uDH!kRaP)y}e26hT
zm0)St68>B7y}^&p5~oMe#>5z67VdG6!c9dyY*&=>mDWyq1Nz&UQ-aRNe!q)>{AuPd
z7-#{Q=)zgjZ(bI?$%=9Qmq^$eGrr&(20c|V*D+!L5~B6%OJDT+7$r$&wZfQ&BOQ2E;xF;bG@tpt|n$JY|iO_I{k
zX-bkCIy*@cLMP?_1Ii#7QobkDsVY{-rzfy2%Mj$M$ba6^2vks&yGJlewBO=6>V2@`
z?k)^h6eOR1s_^_uvW`!0aDNsHfTC`eihYEC+2&--evxh^x8)@$LsERc%qK4dD2re1
zMT(>{YAXyG@v>)J1)sN9V{`(9mTv7lu8vOAzEvxk@9(2Ca$AM>!FTX_19Y~CjE#6&N}&V-sU9an7GPog@O@3{OGYmN*ZbXOeBU>~LXvWq
zdY~mIOAr7YyiYVrZx}Q`RWLY}mr5)Gtcr
z)c4_#4hmN6+D%EyNQGg_WG2ZEk_pdeA}xl@&qK~Nv{xGKRoP{Aw+^#Xd4e1yGMip_
zQU-&$D$;_KE^u17nYc>y)``dEHAcmrURfN(5h+zPvtHJr?Fmua)8qUei
zYyUzsQ}LRXBNBjezUCoX0$Wcb`PtoL&$5%k<%lGgPf*N4JX@Omxm5e@q46j`}pO9yt
z*KZzVQXVi*1d0>&al2Dn!Ana7a&s|PVndRji@-tTvk+^o+V)0P7@*QnElX%7wwW4JWvtVldC5*j-HR0XEqZG0k4J`LVeQDRduB4@mpl-RCfh_G#u{d@$(Udt|F%~HMAw#AVs4AU>sWq?7F1Dci{z;~2_
z0bzQB7d%SEz%sL^Vc@MO65x70;TYsmJ`hm(;`X~QqI?vTh#?URA~tz7Qy!kHUy=s-
z0CW^NlL2aVe$bJ6gIK8~>nJci4ppG=_N}f6R5=Ajh1`PyX{y%#tJ&WRb{WEQlAZxR
zP9b7ocG7R}!M1DYD8$>M&fDoQqS#4?lhTT%_6Q!3lfyKo~}A
zpBdOBt;(yZjn#BCvYNKTdP=SLcU}ZYbWmG0Hy$|CMf$-FONJT;`RH+SOqrMzpw<{C
zONq)Yhjfgf!z7h0!!b6}!T@)DrBIvo0P!Zw=AEmMJ<*kxrUCUk#)b#oyD-PD$_Ix&
z`xt#SGN2!ZIAcp!jX9`{(NyP?D%2RwygvuSYZ*Y5RZ9y|lu!;}dA}(CkOeo;`r_#|
z-(DxFdyq6g3#xB8SpDPY(*lZo2S@uh79rP*@95eQ#4Rro
zQnxEW8Lh97y2+}4K3RbxgG@$HFPp#!am9n4TN4Kk7E+BC(Ppf&8z~7{%}dbZGG0&g
zyO3&>)tL>2aPT#R67wm_fdT|G!$4d728pCRRf_He`+>9qC7@__pzdH09tt*z_uvdBvS?~?9Zv*V|(z~5{7ypX!u|W8!|aI9;C@En(+ga
z2iDG=7@dwL)7wfW3YYeP?1~WV-lm$BIDa}0)b3!9fz-@^?^BW{Ft@d)w6|ne(sO|;
zr)Bh$>*m0Ums;85*j3F?MMYyx<39LV1?`ZK-2J3}7cP^1)Wd>ucz$!xW4!j!2g}P;
zn8{sC-%z5Ktk+w7LGnqk^pPc_ySC$7w9S8i_(Xgl+`I87K1hT+rjJBGzMUC;`>aiD3l;iYCI1DR};G-Gdd42ZunzhrLK}3@z-Iu
zeS3YPu*oinhj2csN;Of(rS6dhudeXflQR{`x<|!qze%%rHl2H!aMsF(zfvNj-opvE
zXBS(mttYX~uoUYGK5XdG0kr#=r24w#c<9ornY3Fc_oHG<^!f_3%p~JpTfxvyF!xiX
zDsS=}Wc6N{zUY5pYA99ut$%P|Wpo%b-6#uE|5P5SwwSoF{b&7?xWEyU7rQT6U!<>@;
zy)1#}1%1iN5@ZO1<(x^3vd5)L>X+hP0jp`8Ttys@8o%O3LBY6?kVd
zJ^Tq;fO0D3g@HT@aQb92l*ooEDJlQkwMGzQTGZuWO&cP<>~uw4Pc8S7P4IsJnPpv>
literal 0
HcmV?d00001
diff --git a/pkgdown.yml b/pkgdown.yml
index 8f220a2a..bb4c0600 100644
--- a/pkgdown.yml
+++ b/pkgdown.yml
@@ -5,7 +5,7 @@ articles:
generate-closure: generate-closure.html
graph-examples: graph-examples.html
shortuct-testing: shortuct-testing.html
-last_built: 2023-09-08T19:53Z
+last_built: 2023-09-11T13:54Z
urls:
reference: https://urban-sniffle-p11zlpj.pages.github.io/reference
article: https://urban-sniffle-p11zlpj.pages.github.io/articles
diff --git a/search.json b/search.json
index 1b197ee2..e8ef527f 100644
--- a/search.json
+++ b/search.json
@@ -1 +1 @@
-[{"path":"https://urban-sniffle-p11zlpj.pages.github.io/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"GNU General Public License","title":"GNU General Public License","text":"Version 3, 29 June 2007Copyright © 2007 Free Software Foundation, Inc. Everyone permitted copy distribute verbatim copies license document, changing allowed.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/LICENSE.html","id":"preamble","dir":"","previous_headings":"","what":"Preamble","title":"GNU General Public License","text":"GNU General Public License free, copyleft license software kinds works. licenses software practical works designed take away freedom share change works. contrast, GNU General Public License intended guarantee freedom share change versions program–make sure remains free software users. , Free Software Foundation, use GNU General Public License software; applies also work released way authors. can apply programs, . speak free software, referring freedom, price. General Public Licenses designed make sure freedom distribute copies free software (charge wish), receive source code can get want , can change software use pieces new free programs, know can things. protect rights, need prevent others denying rights asking surrender rights. Therefore, certain responsibilities distribute copies software, modify : responsibilities respect freedom others. example, distribute copies program, whether gratis fee, must pass recipients freedoms received. must make sure , , receive can get source code. must show terms know rights. Developers use GNU GPL protect rights two steps: (1) assert copyright software, (2) offer License giving legal permission copy, distribute /modify . developers’ authors’ protection, GPL clearly explains warranty free software. users’ authors’ sake, GPL requires modified versions marked changed, problems attributed erroneously authors previous versions. devices designed deny users access install run modified versions software inside , although manufacturer can . fundamentally incompatible aim protecting users’ freedom change software. systematic pattern abuse occurs area products individuals use, precisely unacceptable. Therefore, designed version GPL prohibit practice products. problems arise substantially domains, stand ready extend provision domains future versions GPL, needed protect freedom users. Finally, every program threatened constantly software patents. States allow patents restrict development use software general-purpose computers, , wish avoid special danger patents applied free program make effectively proprietary. prevent , GPL assures patents used render program non-free. precise terms conditions copying, distribution modification follow.","code":""},{"path":[]},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/LICENSE.html","id":"id_0-definitions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"0. Definitions","title":"GNU General Public License","text":"“License” refers version 3 GNU General Public License. “Copyright” also means copyright-like laws apply kinds works, semiconductor masks. “Program” refers copyrightable work licensed License. licensee addressed “”. “Licensees” “recipients” may individuals organizations. “modify” work means copy adapt part work fashion requiring copyright permission, making exact copy. resulting work called “modified version” earlier work work “based ” earlier work. “covered work” means either unmodified Program work based Program. “propagate” work means anything , without permission, make directly secondarily liable infringement applicable copyright law, except executing computer modifying private copy. Propagation includes copying, distribution (without modification), making available public, countries activities well. “convey” work means kind propagation enables parties make receive copies. Mere interaction user computer network, transfer copy, conveying. interactive user interface displays “Appropriate Legal Notices” extent includes convenient prominently visible feature (1) displays appropriate copyright notice, (2) tells user warranty work (except extent warranties provided), licensees may convey work License, view copy License. interface presents list user commands options, menu, prominent item list meets criterion.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/LICENSE.html","id":"id_1-source-code","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"1. Source Code","title":"GNU General Public License","text":"“source code” work means preferred form work making modifications . “Object code” means non-source form work. “Standard Interface” means interface either official standard defined recognized standards body, , case interfaces specified particular programming language, one widely used among developers working language. “System Libraries” executable work include anything, work whole, () included normal form packaging Major Component, part Major Component, (b) serves enable use work Major Component, implement Standard Interface implementation available public source code form. “Major Component”, context, means major essential component (kernel, window system, ) specific operating system () executable work runs, compiler used produce work, object code interpreter used run . “Corresponding Source” work object code form means source code needed generate, install, (executable work) run object code modify work, including scripts control activities. However, include work’s System Libraries, general-purpose tools generally available free programs used unmodified performing activities part work. example, Corresponding Source includes interface definition files associated source files work, source code shared libraries dynamically linked subprograms work specifically designed require, intimate data communication control flow subprograms parts work. Corresponding Source need include anything users can regenerate automatically parts Corresponding Source. Corresponding Source work source code form work.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/LICENSE.html","id":"id_2-basic-permissions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"2. Basic Permissions","title":"GNU General Public License","text":"rights granted License granted term copyright Program, irrevocable provided stated conditions met. License explicitly affirms unlimited permission run unmodified Program. output running covered work covered License output, given content, constitutes covered work. License acknowledges rights fair use equivalent, provided copyright law. may make, run propagate covered works convey, without conditions long license otherwise remains force. may convey covered works others sole purpose make modifications exclusively , provide facilities running works, provided comply terms License conveying material control copyright. thus making running covered works must exclusively behalf, direction control, terms prohibit making copies copyrighted material outside relationship . Conveying circumstances permitted solely conditions stated . Sublicensing allowed; section 10 makes unnecessary.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/LICENSE.html","id":"id_3-protecting-users-legal-rights-from-anti-circumvention-law","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"3. Protecting Users’ Legal Rights From Anti-Circumvention Law","title":"GNU General Public License","text":"covered work shall deemed part effective technological measure applicable law fulfilling obligations article 11 WIPO copyright treaty adopted 20 December 1996, similar laws prohibiting restricting circumvention measures. convey covered work, waive legal power forbid circumvention technological measures extent circumvention effected exercising rights License respect covered work, disclaim intention limit operation modification work means enforcing, work’s users, third parties’ legal rights forbid circumvention technological measures.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/LICENSE.html","id":"id_4-conveying-verbatim-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"4. Conveying Verbatim Copies","title":"GNU General Public License","text":"may convey verbatim copies Program’s source code receive , medium, provided conspicuously appropriately publish copy appropriate copyright notice; keep intact notices stating License non-permissive terms added accord section 7 apply code; keep intact notices absence warranty; give recipients copy License along Program. may charge price price copy convey, may offer support warranty protection fee.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/LICENSE.html","id":"id_5-conveying-modified-source-versions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"5. Conveying Modified Source Versions","title":"GNU General Public License","text":"may convey work based Program, modifications produce Program, form source code terms section 4, provided also meet conditions: ) work must carry prominent notices stating modified , giving relevant date. b) work must carry prominent notices stating released License conditions added section 7. requirement modifies requirement section 4 “keep intact notices”. c) must license entire work, whole, License anyone comes possession copy. License therefore apply, along applicable section 7 additional terms, whole work, parts, regardless packaged. License gives permission license work way, invalidate permission separately received . d) work interactive user interfaces, must display Appropriate Legal Notices; however, Program interactive interfaces display Appropriate Legal Notices, work need make . compilation covered work separate independent works, nature extensions covered work, combined form larger program, volume storage distribution medium, called “aggregate” compilation resulting copyright used limit access legal rights compilation’s users beyond individual works permit. Inclusion covered work aggregate cause License apply parts aggregate.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/LICENSE.html","id":"id_6-conveying-non-source-forms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"6. Conveying Non-Source Forms","title":"GNU General Public License","text":"may convey covered work object code form terms sections 4 5, provided also convey machine-readable Corresponding Source terms License, one ways: ) Convey object code , embodied , physical product (including physical distribution medium), accompanied Corresponding Source fixed durable physical medium customarily used software interchange. b) Convey object code , embodied , physical product (including physical distribution medium), accompanied written offer, valid least three years valid long offer spare parts customer support product model, give anyone possesses object code either (1) copy Corresponding Source software product covered License, durable physical medium customarily used software interchange, price reasonable cost physically performing conveying source, (2) access copy Corresponding Source network server charge. c) Convey individual copies object code copy written offer provide Corresponding Source. alternative allowed occasionally noncommercially, received object code offer, accord subsection 6b. d) Convey object code offering access designated place (gratis charge), offer equivalent access Corresponding Source way place charge. need require recipients copy Corresponding Source along object code. place copy object code network server, Corresponding Source may different server (operated third party) supports equivalent copying facilities, provided maintain clear directions next object code saying find Corresponding Source. Regardless server hosts Corresponding Source, remain obligated ensure available long needed satisfy requirements. e) Convey object code using peer--peer transmission, provided inform peers object code Corresponding Source work offered general public charge subsection 6d. separable portion object code, whose source code excluded Corresponding Source System Library, need included conveying object code work. “User Product” either (1) “consumer product”, means tangible personal property normally used personal, family, household purposes, (2) anything designed sold incorporation dwelling. determining whether product consumer product, doubtful cases shall resolved favor coverage. particular product received particular user, “normally used” refers typical common use class product, regardless status particular user way particular user actually uses, expects expected use, product. product consumer product regardless whether product substantial commercial, industrial non-consumer uses, unless uses represent significant mode use product. “Installation Information” User Product means methods, procedures, authorization keys, information required install execute modified versions covered work User Product modified version Corresponding Source. information must suffice ensure continued functioning modified object code case prevented interfered solely modification made. convey object code work section , , specifically use , User Product, conveying occurs part transaction right possession use User Product transferred recipient perpetuity fixed term (regardless transaction characterized), Corresponding Source conveyed section must accompanied Installation Information. requirement apply neither third party retains ability install modified object code User Product (example, work installed ROM). requirement provide Installation Information include requirement continue provide support service, warranty, updates work modified installed recipient, User Product modified installed. Access network may denied modification materially adversely affects operation network violates rules protocols communication across network. Corresponding Source conveyed, Installation Information provided, accord section must format publicly documented (implementation available public source code form), must require special password key unpacking, reading copying.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/LICENSE.html","id":"id_7-additional-terms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"7. Additional Terms","title":"GNU General Public License","text":"“Additional permissions” terms supplement terms License making exceptions one conditions. Additional permissions applicable entire Program shall treated though included License, extent valid applicable law. additional permissions apply part Program, part may used separately permissions, entire Program remains governed License without regard additional permissions. convey copy covered work, may option remove additional permissions copy, part . (Additional permissions may written require removal certain cases modify work.) may place additional permissions material, added covered work, can give appropriate copyright permission. Notwithstanding provision License, material add covered work, may (authorized copyright holders material) supplement terms License terms: ) Disclaiming warranty limiting liability differently terms sections 15 16 License; b) Requiring preservation specified reasonable legal notices author attributions material Appropriate Legal Notices displayed works containing ; c) Prohibiting misrepresentation origin material, requiring modified versions material marked reasonable ways different original version; d) Limiting use publicity purposes names licensors authors material; e) Declining grant rights trademark law use trade names, trademarks, service marks; f) Requiring indemnification licensors authors material anyone conveys material (modified versions ) contractual assumptions liability recipient, liability contractual assumptions directly impose licensors authors. non-permissive additional terms considered “restrictions” within meaning section 10. Program received , part , contains notice stating governed License along term restriction, may remove term. license document contains restriction permits relicensing conveying License, may add covered work material governed terms license document, provided restriction survive relicensing conveying. add terms covered work accord section, must place, relevant source files, statement additional terms apply files, notice indicating find applicable terms. Additional terms, permissive non-permissive, may stated form separately written license, stated exceptions; requirements apply either way.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/LICENSE.html","id":"id_8-termination","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"8. Termination","title":"GNU General Public License","text":"may propagate modify covered work except expressly provided License. attempt otherwise propagate modify void, automatically terminate rights License (including patent licenses granted third paragraph section 11). However, cease violation License, license particular copyright holder reinstated () provisionally, unless copyright holder explicitly finally terminates license, (b) permanently, copyright holder fails notify violation reasonable means prior 60 days cessation. Moreover, license particular copyright holder reinstated permanently copyright holder notifies violation reasonable means, first time received notice violation License (work) copyright holder, cure violation prior 30 days receipt notice. Termination rights section terminate licenses parties received copies rights License. rights terminated permanently reinstated, qualify receive new licenses material section 10.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/LICENSE.html","id":"id_9-acceptance-not-required-for-having-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"9. Acceptance Not Required for Having Copies","title":"GNU General Public License","text":"required accept License order receive run copy Program. Ancillary propagation covered work occurring solely consequence using peer--peer transmission receive copy likewise require acceptance. However, nothing License grants permission propagate modify covered work. actions infringe copyright accept License. Therefore, modifying propagating covered work, indicate acceptance License .","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/LICENSE.html","id":"id_10-automatic-licensing-of-downstream-recipients","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"10. Automatic Licensing of Downstream Recipients","title":"GNU General Public License","text":"time convey covered work, recipient automatically receives license original licensors, run, modify propagate work, subject License. responsible enforcing compliance third parties License. “entity transaction” transaction transferring control organization, substantially assets one, subdividing organization, merging organizations. propagation covered work results entity transaction, party transaction receives copy work also receives whatever licenses work party’s predecessor interest give previous paragraph, plus right possession Corresponding Source work predecessor interest, predecessor can get reasonable efforts. may impose restrictions exercise rights granted affirmed License. example, may impose license fee, royalty, charge exercise rights granted License, may initiate litigation (including cross-claim counterclaim lawsuit) alleging patent claim infringed making, using, selling, offering sale, importing Program portion .","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/LICENSE.html","id":"id_11-patents","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"11. Patents","title":"GNU General Public License","text":"“contributor” copyright holder authorizes use License Program work Program based. work thus licensed called contributor’s “contributor version”. contributor’s “essential patent claims” patent claims owned controlled contributor, whether already acquired hereafter acquired, infringed manner, permitted License, making, using, selling contributor version, include claims infringed consequence modification contributor version. purposes definition, “control” includes right grant patent sublicenses manner consistent requirements License. contributor grants non-exclusive, worldwide, royalty-free patent license contributor’s essential patent claims, make, use, sell, offer sale, import otherwise run, modify propagate contents contributor version. following three paragraphs, “patent license” express agreement commitment, however denominated, enforce patent (express permission practice patent covenant sue patent infringement). “grant” patent license party means make agreement commitment enforce patent party. convey covered work, knowingly relying patent license, Corresponding Source work available anyone copy, free charge terms License, publicly available network server readily accessible means, must either (1) cause Corresponding Source available, (2) arrange deprive benefit patent license particular work, (3) arrange, manner consistent requirements License, extend patent license downstream recipients. “Knowingly relying” means actual knowledge , patent license, conveying covered work country, recipient’s use covered work country, infringe one identifiable patents country reason believe valid. , pursuant connection single transaction arrangement, convey, propagate procuring conveyance , covered work, grant patent license parties receiving covered work authorizing use, propagate, modify convey specific copy covered work, patent license grant automatically extended recipients covered work works based . patent license “discriminatory” include within scope coverage, prohibits exercise , conditioned non-exercise one rights specifically granted License. may convey covered work party arrangement third party business distributing software, make payment third party based extent activity conveying work, third party grants, parties receive covered work , discriminatory patent license () connection copies covered work conveyed (copies made copies), (b) primarily connection specific products compilations contain covered work, unless entered arrangement, patent license granted, prior 28 March 2007. Nothing License shall construed excluding limiting implied license defenses infringement may otherwise available applicable patent law.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/LICENSE.html","id":"id_12-no-surrender-of-others-freedom","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"12. No Surrender of Others’ Freedom","title":"GNU General Public License","text":"conditions imposed (whether court order, agreement otherwise) contradict conditions License, excuse conditions License. convey covered work satisfy simultaneously obligations License pertinent obligations, consequence may convey . example, agree terms obligate collect royalty conveying convey Program, way satisfy terms License refrain entirely conveying Program.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/LICENSE.html","id":"id_13-use-with-the-gnu-affero-general-public-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"13. Use with the GNU Affero General Public License","title":"GNU General Public License","text":"Notwithstanding provision License, permission link combine covered work work licensed version 3 GNU Affero General Public License single combined work, convey resulting work. terms License continue apply part covered work, special requirements GNU Affero General Public License, section 13, concerning interaction network apply combination .","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/LICENSE.html","id":"id_14-revised-versions-of-this-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"14. Revised Versions of this License","title":"GNU General Public License","text":"Free Software Foundation may publish revised /new versions GNU General Public License time time. new versions similar spirit present version, may differ detail address new problems concerns. version given distinguishing version number. Program specifies certain numbered version GNU General Public License “later version” applies , option following terms conditions either numbered version later version published Free Software Foundation. Program specify version number GNU General Public License, may choose version ever published Free Software Foundation. Program specifies proxy can decide future versions GNU General Public License can used, proxy’s public statement acceptance version permanently authorizes choose version Program. Later license versions may give additional different permissions. However, additional obligations imposed author copyright holder result choosing follow later version.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/LICENSE.html","id":"id_15-disclaimer-of-warranty","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"15. Disclaimer of Warranty","title":"GNU General Public License","text":"WARRANTY PROGRAM, EXTENT PERMITTED APPLICABLE LAW. EXCEPT OTHERWISE STATED WRITING COPYRIGHT HOLDERS /PARTIES PROVIDE PROGRAM “” WITHOUT WARRANTY KIND, EITHER EXPRESSED IMPLIED, INCLUDING, LIMITED , IMPLIED WARRANTIES MERCHANTABILITY FITNESS PARTICULAR PURPOSE. ENTIRE RISK QUALITY PERFORMANCE PROGRAM . PROGRAM PROVE DEFECTIVE, ASSUME COST NECESSARY SERVICING, REPAIR CORRECTION.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/LICENSE.html","id":"id_16-limitation-of-liability","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"16. Limitation of Liability","title":"GNU General Public License","text":"EVENT UNLESS REQUIRED APPLICABLE LAW AGREED WRITING COPYRIGHT HOLDER, PARTY MODIFIES /CONVEYS PROGRAM PERMITTED , LIABLE DAMAGES, INCLUDING GENERAL, SPECIAL, INCIDENTAL CONSEQUENTIAL DAMAGES ARISING USE INABILITY USE PROGRAM (INCLUDING LIMITED LOSS DATA DATA RENDERED INACCURATE LOSSES SUSTAINED THIRD PARTIES FAILURE PROGRAM OPERATE PROGRAMS), EVEN HOLDER PARTY ADVISED POSSIBILITY DAMAGES.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/LICENSE.html","id":"id_17-interpretation-of-sections-15-and-16","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"17. Interpretation of Sections 15 and 16","title":"GNU General Public License","text":"disclaimer warranty limitation liability provided given local legal effect according terms, reviewing courts shall apply local law closely approximates absolute waiver civil liability connection Program, unless warranty assumption liability accompanies copy Program return fee. END TERMS CONDITIONS","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/LICENSE.html","id":"how-to-apply-these-terms-to-your-new-programs","dir":"","previous_headings":"","what":"How to Apply These Terms to Your New Programs","title":"GNU General Public License","text":"develop new program, want greatest possible use public, best way achieve make free software everyone can redistribute change terms. , attach following notices program. safest attach start source file effectively state exclusion warranty; file least “copyright” line pointer full notice found. Also add information contact electronic paper mail. program terminal interaction, make output short notice like starts interactive mode: hypothetical commands show w show c show appropriate parts General Public License. course, program’s commands might different; GUI interface, use “box”. also get employer (work programmer) school, , sign “copyright disclaimer” program, necessary. information , apply follow GNU GPL, see . GNU General Public License permit incorporating program proprietary programs. program subroutine library, may consider useful permit linking proprietary applications library. want , use GNU Lesser General Public License instead License. first, please read .","code":" Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free software, and you are welcome to redistribute it under certain conditions; type 'show c' for details."},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/generate-closure.html","id":"what-is-the-closure","dir":"Articles","previous_headings":"","what":"What is the closure?","title":"Generating the closure of a graph","text":"closure graph set sub-graphs, along weights calculated according algorithm 1 Bretz et al (2011). primarily used closed testing, sub-graphs tested significance, results aggregated determine null hypotheses significant globally. Throughout article common example used demonstrations - simple successive graph. two primary hypotheses, \\(H_1\\) \\(H_2\\), initial weight evenly split . secondary hypotheses, \\(H_3\\) \\(H_4\\), weight propagated \\(H_1\\) \\(H_2\\) deleted, respectively.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/generate-closure.html","id":"components-of-the-closure","dir":"Articles","previous_headings":"What is the closure?","what":"Components of the closure","title":"Generating the closure of a graph","text":"graphicalMCP, closure represented matrix, row represents sub-graph (also called intersection hypothesis), column corresponds individual hypothesis. matrix can created graph_generate_weights(), two parts: indicator matrix showing hypotheses contained sub-graph (-called powerset set), weights matrix containing induced weights sub-graph.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/generate-closure.html","id":"properties-of-the-closure","dir":"Articles","previous_headings":"What is the closure?","what":"Properties of the closure","title":"Generating the closure of a graph","text":"rows closure generated particular way order give useful properties.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/generate-closure.html","id":"repeating-recursive-blocks","dir":"Articles","previous_headings":"What is the closure? > Properties of the closure","what":"Repeating recursive blocks","title":"Generating the closure of a graph","text":"First, notice row can obtained row higher matrix flipping single 1 0. example, go row 1 row 3 flipping \\(H_3\\), go row 10 row 14 flipping \\(H_2\\). upper row pairing like can thought “parent” sub-graph, lower row “child” sub-graph. Flipping 0 1 moving matrix called “finding sub-graph’s parent.” Now consider parent-finding strategy left-0 row flipped. reveals pattern bottom half top half, row’s parent bottom half corresponding row top half, eight rows . pattern repeats within box recursively, top half box matching bottom half, first missing hypothesis flipped 0 1.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/generate-closure.html","id":"binary-counting","dir":"Articles","previous_headings":"What is the closure? > Properties of the closure","what":"Binary counting","title":"Generating the closure of a graph","text":"second useful property somewhat re-framing first, perhaps viewed reason first true. Starting bottom row, powerset particular order counts 1 binary, incrementing 1 per row. means row number can directly calculated vector showing hypotheses currently deleted graph: row_number == number_of_rows - incl_excl_vec_converted_to_base_10 + 1. example, intersection number 6 hypothesis vector 1010. interpreted binary, 1 * 8 + 0 * 4 + 1 * 2 + 0 * 1 = 10 base 10, 6 == 15 - 10 + 1.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/generate-closure.html","id":"strategies","dir":"Articles","previous_headings":"","what":"Strategies","title":"Generating the closure of a graph","text":"size closure grows quickly graph size increases (n-graph 2^n - 1 sub-graphs), calculating full closure large graphs can computationally intensive. Optimizing process led three main strategies: simplest approach, uses full graph starting point every sub-graph, deletes appropriate hypotheses recursive method, traverses closure tree, deleting one hypothesis time step graphs formulaic shortcut using order graphs generated recursive method Note discussion methods focuses primarily weights side rather powerset side closure. fastest methods discovered generate powerset implicitly missing values weights side. methods simple approach, rely powerset order generate weights, powerset can created efficiently. num_hyps refers number hypotheses initial graph.","code":"powerset <- as.matrix(rev(expand.grid(rep(list(1:0), num_hyps))[-2^num_hyps, ]))"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/generate-closure.html","id":"simple-approach","dir":"Articles","previous_headings":"Strategies","what":"Simple approach","title":"Generating the closure of a graph","text":"simplest approach generate weights closure apply graph_update() initial graph sub-graph. short sweet write, ’s inefficient hypothesis gets deleted graph multiple times. code simple method.","code":"ggw_simple <- function(graph) { num_hyps <- length(graph$hypotheses) matrix_intersections <- as.matrix(rev(expand.grid(rep(list(1:0), num_hyps))[-2^num_hyps, ])) colnames(matrix_intersections) <- names(graph$hypotheses) matrix_weights <- apply( matrix_intersections, 1, function(h) graph_update(graph, !h)$updated_graph$hypotheses, simplify = FALSE ) cbind(matrix_intersections, do.call(rbind, matrix_weights)) }"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/generate-closure.html","id":"recursive","dir":"Articles","previous_headings":"Strategies","what":"Recursive","title":"Generating the closure of a graph","text":"recursive method treats space sub-graphs tree, initial graph root, sub-graphs decreasing size going branches. essence recursive step delete hypothesis current graph. every hypothesis every sub-graph tree result taking multiple paths many graphs. key part recursive step memory - graph tree delete hypotheses come hypothesis just deleted reach current graph. base case also needs memory - reached graph one hypothesis left, last-deleted hypothesis number larger current hypotheses. memory recursion enables tree traversal reach unique graph state exactly . implementation recursion, followed wrapper processing sub-graph list standard matrix form.","code":"delete_nodes_recursive <- function(graph, last = 0) { init_hypotheses <- hypotheses <- graph$hypotheses init_transitions <- transitions <- graph$transitions ### base case int_hyp <- as.integer(names(hypotheses)) is_single_node <- length(hypotheses) == 1 last_is_bigger <- last > max(int_hyp) if (is_single_node || last_is_bigger) { return(list(graph)) } ### recursive step children <- list() for (orig_hyp_num in int_hyp[int_hyp > last]) { del_index <- match(orig_hyp_num, int_hyp) hyp_nums <- seq_along(hypotheses)[seq_along(hypotheses) != del_index] for (hyp_num in hyp_nums) { hypotheses[[hyp_num]] <- init_hypotheses[[hyp_num]] + init_hypotheses[[del_index]] * init_transitions[[del_index, hyp_num]] denominator <- 1 - init_transitions[[hyp_num, del_index]] * init_transitions[[del_index, hyp_num]] for (end_num in hyp_nums) { if (hyp_num == end_num || denominator <= 0) { transitions[[hyp_num, end_num]] <- 0 } else { transitions[[hyp_num, end_num]] <- ( init_transitions[[hyp_num, end_num]] + init_transitions[[hyp_num, del_index]] * init_transitions[[del_index, end_num]] ) / denominator } } } smaller_graph <- structure( list( hypotheses = hypotheses[-del_index], transitions = as.matrix(transitions[-del_index, -del_index]) ), class = \"initial_graph\" ) children[[del_index]] <- delete_nodes_recursive( smaller_graph, orig_hyp_num ) } c( unlist(children, recursive = FALSE), list(graph) ) } ggw_recursive <- function(graph) { # The recursion requires the hypotheses to be named sequentially as actual # numbers for the memory property to work hyp_names <- names(graph$hypotheses) names(graph$hypotheses) <- seq_along(graph$hypotheses) colnames(graph$transitions) <- names(graph$hypotheses) rownames(graph$transitions) <- names(graph$hypotheses) # Recursively generate a list of all sub-graphs list_subgraphs <- delete_nodes_recursive(graph) # Process the list of graphs into the normal matrix form matrix_weights <- structure( do.call( rbind, lapply( list_subgraphs, function(graph) graph$hypotheses[as.character(seq_along(hyp_names))] ) ), dimnames = list(1:(2^length(hyp_names) - 1), hyp_names) ) matrix_intersections <- !is.na(matrix_weights) matrix_weights[is.na(matrix_weights)] <- 0 cbind(matrix_intersections, matrix_weights) }"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/generate-closure.html","id":"formula-shortcut","dir":"Articles","previous_headings":"Strategies","what":"Formula shortcut","title":"Generating the closure of a graph","text":"Finally, fastest method found far - formula shortcut. recursion can save lot time first method, still bit overhead get list sub-graphs matrix form standard. “repeating block” property closure mentioned earlier useful. Instead using recursion connect parent sub-graphs children, pair formulas can used. One formula generates parent graph obtained flipping left-0 1: .call(c, lapply(2^(seq_len(num_hyps) - 1), seq_len)). Note rows 2 (non-existent) row 16, empty graph. Row 1 parent graph. left-0 child graph easy find, parent graph’s perspective, formula calculates hypothesis delete: rep(rev(seq_len(num_hyps)), 2^(seq_len(num_hyps) - 1)). also applies rows 2 16. formula shortcut also results simpler code recursive solution.","code":""},{"path":[]},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/generate-closure.html","id":"generating-the-closure","dir":"Articles","previous_headings":"Performance gains","what":"Generating the closure","title":"Generating the closure of a graph","text":"formula method reduces step generating closure single deletion prior graph, almost additional overhead. ’s different methods fare, including version gMCP package reference. Also worthy note lrstat package, contains MCP-related functions, including generating weights closure. uses excellent C++ code perform even faster, since speed current formula-based method acceptable, adding Rcpp dependency considered worth additional time savings.","code":"vec_num_hyps <- 2:8 * 2 if (file.exists(here::here(\"vignettes/cache/gw_benchmark_list.rds\"))) { benchmark_list <- readRDS(here::here(\"vignettes/cache/gw_benchmark_list.rds\")) } else { benchmark_list <- lapply( vec_num_hyps, function(num_hyps) { cat(num_hyps, \"\\n\") # A graph for the Holm procedure transitions <- matrix(1 / (num_hyps - 1), num_hyps, num_hyps) diag(transitions) <- 0 graph <- graph_create(rep(1 / num_hyps, num_hyps), transitions) # lrstat sometimes errors, even when hypotheses seem to sum to 1. This # fixes some of those cases graph$hypotheses <- c( graph$hypotheses[seq_len(num_hyps - 1)], 1 - sum(graph$hypotheses[seq_len(num_hyps - 1)]) ) benchmark <- mark( gMCP = generateWeights(graph$transitions, graph$hypotheses), `graphicalMCP simple` = ggw_simple(graph), `graphicalMCP recursive` = ggw_recursive(graph), `graphicalMCP shortcut` = graph_generate_weights(graph), # lrstat still errors with graphs occasionally for unknown reasons lrstat = if (!num_hyps %in% c(10, 14)) { fwgtmat(graph$hypotheses, graph$transitions) }, check = FALSE, memory = FALSE, time_unit = \"ms\", min_iterations = 5 )[, c(-6, -10:-13)] # Remove rows for lrstat that weren't actually run benchmark <- benchmark[benchmark$median > .002, ] benchmark$char_expression <- as.character(benchmark$expression) cbind(data.frame(num_hyps = num_hyps), benchmark) } ) saveRDS(benchmark_list, here::here(\"vignettes/cache/gw_benchmark_list.rds\")) } benchmarks <- do.call(rbind, benchmark_list) benchmarks$char_expression <- ordered( benchmarks$char_expression, c( \"gMCP\", \"graphicalMCP simple\", \"graphicalMCP recursive\", \"graphicalMCP shortcut\", \"lrstat\" ) ) benchmarks_plot_standard <- ggplot(benchmarks, aes(num_hyps, median, color = char_expression)) + geom_point() + geom_line() + theme_minimal() + scale_y_continuous(labels = scales::label_comma(suffix = \"ms\")) + scale_color_discrete() + labs( title = \"Generating the weights of the closure\", subtitle = \"Median runtime\", x = \"Number of hypotheses\", y = NULL, color = \"Package\" ) benchmarks_plot_standard + scale_y_log10(labels = scales::label_comma(suffix = \"ms\")) + labs(subtitle = \"Log-10 median runtime\") #> Scale for y is already present. #> Adding another scale for y, which will replace the existing scale."},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/generate-closure.html","id":"power-simulations","dir":"Articles","previous_headings":"Performance gains","what":"Power simulations","title":"Generating the closure of a graph","text":"time savings closure nice, graphs savings make big difference compared longer run-times e.g. power simulations. However, paying attention closure important reasons , improving power algorithm.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/generate-closure.html","id":"standard-algorithm","dir":"Articles","previous_headings":"Performance gains > Power simulations","what":"Standard algorithm","title":"Generating the closure of a graph","text":"typical method running Bonferroni shortcut procedure graph : Search graph single hypothesis can rejected Delete rejected hypothesis update weights Repeat significant hypotheses Running process either R low-level language like C fast single procedure, ’s run 100,000 times power simulation, R version becomes onerous. However, ’s lot duplication power simulation using method. many simulations, steps taken, means re-calculating set weights many times.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/generate-closure.html","id":"closure-shortcut","dir":"Articles","previous_headings":"Performance gains > Power simulations","what":"Closure shortcut","title":"Generating the closure of a graph","text":"binary counting property closure admits shortcut can implemented R get scalable competitor typical algorithm: Generate closure single time get sub-graph weights efficiently simulation: 1. Search graph hypotheses can rejected - fast vectorization 1. Using binary counting property, index row closure corresponding hypotheses rejected far get updated weights - substantially faster updating graph re-calculating weights, especially larger graphs 1. Repeat using updated weights method fast gMCP’s C implementation, still runs substantial power simulations matter seconds. biggest drawback can scale differently different graph structures. instance fixed sequence procedure can take longer balanced graph, like Holm procedure, takes steps reject possible hypotheses.","code":"vec_num_hyps <- 2:8 * 2 if (file.exists(here::here(\"vignettes/cache/power_benchmark_list.rds\"))) { benchmark_list <- readRDS(here::here(\"vignettes/cache/power_benchmark_list.rds\")) } else { benchmark_list <- lapply( vec_num_hyps, function(num_hyps) { # A graph for the Holm procedure transitions <- matrix(1 / (num_hyps - 1), num_hyps, num_hyps) diag(transitions) <- 0 graph <- graph_create(rep(1 / num_hyps, num_hyps), transitions) corr <- diag(num_hyps) benchmark <- mark( `gMCP (C)` = calcPower(graph$hypotheses, .025, graph$transitions, n.sim = 2^16, corr.sim = corr ), `graphicalMCP Holm (R)` = graph_calculate_power(graph, .025, power_marginal = rep(.9, num_hyps), sim_n = 2^16 ), `graphicalMCP fixed sequence (R)` = graph_calculate_power(fixed_sequence(num_hyps), .025, power_marginal = rep(.9, num_hyps), sim_n = 2^16 ), check = FALSE, memory = FALSE, time_unit = \"s\", min_iterations = 5 )[, c(-6, -10:-13)] # Remove rows for gMCP closure that weren't actually run benchmark <- benchmark[benchmark$median > .00001, ] benchmark$char_expression <- as.character(benchmark$expression) cbind(data.frame(num_hyps = num_hyps), benchmark) } ) } saveRDS(benchmark_list, here::here(\"vignettes/cache/power_benchmark_list.rds\")) benchmarks <- do.call(rbind, benchmark_list) benchmarks$char_expression <- ordered( benchmarks$char_expression, c( \"graphicalMCP fixed sequence (R)\", \"graphicalMCP Holm (R)\", \"gMCP (C)\" ) ) benchmarks_plot_standard <- ggplot(benchmarks, aes(num_hyps, median, color = char_expression)) + geom_point() + geom_line() + theme_minimal() + scale_y_continuous(labels = scales::label_comma(suffix = \"s\")) + scale_color_discrete() + labs( title = \"Power simulations with shortcut testing\", subtitle = \"Median runtime for 65,536 simulations\", x = \"Number of hypotheses\", y = NULL, color = \"Package\" ) benchmarks_plot_standard + scale_y_log10(labels = scales::label_comma(suffix = \"s\")) + labs(subtitle = \"Log-10 median runtime\") #> Scale for y is already present. #> Adding another scale for y, which will replace the existing scale."},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/graph-examples.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Commonly-used graph examples","text":"valid graph can made graph_create(), patterns established time. demonstrate run patterns graphicalMCP.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/graph-examples.html","id":"bonferroni-holm","dir":"Articles","previous_headings":"","what":"Bonferroni-Holm","title":"Commonly-used graph examples","text":"","code":"transitions <- matrix(1 / 4, 5, 5) diag(transitions) <- 0 bonferroni_holm_graph <- graph_create(rep(1 / 5, 5), transitions) plot(bonferroni_holm_graph)"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/graph-examples.html","id":"fixed-sequence","dir":"Articles","previous_headings":"","what":"Fixed sequence","title":"Commonly-used graph examples","text":"","code":"fixed_sequence_graph <- graph_create( c(1, 0, 0, 0), rbind( c(0, 1, 0, 0), c(0, 0, 1, 0), c(0, 0, 0, 1), c(0, 0, 0, 0) ) ) plot(fixed_sequence_graph, layout = \"grid\", nrow = 1)"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/graph-examples.html","id":"simple-successive","dir":"Articles","previous_headings":"","what":"Simple successive","title":"Commonly-used graph examples","text":"General successive graphs good example multiple variations may useful slight differences starting edge weights. Variable edge weights currently supported, can done particular graph light wrapper. multiple variations can created compared easily.","code":"simple_successive_graph <- graph_create( c(.5, .5, 0, 0), rbind( c(0, 0, 1, 0), c(0, 0, 0, 1), c(0, 1, 0, 0), c(1, 0, 0, 0) ) ) plot(simple_successive_graph, layout = \"grid\", nrow = 2) simple_successive_var <- function(gamma) { graph_create( c(.5, .5, 0, 0), rbind( c(0, gamma, 1 - gamma, 0), c(gamma, 0, 0, 1 - gamma), c(0, 1, 0, 0), c(1, 0, 0, 0) ) ) } plot( simple_successive_var(.75), layout = \"grid\", nrow = 2, vertex.label.cex = .7, edge.label.cex = .7 ) plot( simple_successive_var(.9), layout = \"grid\", nrow = 2, vertex.label.cex = .7, edge.label.cex = .7 )"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/graph-examples.html","id":"huque-alosh-bhore-2011","dir":"Articles","previous_headings":"","what":"Huque-Alosh-Bhore (2011)","title":"Commonly-used graph examples","text":"","code":"hab_2011_graph <- graph_create( c(1, 0, 0, 0), rbind( c(0, .5, .5, 0), c(0, 0, 0, 1), c(0, .5, 0, .5), c(0, 1, 0, 0) ) ) plot(hab_2011_graph, layout = \"grid\")"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/graph-examples.html","id":"wiens-dmitrienko-2005","dir":"Articles","previous_headings":"","what":"Wiens-Dmitrienko (2005)","title":"Commonly-used graph examples","text":"","code":"wd_2005_graph <- graph_create( c(1 / 3, 1 / 3, 1 / 3), rbind( c(0, 1, 0), c(0, 0, 1), c(.5, .5, 0) ) ) plot( wd_2005_graph, layout = \"grid\", nrow = 1, edge_curves = c(pairs = -6, \"H3|H1\" = -6) )"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/graph-examples.html","id":"parallel-gate-keeping","dir":"Articles","previous_headings":"","what":"Parallel gate-keeping","title":"Commonly-used graph examples","text":"","code":"par_gate_graph <- graph_create( c(.5, .5, 0, 0), rbind( c(0, 0, .5, .5), c(0, 0, .5, .5), c(0, 0, 0, 1), c(0, 0, 1, 0) ) ) plot(par_gate_graph, layout = \"grid\", nrow = 2)"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/graph-examples.html","id":"improved-parallel-gate-keeping","dir":"Articles","previous_headings":"","what":"Improved parallel gate-keeping","title":"Commonly-used graph examples","text":"","code":"imp_par_gate_graph <- graph_create( c(.5, .5, 0, 0), rbind( c(0, 0, .5, .5), c(0, 0, .5, .5), c(.0001, 0, 0, .9999), c(0, .0001, .9999, 0) ) ) plot(imp_par_gate_graph, layout = \"grid\", nrow = 2)"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/shortuct-testing.html","id":"multiple-comparison-problem","dir":"Articles","previous_headings":"","what":"Multiple comparison problem","title":"Sequentially rejective graphical approaches based on Bonferroni tests","text":"Consider confirmatory clinical trial comparing test treatment (treatment) control treatment (control) disease. two doses treatment: low dose high dose. two endpoints included multiplicity adjustment strategy, primary endpoint (PE) secondary endpoint (SE). total, four null hypotheses: \\(H_1\\) \\(H_3\\) primary secondary hypotheses respectively low dose versus control; \\(H_2\\) \\(H_4\\) primary secondary hypotheses respectively high dose versus control. discussing appropriate multiple comparison procedures, clinical considerations, adds structure multiple comparison procedures, can flexibly incorporated using graphical approaches. First, low high doses considered equally important, means rejecting primary hypothesis either dose versus control leads successful trial. Regarding secondary hypotheses, one tested corresponding primary hypothesis rejected. means \\(H_3\\) tested \\(H_1\\) rejected; \\(H_4\\) tested \\(H_2\\) rejected. addition, statistical considerations complete graph. primary hypotheses \\(H_1\\) \\(H_2\\) equal hypothesis weight 0.5. secondary hypotheses hypothesis weight 0. primary hypothesis rejected, weight propagate along two outgoing edges: one primary hypothesis one descendant secondary hypothesis. two edges equal transition weight 0.5. primary secondary hypotheses rejected dose-control comparison, hypothesis weights propagated primary hypothesis dose-control comparison. specifications, can create following graph.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/shortuct-testing.html","id":"create-a-graph","dir":"Articles","previous_headings":"","what":"Create a graph","title":"Sequentially rejective graphical approaches based on Bonferroni tests","text":"","code":"hypotheses <- c(0.5, 0.5, 0, 0) transitions <- rbind( c(0, 0.5, 0.5, 0), c(0.5, 0, 0, 0.5), c(0, 1, 0, 0), c(1, 0, 0, 0) ) hyp_names <- c(\"H1\", \"H2\", \"H3\", \"H4\") g <- graph_create(hypotheses, transitions, hyp_names) plot(g, layout = \"grid\", vertex.size = 20)"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/shortuct-testing.html","id":"perform-the-graphical-multiple-comparison-procedure","dir":"Articles","previous_headings":"","what":"Perform the graphical multiple comparison procedure","title":"Sequentially rejective graphical approaches based on Bonferroni tests","text":"Given set p-values \\(H_1, \\ldots, H_4\\), graphical multiple comparison procedure can performed control familywise error rate (FWER) significance level alpha. graph_test_shortcut function agnostic one-sided two-sided tests. one-sided p-values, alpha often set 0.025 (default); two-sided p-values, alpha often set 0.05. consider one-sided tests . hypothesis rejected adjusted p-value less equal alpha. running procedure, hypotheses \\(H_1\\), \\(H_2\\), \\(H_4\\) rejected adjusted p-value calculated.","code":"p_values <- c(.013, .012, .105, .005) test_results <- graph_test_shortcut(g, p = p_values, alpha = 0.025) test_results$outputs # Adjusted p-values and rejections #> $adjusted_p #> H1 H2 H3 H4 #> 0.024 0.024 0.105 0.024 #> #> $rejected #> H1 H2 H3 H4 #> TRUE TRUE FALSE TRUE #> #> $graph #> Initial graph #> #> --- Hypothesis weights --- #> H1: 0 #> H2: 0 #> H3: 1 #> H4: 0 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 0 0 0 0 #> H2 0 0 0 0 #> H3 0 0 0 0 #> H4 0 0 0 0"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/shortuct-testing.html","id":"obtain-final-and-intermediate-graphs-after-rejections","dir":"Articles","previous_headings":"Perform the graphical multiple comparison procedure","what":"Obtain final and intermediate graphs after rejections","title":"Sequentially rejective graphical approaches based on Bonferroni tests","text":"addition, two graphs provided: one initial graph one final graph removing rejected hypotheses \\(H_1\\), \\(H_2\\), \\(H_4\\). also interested intermediate graphs - example, graph \\(H_1\\) \\(H_2\\) rejected - can specify verbose = TRUE. Note intermediate graphs depends order rejections, .e., sequence hypotheses rejected. default order defined increasing adjusted p-values earlier hypothesis numbering case ties adjusted p-values. Among rejected hypotheses, one smallest adjusted p-value first rejected one largest adjusted p-value last rejected. example, default order rejection \\(H_2\\rightarrow H_1\\rightarrow H_4\\). obtain intermediate graphs based order rejection, one can specify test_results_verbose$details$results. example, graph \\(H_1\\) \\(H_2\\) rejected given test_results_verbose$details$results[[3]]. order rejections may unique orders valid. example, rejected hypotheses \\(H_1\\), \\(H_2\\) \\(H_4\\). default order rejections \\(H_2 \\rightarrow H_1 \\rightarrow H_4\\). Another valid order rejections \\(H_2 \\rightarrow H_4 \\rightarrow H_1\\). However, first rejected hypothesis can \\(H_1\\) \\(H_4\\). obtain possible rejection orders, one can use function graph_rejection_orderings. Initial, intermediate final graphs can obtained using function graph_update particular order rejections. order intermediate graphs determined deleting hypothesis lowest adjusted p-values step (smaller hypothesis sequentially case adjusted p-value ties). cases, order valid order deletion. example, minimum adjusted p-value method results deleting order \\(H_2 \\rightarrow H_1 \\rightarrow H_4\\). \\(H_2 \\rightarrow H_4 \\rightarrow H_1\\) also valid deletion order. Deletion order can customized using [custom_order_function_once_it_is_written()].","code":"test_results_verbose <- graph_test_shortcut(g, p = p_values, alpha = 0.025, verbose = TRUE) test_results_verbose$details$results[[3]] # Intermediate graph after H1 and H2 rejected #> Initial graph #> #> --- Hypothesis weights --- #> H1: 0.0 #> H2: 0.0 #> H3: 0.5 #> H4: 0.5 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 0 0 0 0 #> H2 0 0 0 0 #> H3 0 0 0 1 #> H4 0 0 1 0 orders <- graph_rejection_orderings(test_results)$valid_orderings # Obtain all valid orders of rejections orders #> [[1]] #> H2 H4 H1 #> 2 4 1 #> #> [[2]] #> H2 H1 H4 #> 2 1 4 graph_update(g, delete = orders[[2]]) # Graphs following the order of H2, H4, and H1 #> Initial graph #> #> --- Hypothesis weights --- #> H1: 0.5 #> H2: 0.5 #> H3: 0.0 #> H4: 0.0 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 0.0 0.5 0.5 0.0 #> H2 0.5 0.0 0.0 0.5 #> H3 0.0 1.0 0.0 0.0 #> H4 1.0 0.0 0.0 0.0 #> #> Updated graph after deleting hypotheses 2, 1, 4 #> #> --- Hypothesis weights --- #> H1: NA #> H2: NA #> H3: 1 #> H4: NA #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 NA NA NA NA #> H2 NA NA NA NA #> H3 NA NA 0 NA #> H4 NA NA NA NA #> #> Deletion sequence ($intermediate_graphs) --------------------------------------- #> #> Initial graph #> #> --- Hypothesis weights --- #> H1: 0.5 #> H2: 0.5 #> H3: 0.0 #> H4: 0.0 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 0.0 0.5 0.5 0.0 #> H2 0.5 0.0 0.0 0.5 #> H3 0.0 1.0 0.0 0.0 #> H4 1.0 0.0 0.0 0.0 #> #> Step 1: Updated graph after removing hypothesis 2 #> #> --- Hypothesis weights --- #> H1: 0.75 #> H2: NA #> H3: 0.00 #> H4: 0.25 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 0.000000 NA 0.666667 0.333333 #> H2 NA NA NA NA #> H3 0.500000 NA 0.000000 0.500000 #> H4 1.000000 NA 0.000000 0.000000 #> #> Step 2: Updated graph after removing hypotheses 2, 1 #> #> --- Hypothesis weights --- #> H1: NA #> H2: NA #> H3: 0.5 #> H4: 0.5 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 NA NA NA NA #> H2 NA NA NA NA #> H3 NA NA 0 1 #> H4 NA NA 1 0 #> #> Step 3: Updated graph after removing hypotheses 2, 1, 4 #> #> --- Hypothesis weights --- #> H1: NA #> H2: NA #> H3: 1 #> H4: NA #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 NA NA NA NA #> H2 NA NA NA NA #> H3 NA NA 0 NA #> H4 NA NA NA NA #> #> Final updated graph after removing deleted hypotheses #> #> --- Hypothesis weights --- #> H1: NA #> H2: NA #> H3: 1 #> H4: NA #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 NA NA NA NA #> H2 NA NA NA NA #> H3 NA NA 0 NA #> H4 NA NA NA NA"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/shortuct-testing.html","id":"obtain-adjusted-significance-levels","dir":"Articles","previous_headings":"Perform the graphical multiple comparison procedure","what":"Obtain adjusted significance levels","title":"Sequentially rejective graphical approaches based on Bonferroni tests","text":"equivalent way obtain rejections adjusting significance levels. hypothesis rejected p-value less equal adjusted significance level. adjusted significance levels calculated order adjusted p-values: \\(H_2 \\rightarrow H_1 \\rightarrow H_4\\), four steps checking rejections. First, \\(H_2\\) rejected adjusted significance level 0.5 * alpha. Second, \\(H_1\\) rejected adjusted significance level 0.75 * alpha, \\(H_2\\) rejected. Third, \\(H_4\\) rejected adjusted significance level 0.5 * alpha, \\(H_1\\) \\(H_2\\) rejected. Fourth finally, \\(H_3\\) rejected adjusted significance level alpha, \\(H_1\\), \\(H_2\\) \\(H_4\\) rejected. results can obtained specifying test_values = TRUE.","code":"test_results_test_values <- graph_test_shortcut(g, p = p_values, alpha = 0.025, test_values = TRUE) test_results_test_values$test_values$results #> Step Hypothesis p <= Weight * Alpha Inequality_holds #> H2 1 H2 0.012 <= 0.50 * 0.025 TRUE #> H1 2 H1 0.013 <= 0.75 * 0.025 TRUE #> H4 3 H4 0.005 <= 0.50 * 0.025 TRUE #> H3 4 H3 0.105 <= 1.00 * 0.025 FALSE"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/shortuct-testing.html","id":"power-calculation","dir":"Articles","previous_headings":"","what":"Power calculation","title":"Sequentially rejective graphical approaches based on Bonferroni tests","text":"Given graph, trial team often interested power trial. single null hypothesis, power probability reject null hypothesis significance level alpha alternative hypothesis true. multiple null hypotheses, multiple versions power. example, power reject least one hypothesis power reject hypotheses, given alternative hypotheses true. graphical multiple comparison procedures, also important understand power reject hypothesis, given multiplicity adjustment. Sometimes, team may want customize definitions power define success. Thus power calculation important aspect trial design.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/shortuct-testing.html","id":"input-marginal-power-for-primary-hypotheses","dir":"Articles","previous_headings":"Power calculation","what":"Input: Marginal power for primary hypotheses","title":"Sequentially rejective graphical approaches based on Bonferroni tests","text":"Assume primary endpoint occurrence unfavorable clinical event. evaluate treatment effect, proportion patients event calculated, lower proportion preferred. Assume proportions 0.181 low high doses, 0.3 control. Using equal randomization among three treatment groups, clinical trial team chooses total sample size 600 200 per group. leads marginal power 80% \\(H_1\\) \\(H_2\\), respectively, using two-sample test difference proportions unpooled variance one-sided significance level 0.025. calculation, use marginal power combine information treatment effect, nuisance parameter, sample sizes hypothesis. Note significance level used marginal power calculation must alpha, used power calculation significance level FWER control. addition, marginal power one--one relationship noncentrality parameter, illustrated .","code":"alpha <- 0.025 prop <- c(0.3, 0.181, 0.181) sample_size <- rep(200, 3) unpooled_variance <- prop[-1] * (1 - prop[-1]) / sample_size[-1] + prop[1] * (1 - prop[1]) / sample_size[1] noncentrality_parameter_primary <- -(prop[-1] - prop[1]) / sqrt(unpooled_variance) power_marginal_primary <- pnorm(qnorm(alpha, lower.tail = FALSE), noncentrality_parameter_primary, 1, lower.tail = FALSE ) names(power_marginal_primary) <- c(\"H1\", \"H2\") power_marginal_primary #> H1 H2 #> 0.8028315 0.8028315"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/shortuct-testing.html","id":"input-marginal-power-for-secondary-hypotheses","dir":"Articles","previous_headings":"Power calculation","what":"Input: Marginal power for secondary hypotheses","title":"Sequentially rejective graphical approaches based on Bonferroni tests","text":"Assume secondary endpoint change total medication score baseline, continuous outcome. evaluate treatment effect, mean change calculated, greater reduction preferred. Assume mean change baseline reduction 7.5 8.25, respectively low high doses, 5 control. assume known common standard deviation 10. Given sample size 200 per treatment group, marginal power 71% 90% \\(H_3\\) \\(H_4\\), respectively, using two-sample \\(z\\)-test difference means one-sided significance level 0.025.","code":"mean_change <- c(5, 7.5, 8.25) sd <- rep(10, 3) variance <- sd[-1]^2 / sample_size[-1] + sd[1]^2 / sample_size[1] noncentrality_parameter_secondary <- (mean_change[-1] - mean_change[1]) / sqrt(variance) power_marginal_secondary <- pnorm(qnorm(alpha, lower.tail = FALSE), noncentrality_parameter_secondary, 1, lower.tail = FALSE ) names(power_marginal_secondary) <- c(\"H3\", \"H4\") power_marginal_secondary #> H3 H4 #> 0.7054139 0.9014809"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/shortuct-testing.html","id":"input-correlation-structure-to-simulate-test-statistics","dir":"Articles","previous_headings":"Power calculation","what":"Input: Correlation structure to simulate test statistics","title":"Sequentially rejective graphical approaches based on Bonferroni tests","text":"addition marginal power, also need make assumptions joint distribution test statistics. example, assume follow multivariate normal distribution means defined noncentrality parameters correlation matrix \\(R\\). obtain correlations, helpful understand two types correlations example. correlation two dose-control comparisons endpoint correlation endpoints. former correlation can calculated function sample size. example, correlation test statistics \\(H_1\\) \\(H_2\\) \\(\\rho_{12}=\\left(\\frac{n_1}{n_1+n_0}\\right)^{1/2}\\left(\\frac{n_2}{n_3+n_0}\\right)^{1/2}\\). equal randomization, correlation 0.5. correlation test statistics \\(H_3\\) \\(H_4\\) . hand, correlation endpoints dose-control comparison often estimated based prior knowledge previous trials. Without information, assume \\(\\rho_{13}=\\rho_{24}=0.5\\). practice, one set correlation parameter try multiple values assess sensitivity assumption. Regarding correlation test statistics \\(H_1\\) \\(H_4\\) \\(H_2\\) \\(H_3\\), even difficult estimate. use simple product rule, means correlation product correlations two previously assumed correlations. example, \\(\\rho_{14}=\\rho_{12}*\\rho_{24}\\) \\(\\rho_{23}=\\rho_{12}*\\rho_{13}\\). practice, one may make assumptions instead using product rule.","code":"corr <- matrix(0, nrow = 4, ncol = 4) corr[1, 2] <- corr[3, 4] <- sqrt(sample_size[2] / sum(sample_size[1:2]) * sample_size[3] / sum(sample_size[c(1, 3)])) rho <- 0.5 corr[1, 3] <- corr[2, 4] <- rho corr[1, 4] <- corr[2, 3] <- corr[1, 2] * rho corr <- corr + t(corr) diag(corr) <- 1 colnames(corr) <- hyp_names rownames(corr) <- hyp_names corr #> H1 H2 H3 H4 #> H1 1.00 0.50 0.50 0.25 #> H2 0.50 1.00 0.25 0.50 #> H3 0.50 0.25 1.00 0.50 #> H4 0.25 0.50 0.50 1.00"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/shortuct-testing.html","id":"user-defined-success-criteria","dir":"Articles","previous_headings":"Power calculation","what":"User-defined success criteria","title":"Sequentially rejective graphical approaches based on Bonferroni tests","text":"mentioned earlier, multiple versions “power” multiple hypotheses. Commonly used “power” definitions include: Local power: probability hypothesis rejected (multiplicity adjustment) Expected . rejections: expected number rejections Power reject 1 : probability reject least one hypothesis Power reject : probability reject hypotheses default outputs graph_calculate_power function. addition, user can customize success criteria define versions “power”.","code":"# Probability to reject H1 H1 <- function(x) x[1] # Expected number of rejections `Expected no. of rejections` <- function(x) x[1] + x[2] + x[3] + x[4] # Probability to reject at least one hypothesis `AtLeast1` <- function(x) x[1] | x[2] | x[3] | x[4] # Probability to reject all hypotheses `All` <- function(x) x[1] & x[2] & x[3] & x[4] # Probability to reject both H1 and H2 `H1andH2` <- function(x) x[1] & x[2] # Probability to reject both hypotheses for the low dose or the high dose `(H1andH3)or(H2andH4)` <- function(x) (x[1] & x[3]) | (x[2] & x[4]) succ <- list( H1, `Expected no. of rejections`, `AtLeast1`, `All`, `H1andH2`, `(H1andH3)or(H2andH4)` ) succ <- setNames( succ, c( \"H1\", \"Expected no. of rejections\", \"AtLeast1\", \"All\", \"H1andH2\", \"(H1andH3)or(H2andH4)\" ) )"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/shortuct-testing.html","id":"output-calculate-power","dir":"Articles","previous_headings":"Power calculation","what":"Output: Calculate power","title":"Sequentially rejective graphical approaches based on Bonferroni tests","text":"Given inputs, can calculate power via simulation graphical multiple comparison procedure one-sided significance level alpha=0.025 using sim_n = 1e5 simulations seed sim_seed = 1234. local power 0.758, 0.765, 0.689, 0.570, respectively \\(H_1, \\ldots, H_4\\). Note local power lower marginal power former adjusted multiplicity. power reject least one hypothesis 0.856 power reject hypotheses 0.512. expected number rejections 2.782. last two user-defined success criteria, probability reject \\(H_1\\) \\(H_2\\) 0.667, probability reject least one pair \\((H_1\\) \\(H_3)\\) \\((H_2\\) \\(H_4)\\) 0.747. see detailed outputs simulated p-values rejection decisions hypotheses, specify verbose = TRUE. produce lot outputs. allow flexible printing functions, user can change following: indented space default setting indent = 2 precision numeric values (.e., number significant digits) default setting precision = 4","code":"output <- graph_calculate_power(g, alpha = .025, sim_corr = corr, sim_n = 1e5, power_marginal = c(power_marginal_primary, power_marginal_secondary), sim_success = succ, sim_seed = 1234 ) output #> #> Test parameters ($inputs) ------------------------------------------------------ #> Initial graph #> #> --- Hypothesis weights --- #> H1: 0.5 #> H2: 0.5 #> H3: 0.0 #> H4: 0.0 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 0.0 0.5 0.5 0.0 #> H2 0.5 0.0 0.0 0.5 #> H3 0.0 1.0 0.0 0.0 #> H4 1.0 0.0 0.0 0.0 #> #> Alpha = 0.025 #> #> Test types #> bonferroni: (H1, H2, H3, H4) #> #> Simulation parameters ($inputs) ------------------------------------------------ #> Testing 100,000 simulations - random seed 1234 & multivariate normal params: #> #> H1 H2 H3 H4 #> Marginal power: 0.8028 0.8028 0.7054 0.9015 #> #> Correlation: H1 H2 H3 H4 #> H1 1.00 0.50 0.50 0.25 #> H2 0.50 1.00 0.25 0.50 #> H3 0.50 0.25 1.00 0.50 #> H4 0.25 0.50 0.50 1.00 #> #> Power calculation ($power) ----------------------------------------------------- #> H1 H2 H3 H4 #> Local power: 0.7640 0.7589 0.5677 0.6913 #> #> Expected no. of rejections: 2.782 #> Power to reject 1 or more: 0.8556 #> Power to reject all: 0.5121 #> #> Power to reject: H1 Expected no. of rejections AtLeast1 #> 0.7640 2.7818 0.8556 #> All H1andH2 (H1andH3)or(H2andH4) #> 0.5121 0.6673 0.7470 verbose_output <- graph_calculate_power(g, alpha = .025, sim_corr = corr, sim_n = 1e5, power_marginal = c(power_marginal_primary, power_marginal_secondary), sim_success = succ, sim_seed = 1234, verbose = TRUE ) print(verbose_output) #> #> Test parameters ($inputs) ------------------------------------------------------ #> Initial graph #> #> --- Hypothesis weights --- #> H1: 0.5 #> H2: 0.5 #> H3: 0.0 #> H4: 0.0 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 0.0 0.5 0.5 0.0 #> H2 0.5 0.0 0.0 0.5 #> H3 0.0 1.0 0.0 0.0 #> H4 1.0 0.0 0.0 0.0 #> #> Alpha = 0.025 #> #> Test types #> bonferroni: (H1, H2, H3, H4) #> #> Simulation parameters ($inputs) ------------------------------------------------ #> Testing 100,000 simulations - random seed 1234 & multivariate normal params: #> #> H1 H2 H3 H4 #> Marginal power: 0.8028 0.8028 0.7054 0.9015 #> #> Correlation: H1 H2 H3 H4 #> H1 1.00 0.50 0.50 0.25 #> H2 0.50 1.00 0.25 0.50 #> H3 0.50 0.25 1.00 0.50 #> H4 0.25 0.50 0.50 1.00 #> #> Power calculation ($power) ----------------------------------------------------- #> H1 H2 H3 H4 #> Local power: 0.7640 0.7589 0.5677 0.6913 #> #> Expected no. of rejections: 2.782 #> Power to reject 1 or more: 0.8556 #> Power to reject all: 0.5121 #> #> Power to reject: H1 Expected no. of rejections AtLeast1 #> 0.7640 2.7818 0.8556 #> All H1andH2 (H1andH3)or(H2andH4) #> 0.5121 0.6673 0.7470 #> #> Simulation details ($details) -------------------------------------------------- #> p_sim_H1 p_sim_H2 p_sim_H3 p_sim_H4 rej_H1 rej_H2 rej_H3 rej_H4 #> 3.082e-02 1.207e-02 4.119e-03 9.324e-02 FALSE TRUE FALSE FALSE #> 7.934e-04 6.499e-04 2.452e-02 2.966e-03 TRUE TRUE TRUE TRUE #> 3.030e-02 5.954e-02 5.431e-02 2.626e-02 FALSE FALSE FALSE FALSE #> 9.743e-03 3.319e-03 7.417e-04 4.025e-04 TRUE TRUE TRUE TRUE #> 1.971e-02 8.616e-03 1.642e-02 2.418e-07 TRUE TRUE TRUE TRUE #> 3.121e-03 6.702e-03 1.374e-02 2.752e-04 TRUE TRUE TRUE TRUE #> 3.022e-02 1.424e-01 6.038e-03 2.117e-02 FALSE FALSE FALSE FALSE #> 2.498e-03 2.940e-02 4.143e-04 2.208e-03 TRUE FALSE TRUE FALSE #> 6.190e-02 3.873e-02 3.166e-01 5.700e-02 FALSE FALSE FALSE FALSE #> 3.678e-01 1.896e-01 7.023e-02 1.190e-02 FALSE FALSE FALSE FALSE #> ... (Use `print(x, rows = )` for more) print(verbose_output, indent = 4, precision = 6) #> #> Test parameters ($inputs) ------------------------------------------------------ #> Initial graph #> #> --- Hypothesis weights --- #> H1: 0.5 #> H2: 0.5 #> H3: 0.0 #> H4: 0.0 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 0.0 0.5 0.5 0.0 #> H2 0.5 0.0 0.0 0.5 #> H3 0.0 1.0 0.0 0.0 #> H4 1.0 0.0 0.0 0.0 #> #> Alpha = 0.025 #> #> Test types #> bonferroni: (H1, H2, H3, H4) #> #> Simulation parameters ($inputs) ------------------------------------------------ #> Testing 100,000 simulations - random seed 1234 & multivariate normal params: #> #> H1 H2 H3 H4 #> Marginal power: 0.802831 0.802831 0.705414 0.901481 #> #> Correlation: H1 H2 H3 H4 #> H1 1.00 0.50 0.50 0.25 #> H2 0.50 1.00 0.25 0.50 #> H3 0.50 0.25 1.00 0.50 #> H4 0.25 0.50 0.50 1.00 #> #> Power calculation ($power) ----------------------------------------------------- #> H1 H2 H3 H4 #> Local power: 0.76396 0.75887 0.56767 0.69133 #> #> Expected no. of rejections: 2.78183 #> Power to reject 1 or more: 0.85557 #> Power to reject all: 0.51205 #> #> Power to reject: H1 Expected no. of rejections #> 0.76396 2.78183 #> AtLeast1 All H1andH2 (H1andH3)or(H2andH4) #> 0.85557 0.51205 0.66726 0.74695 #> #> Simulation details ($details) -------------------------------------------------- #> p_sim_H1 p_sim_H2 p_sim_H3 p_sim_H4 rej_H1 rej_H2 rej_H3 rej_H4 #> 3.08204e-02 1.20654e-02 4.11858e-03 9.32434e-02 FALSE TRUE FALSE FALSE #> 7.93372e-04 6.49905e-04 2.45178e-02 2.96560e-03 TRUE TRUE TRUE TRUE #> 3.02992e-02 5.95396e-02 5.43083e-02 2.62583e-02 FALSE FALSE FALSE FALSE #> 9.74332e-03 3.31857e-03 7.41721e-04 4.02469e-04 TRUE TRUE TRUE TRUE #> 1.97135e-02 8.61618e-03 1.64183e-02 2.41833e-07 TRUE TRUE TRUE TRUE #> 3.12066e-03 6.70231e-03 1.37441e-02 2.75170e-04 TRUE TRUE TRUE TRUE #> 3.02208e-02 1.42376e-01 6.03828e-03 2.11740e-02 FALSE FALSE FALSE FALSE #> 2.49757e-03 2.94026e-02 4.14273e-04 2.20779e-03 TRUE FALSE TRUE FALSE #> 6.18994e-02 3.87257e-02 3.16613e-01 5.69979e-02 FALSE FALSE FALSE FALSE #> 3.67792e-01 1.89598e-01 7.02265e-02 1.18965e-02 FALSE FALSE FALSE FALSE #> ... (Use `print(x, rows = )` for more)"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Dong Xi. Author, maintainer. Ethan Brockmann. Author. Gilead Biostatistics. Copyright holder, funder. Atorus Research LLC. Copyright holder.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Xi, D.; Brockmann, E. (2023). graphicalMCP: Graph-based multiple comparison procedures. version 0.1.0. Gilead Sciences, Inc. Foster City, California. https://github.com/Gilead-BioStats/graphicalMCP Frank Bretz, Martin Posch, Ekkehard Glimm, Florian Klinglmueller, Willi Maurer, Kornelius Rohmeyer (2011), Graphical approaches multiple comparison procedures using weighted Bonferroni, Simes parametric tests. Biometrical Journal 53 (6), pages 894--913, Wiley.","code":"@Manual{, title = {{graphicalMCP}: Graph-based multiple comparison procedures.}, author = {Dong Xi and Ethan Brockmann}, organization = {Gilead Sciences, Inc}, note = {version 0.1.0}, year = {2023}, url = {https://github.com/Gilead-BioStats/graphicalMCP}, } @Article{, title = {Graphical approaches for multiple comparison procedures using weighted Bonferroni, Simes or parametric tests}, author = {Frank Bretz and Martin Posch and Ekkehard Glimm and Florian Klinglmueller and Willi Maurer and Kornelius Rohmeyer}, journal = {Biometrical Journal}, year = {2011}, publisher = {Wiley}, volume = {53}, number = {6}, pages = {894--913}, url = {http://onlinelibrary.wiley.com/doi/10.1002/bimj.201000239/full}, }"},{"path":[]},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/index.html","id":"introduction","dir":"","previous_headings":"","what":"Introduction","title":"Graphical Approach for Multiple Comparison Procedures","text":"multiple comparison procedure (MCP) statistical analysis method allows assessing efficacy multiple endpoints, dependent , single clinical trial. Endpoints can different doses, treatment different conditions, combined superiority & non-inferiority testing, many others. key feature MCPs strongly control type-error rate level alpha. Bretz et al (2011), graphical method MCPs described, separates weighting clinical endpoints particular statistical test used assess endpoint. graphical approach can also helpful communicating study design clinical teams. package low-dependency implementation methods.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Graphical Approach for Multiple Comparison Procedures","text":"graphicalMCP CRAN, install GitHub ","code":"# install.packages(\"pak\") pak::pak(\"Gilead-BioStats/graphicalMCP@dev\")"},{"path":[]},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/index.html","id":"initial-graph","dir":"","previous_headings":"Basic usage","what":"Initial graph","title":"Graphical Approach for Multiple Comparison Procedures","text":"base object graphicalMCP initial_graph, weighted, directed graph represented matrix transition (edge) weights, vector hypothesis (vertex) weights.","code":"library(graphicalMCP) # A graphical multiple comparison procedure with two primary hypotheses (H1 # and H2) and two secondary hypotheses (H3 and H4) # See Figure 1 in Bretz, F., Posch, M., Glimm, E., Klinglmueller, F., Maurer, # W., & Rohmeyer, K. (2011). Graphical approaches for multiple comparison # procedures using weighted Bonferroni, Simes, or parametric tests. Biometrical # Journal, 53(6), 894-913. hypotheses <- c(0.5, 0.5, 0, 0) transitions <- rbind( c(0, 0, 1, 0), c(0, 0, 0, 1), c(0, 1, 0, 0), c(1, 0, 0, 0) ) hyp_names <- c(\"H1\", \"H2\", \"H3\", \"H4\") example_graph <- graph_create(hypotheses, transitions, hyp_names) plot(example_graph, layout = \"grid\")"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/index.html","id":"update-graph","dir":"","previous_headings":"Basic usage","what":"Update graph","title":"Graphical Approach for Multiple Comparison Procedures","text":"Hypotheses can deleted MCP using graph_update(). Updated weights transitions calculated according weighting strategy Algorithm 1 Bretz et al (2011). distinguish deleting rejecting glossary.","code":"graph_update(example_graph, delete = c(FALSE, TRUE, TRUE, FALSE))"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/index.html","id":"generate-weights","dir":"","previous_headings":"Basic usage","what":"Generate weights","title":"Graphical Approach for Multiple Comparison Procedures","text":"weights sub-graphs can calculated graph_generate_weights(). uses efficient code hood graph_update() order performant larger graphs. information closure can found [Link closure vignette].","code":"graph_generate_weights(example_graph)"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/index.html","id":"test-hypotheses","dir":"","previous_headings":"Basic usage","what":"Test hypotheses","title":"Graphical Approach for Multiple Comparison Procedures","text":"Bonferroni testing via shortcut method supported graphicalMCP. test can performed graph_test_shortcut(), generates report showing graph & test results. See insight hypothesis rejected setting verbose test_values flags. details shortcut testing can found [link shortcut vignette]. graph can also tested using Simes- parametric-based testing using closure test. types tests added time, combination tests can used groups hypotheses. Additional details closure testing can found [link closed test vignette].","code":"graph_test_shortcut(example_graph, p = c(.01, .03, .02, .01), alpha = .025) graph_test_closure( example_graph, p = c(.01, .03, .02, .01), alpha = .025, test_types = \"bonferroni\", test_groups = list(1:4) )"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/index.html","id":"power-simulations","dir":"","previous_headings":"Basic usage","what":"Power simulations","title":"Graphical Approach for Multiple Comparison Procedures","text":"’s always obvious graph structure easy difficult reject hypothesis. One way understand better run power simulation, many p-values simulated, graph tested . valid test types & hypothesis groupings valid power simulations well. Power simulations discussed [shortcut testing vignette] [closure testing vignette].","code":"graph_calculate_power( example_graph, sim_n = 1e5, power_marginal = c(.9, .9, .8, .8) )"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/index.html","id":"related-work","dir":"","previous_headings":"","what":"Related work","title":"Graphical Approach for Multiple Comparison Procedures","text":"methods originally implemented gMCP package, still available CRAN today. also lighter version gMCP implemented gMCPmini successor, gMCPLite. two contain subset original functionality, remove rJava dependency add plotting functionality based ggplot2. However, development ceased original package, hope re-implement methods general testing framework; fewer dependencies, particular shedding Java dependency; simpler, transparent S3 classes; improvements accuracy parametric Simes test methods. portion Simes testing also implemented lrstat package.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/index.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Graphical Approach for Multiple Comparison Procedures","text":"","code":"citation(\"graphicalMCP\") #> To cite graphicalMCP in publications use: #> #> Xi, D.; Brockmann, E. (2023). graphicalMCP: Graph-based multiple #> comparison procedures. version 0.1.0. Gilead Sciences, Inc. Foster #> City, California. https://github.com/Gilead-BioStats/graphicalMCP #> #> Frank Bretz, Martin Posch, Ekkehard Glimm, Florian Klinglmueller, #> Willi Maurer, Kornelius Rohmeyer (2011), Graphical approaches for #> multiple comparison procedures using weighted Bonferroni, Simes or #> parametric tests. Biometrical Journal 53 (6), pages 894--913, Wiley. #> #> To see these entries in BibTeX format, use 'print(, #> bibtex=TRUE)', 'toBibtex(.)', or set #> 'options(citation.bibtex.max=999)'."},{"path":[]},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/index.html","id":"glossary-of-terms","dir":"","previous_headings":"","what":"Glossary of terms","title":"Graphical Approach for Multiple Comparison Procedures","text":"package seeks accurate performant, course. beyond , much thought put readability code. Whether read user validating methods, developer extending package new uses, contributor helping enhance core functionality, hope code contained can serve educational document grow people’s understanding graphical approach multiple comparison procedures. end, several entities encountered world graphical MCPs define . used internal code package, inputs output one exported functions. believe definitions clarified improved, please contact package authors submit issue GitHub repository. set weights, adjusted according testing algorithm: Bonferroni: change Simes: Sum weights hypotheses smaller p-values Parametric: Multiply weights c-value, based joint distribution power reject null hypothesis full alpha. Closely related non-centrality parameter, mean null hypothesis underlying multivariate normal distribution: ncp = qnorm(1 - alpha) - qnorm(1 - marginal_power)","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/adjust_p.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate adjusted p-values — adjust_p_bonferroni","title":"Calculate adjusted p-values — adjust_p_bonferroni","text":"Calculate adjusted p-values","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/adjust_p.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate adjusted p-values — adjust_p_bonferroni","text":"","code":"adjust_p_bonferroni(p, hypotheses) adjust_p_parametric(p, hypotheses, test_corr = NULL) adjust_p_simes(p, hypotheses)"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/adjust_p.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate adjusted p-values — adjust_p_bonferroni","text":"p numeric vector p-values hypotheses numeric vector hypothesis weights test_corr (Optional) numeric matrix correlations hypotheses' test statistics","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/adjust_p.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate adjusted p-values — adjust_p_bonferroni","text":"single adjusted p-value given group","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/adjust_p.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Calculate adjusted p-values — adjust_p_bonferroni","text":"Bretz, F., Maurer, W., Brannath, W., Posch, M. (2009). graphical approach sequentially rejective multiple test procedures. Statistics Medicine, 28(4), 586–604. https://doi.org/10.1002/sim.3495 Bretz, F., Maurer, W., Hommel, G. (2011). Test power considerations multiple endpoint analyses using sequentially rejective graphical procedures. Statistics Medicine, 30(13), 1489–1501. https://doi.org/10.1002/sim.3988 Bretz, F., Posch, M., Glimm, E., Klinglmueller, F., Maurer, W., Rohmeyer, K. (2011). Graphical approaches multiple comparison procedures using weighted Bonferroni, Simes, parametric tests. Biometrical Journal, 53(6), 894–913. https://doi.org/10.1002/bimj.201000239 Lu, K. (2016). Graphical approaches using Bonferroni mixture weighted Simes tests. Statistics Medicine, 35(22), 4041–4055. https://doi.org/10.1002/sim.6985 Xi, D., Glimm, E., Maurer, W., Bretz, F. (2017). unified framework weighted parametric multiple test procedures. Biometrical Journal, 59(5), 918–931. https://doi.org/10.1002/bimj.201600233 Xi, D., Bretz, F. (2019). Symmetric graphs equally weighted tests, application Hochberg procedure. Statistics Medicine, 38(27), 5268–5282. https://doi.org/10.1002/sim.8375 Rohmeyer K, Klinglmueller F (2020). gMCP: Graph Based Multiple Test Procedures. R package version 0.8-15, https://cran.r-project.org/package=gMCP.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/adjust_p.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculate adjusted p-values — adjust_p_bonferroni","text":"","code":"set.seed(22723) w <- c(\"H1\" = .75, \"H2\" = .25, \"H3\" = 0) p <- c(\"H1\" = .019, \"H2\" = .025, \"H3\" = .05) graphicalMCP:::adjust_p_bonferroni(p, w) #> [1] 0.02533333 graphicalMCP:::adjust_p_simes(p, w) #> [1] 0.025 corr1 <- diag(3) corr2 <- corr1 corr2[lower.tri(corr2)] <- corr2[upper.tri(corr2)] <- runif(3, -1, 1) # No correlation graphicalMCP:::adjust_p_parametric(p, w, corr1) #> [1] 0.025213 # Uniform random pairwise correlations graphicalMCP:::adjust_p_parametric(p, w, corr2) #> [1] 0.02196006"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/adjusted-weights.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate updated hypothesis weights for the closure of a graph — adjust_weights_parametric","title":"Calculate updated hypothesis weights for the closure of a graph — adjust_weights_parametric","text":"weights created graph_generate_weights() work immediately Bonferroni testing, parametric Simes testing require additional calculations. adjust_weights_*() functions apply parametric Simes weight increases get updated weights testing. also subset weights columns appropriate groups","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/adjusted-weights.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate updated hypothesis weights for the closure of a graph — adjust_weights_parametric","text":"","code":"adjust_weights_parametric( matrix_weights, matrix_intersections, test_corr, alpha, test_groups ) adjust_weights_simes(matrix_weights, p, groups) c_value_function(x, hypotheses, test_corr, alpha) solve_c_parametric(hypotheses, test_corr, alpha)"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/adjusted-weights.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate updated hypothesis weights for the closure of a graph — adjust_weights_parametric","text":"matrix_weights second half columns graph_generate_weights() output, indicating weights intersection matrix_intersections first half columns graph_generate_weights() output, indicating hypotheses contained intersection test_corr numeric matrix correlations hypotheses' test statistics alpha numeric scalar specifying global significance level testing test_groups list numeric vectors specifying hypotheses test together p numeric vector p-values x root solve stats::uniroot() hypotheses numeric vector hypothesis weights","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/adjusted-weights.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate updated hypothesis weights for the closure of a graph — adjust_weights_parametric","text":"Outputs: adjust_weights_*(), matrix shape weighting_strategy, weights adjusted according specified adjustment method c_value_function(), \\(c_{J_h}\\) value given group, according Formula 6 Xi et al. (2017).","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/adjusted-weights.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Calculate updated hypothesis weights for the closure of a graph — adjust_weights_parametric","text":"Bretz, F., Maurer, W., Brannath, W., Posch, M. (2009). graphical approach sequentially rejective multiple test procedures. Statistics Medicine, 28(4), 586–604. https://doi.org/10.1002/sim.3495 Bretz, F., Maurer, W., Hommel, G. (2011). Test power considerations multiple endpoint analyses using sequentially rejective graphical procedures. Statistics Medicine, 30(13), 1489–1501. https://doi.org/10.1002/sim.3988 Bretz, F., Posch, M., Glimm, E., Klinglmueller, F., Maurer, W., Rohmeyer, K. (2011). Graphical approaches multiple comparison procedures using weighted Bonferroni, Simes, parametric tests. Biometrical Journal, 53(6), 894–913. https://doi.org/10.1002/bimj.201000239 Lu, K. (2016). Graphical approaches using Bonferroni mixture weighted Simes tests. Statistics Medicine, 35(22), 4041–4055. https://doi.org/10.1002/sim.6985 Xi, D., Glimm, E., Maurer, W., Bretz, F. (2017). unified framework weighted parametric multiple test procedures. Biometrical Journal, 59(5), 918–931. https://doi.org/10.1002/bimj.201600233 Xi, D., Bretz, F. (2019). Symmetric graphs equally weighted tests, application Hochberg procedure. Statistics Medicine, 38(27), 5268–5282. https://doi.org/10.1002/sim.8375 Rohmeyer K, Klinglmueller F (2020). gMCP: Graph Based Multiple Test Procedures. R package version 0.8-15, https://cran.r-project.org/package=gMCP.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/adjusted-weights.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculate updated hypothesis weights for the closure of a graph — adjust_weights_parametric","text":"","code":"p <- 1:6 / 200 g <- bonferroni_holm(6) gw_large <- graph_generate_weights(g) gw_0 <- gw_large[, 7:12] gw <- ifelse(gw_large[, 1:6], gw_0, NA) graphicalMCP:::adjust_weights_parametric( gw_0, gw_large[, 1:6], diag(6), .05, list(1:3) ) #> H1 H2 H3 #> 1 0.1680752 0.1680752 0.1680752 #> 2 0.2020340 0.2020340 0.2020340 #> 3 0.2020340 0.2020340 0.2020340 #> 4 0.2531918 0.2531918 0.2531918 #> 5 0.2020340 0.2020340 0.2020340 #> 6 0.2531918 0.2531918 0.2531918 #> 7 0.2531918 0.2531918 0.2531918 #> 8 0.3390485 0.3390485 0.3390485 #> 9 0.2010082 0.2010082 0.0000000 #> 10 0.2515823 0.2515823 0.0000000 #> 11 0.2515823 0.2515823 0.0000000 #> 12 0.3361584 0.3361584 0.0000000 #> 13 0.2515823 0.2515823 0.0000000 #> 14 0.3361584 0.3361584 0.0000000 #> 15 0.3361584 0.3361584 0.0000000 #> 16 0.5064113 0.5064113 0.0000000 #> 17 0.2010082 0.0000000 0.2010082 #> 18 0.2515823 0.0000000 0.2515823 #> 19 0.2515823 0.0000000 0.2515823 #> 20 0.3361584 0.0000000 0.3361584 #> 21 0.2515823 0.0000000 0.2515823 #> 22 0.3361584 0.0000000 0.3361584 #> 23 0.3361584 0.0000000 0.3361584 #> 24 0.5064113 0.0000000 0.5064113 #> 25 0.2500000 0.0000000 0.0000000 #> 26 0.3333333 0.0000000 0.0000000 #> 27 0.3333333 0.0000000 0.0000000 #> 28 0.5000000 0.0000000 0.0000000 #> 29 0.3333333 0.0000000 0.0000000 #> 30 0.5000000 0.0000000 0.0000000 #> 31 0.5000000 0.0000000 0.0000000 #> 32 1.0000000 0.0000000 0.0000000 #> 33 0.0000000 0.2010082 0.2010082 #> 34 0.0000000 0.2515823 0.2515823 #> 35 0.0000000 0.2515823 0.2515823 #> 36 0.0000000 0.3361584 0.3361584 #> 37 0.0000000 0.2515823 0.2515823 #> 38 0.0000000 0.3361584 0.3361584 #> 39 0.0000000 0.3361584 0.3361584 #> 40 0.0000000 0.5064113 0.5064113 #> 41 0.0000000 0.2500000 0.0000000 #> 42 0.0000000 0.3333333 0.0000000 #> 43 0.0000000 0.3333333 0.0000000 #> 44 0.0000000 0.5000000 0.0000000 #> 45 0.0000000 0.3333333 0.0000000 #> 46 0.0000000 0.5000000 0.0000000 #> 47 0.0000000 0.5000000 0.0000000 #> 48 0.0000000 1.0000000 0.0000000 #> 49 0.0000000 0.0000000 0.2500000 #> 50 0.0000000 0.0000000 0.3333333 #> 51 0.0000000 0.0000000 0.3333333 #> 52 0.0000000 0.0000000 0.5000000 #> 53 0.0000000 0.0000000 0.3333333 #> 54 0.0000000 0.0000000 0.5000000 #> 55 0.0000000 0.0000000 0.5000000 #> 56 0.0000000 0.0000000 1.0000000 #> 57 0.0000000 0.0000000 0.0000000 #> 58 0.0000000 0.0000000 0.0000000 #> 59 0.0000000 0.0000000 0.0000000 #> 60 0.0000000 0.0000000 0.0000000 #> 61 0.0000000 0.0000000 0.0000000 #> 62 0.0000000 0.0000000 0.0000000 #> 63 0.0000000 0.0000000 0.0000000 graphicalMCP:::adjust_weights_simes(gw_0, p, list(4:6)) #> H4 H5 H6 #> 1 0.1666667 0.3333333 0.5000000 #> 2 0.2000000 0.4000000 0.4000000 #> 3 0.2000000 0.2000000 0.4000000 #> 4 0.2500000 0.2500000 0.2500000 #> 5 0.0000000 0.2000000 0.4000000 #> 6 0.0000000 0.2500000 0.2500000 #> 7 0.0000000 0.0000000 0.2500000 #> 8 0.0000000 0.0000000 0.0000000 #> 9 0.2000000 0.4000000 0.6000000 #> 10 0.2500000 0.5000000 0.5000000 #> 11 0.2500000 0.2500000 0.5000000 #> 12 0.3333333 0.3333333 0.3333333 #> 13 0.0000000 0.2500000 0.5000000 #> 14 0.0000000 0.3333333 0.3333333 #> 15 0.0000000 0.0000000 0.3333333 #> 16 0.0000000 0.0000000 0.0000000 #> 17 0.2000000 0.4000000 0.6000000 #> 18 0.2500000 0.5000000 0.5000000 #> 19 0.2500000 0.2500000 0.5000000 #> 20 0.3333333 0.3333333 0.3333333 #> 21 0.0000000 0.2500000 0.5000000 #> 22 0.0000000 0.3333333 0.3333333 #> 23 0.0000000 0.0000000 0.3333333 #> 24 0.0000000 0.0000000 0.0000000 #> 25 0.2500000 0.5000000 0.7500000 #> 26 0.3333333 0.6666667 0.6666667 #> 27 0.3333333 0.3333333 0.6666667 #> 28 0.5000000 0.5000000 0.5000000 #> 29 0.0000000 0.3333333 0.6666667 #> 30 0.0000000 0.5000000 0.5000000 #> 31 0.0000000 0.0000000 0.5000000 #> 32 0.0000000 0.0000000 0.0000000 #> 33 0.2000000 0.4000000 0.6000000 #> 34 0.2500000 0.5000000 0.5000000 #> 35 0.2500000 0.2500000 0.5000000 #> 36 0.3333333 0.3333333 0.3333333 #> 37 0.0000000 0.2500000 0.5000000 #> 38 0.0000000 0.3333333 0.3333333 #> 39 0.0000000 0.0000000 0.3333333 #> 40 0.0000000 0.0000000 0.0000000 #> 41 0.2500000 0.5000000 0.7500000 #> 42 0.3333333 0.6666667 0.6666667 #> 43 0.3333333 0.3333333 0.6666667 #> 44 0.5000000 0.5000000 0.5000000 #> 45 0.0000000 0.3333333 0.6666667 #> 46 0.0000000 0.5000000 0.5000000 #> 47 0.0000000 0.0000000 0.5000000 #> 48 0.0000000 0.0000000 0.0000000 #> 49 0.2500000 0.5000000 0.7500000 #> 50 0.3333333 0.6666667 0.6666667 #> 51 0.3333333 0.3333333 0.6666667 #> 52 0.5000000 0.5000000 0.5000000 #> 53 0.0000000 0.3333333 0.6666667 #> 54 0.0000000 0.5000000 0.5000000 #> 55 0.0000000 0.0000000 0.5000000 #> 56 0.0000000 0.0000000 0.0000000 #> 57 0.3333333 0.6666667 1.0000000 #> 58 0.5000000 1.0000000 1.0000000 #> 59 0.5000000 0.5000000 1.0000000 #> 60 1.0000000 1.0000000 1.0000000 #> 61 0.0000000 0.5000000 1.0000000 #> 62 0.0000000 1.0000000 1.0000000 #> 63 0.0000000 0.0000000 1.0000000"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/as-graph.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert between gMCP and graphicalMCP graph classes — as_initial_graph","title":"Convert between gMCP and graphicalMCP graph classes — as_initial_graph","text":"Convert gMCP graphicalMCP graph classes","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/as-graph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert between gMCP and graphicalMCP graph classes — as_initial_graph","text":"","code":"as_initial_graph(graph) # S3 method for graphMCP as_initial_graph(graph) # S3 method for igraph as_initial_graph(graph) as_graphMCP(graph) # S3 method for initial_graph as_graphMCP(graph) as_igraph(graph) # S3 method for initial_graph as_igraph(graph)"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/as-graph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert between gMCP and graphicalMCP graph classes — as_initial_graph","text":"graph initial_graph object graphicalMCP, graphMCP object gMCP, igraph object igraph, depending direction converting","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/as-graph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert between gMCP and graphicalMCP graph classes — as_initial_graph","text":"as_graphMCP(), gMCP graph object, as_igraph(), igraph object, as_initial_graph(), graphicalMCP graph object","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/as-graph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert between gMCP and graphicalMCP graph classes — as_initial_graph","text":"","code":"g1 <- random_graph(5) if (requireNamespace(\"gMCP\", quietly = TRUE)) { g2 <- as_graphMCP(g1) all.equal(g1, as_initial_graph(g2)) } #> [1] TRUE if (requireNamespace(\"igraph\", quietly = TRUE)) { g3 <- as_igraph(g1) all.equal(g1, as_initial_graph(g3)) } #> igraph method #> [1] \"names for target but not for current\" #> [2] \"Attributes: < Component “class”: 1 string mismatch >\" #> [3] \"Length mismatch: comparison on first 2 components\" #> [4] \"Component 1: names for target but not for current\" #> [5] \"Component 1: Numeric: lengths (5, 1) differ\" #> [6] \"Component 2: Modes: numeric, logical\" #> [7] \"Component 2: Lengths: 25, 1\" #> [8] \"Component 2: Attributes: < Modes: list, NULL >\" #> [9] \"Component 2: Attributes: < Lengths: 2, 0 >\" #> [10] \"Component 2: Attributes: < names for target but not for current >\" #> [11] \"Component 2: Attributes: < current is not list-like >\" #> [12] \"Component 2: target is matrix, current is logical\""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/calc-test_values.html","id":null,"dir":"Reference","previous_headings":"","what":"Test hypotheses with the adjusted significance method — test_values_bonferroni","title":"Test hypotheses with the adjusted significance method — test_values_bonferroni","text":"Test hypotheses adjusted significance method","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/calc-test_values.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test hypotheses with the adjusted significance method — test_values_bonferroni","text":"","code":"test_values_bonferroni(p, hypotheses, alpha, intersection = NA) test_values_parametric(p, hypotheses, alpha, intersection = NA, test_corr) test_values_simes(p, hypotheses, alpha, intersection = NA)"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/calc-test_values.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test hypotheses with the adjusted significance method — test_values_bonferroni","text":"p numeric vector p-values hypotheses numeric vector hypothesis hypotheses alpha numeric scalar specifying global significance level testing intersection numeric scalar used track intersection test values test_corr numeric matrix correlations hypotheses' test statistics","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/calc-test_values.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test hypotheses with the adjusted significance method — test_values_bonferroni","text":"data frame columns specifying values used calculate hypothesis test","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/calc-test_values.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Test hypotheses with the adjusted significance method — test_values_bonferroni","text":"Bretz, F., Maurer, W., Brannath, W., Posch, M. (2009). graphical approach sequentially rejective multiple test procedures. Statistics Medicine, 28(4), 586–604. https://doi.org/10.1002/sim.3495 Bretz, F., Maurer, W., Hommel, G. (2011). Test power considerations multiple endpoint analyses using sequentially rejective graphical procedures. Statistics Medicine, 30(13), 1489–1501. https://doi.org/10.1002/sim.3988 Bretz, F., Posch, M., Glimm, E., Klinglmueller, F., Maurer, W., Rohmeyer, K. (2011). Graphical approaches multiple comparison procedures using weighted Bonferroni, Simes, parametric tests. Biometrical Journal, 53(6), 894–913. https://doi.org/10.1002/bimj.201000239 Lu, K. (2016). Graphical approaches using Bonferroni mixture weighted Simes tests. Statistics Medicine, 35(22), 4041–4055. https://doi.org/10.1002/sim.6985 Xi, D., Glimm, E., Maurer, W., Bretz, F. (2017). unified framework weighted parametric multiple test procedures. Biometrical Journal, 59(5), 918–931. https://doi.org/10.1002/bimj.201600233 Xi, D., Bretz, F. (2019). Symmetric graphs equally weighted tests, application Hochberg procedure. Statistics Medicine, 38(27), 5268–5282. https://doi.org/10.1002/sim.8375 Rohmeyer K, Klinglmueller F (2020). gMCP: Graph Based Multiple Test Procedures. R package version 0.8-15, https://cran.r-project.org/package=gMCP.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/calc-test_values.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test hypotheses with the adjusted significance method — test_values_bonferroni","text":"","code":"w <- c(H1 = .5, H2 = .5, H3 = 0, H4 = 0) p <- c(.024, .01, .026, .027) graphicalMCP:::test_values_bonferroni(p, w, .05) #> Intersection Hypothesis Test p <= c_value * Weight * Alpha #> H1 NA H1 bonferroni 0.024 <= 0.5 * 0.05 #> H2 NA H2 bonferroni 0.010 <= 0.5 * 0.05 #> H3 NA H3 bonferroni 0.026 <= 0.0 * 0.05 #> H4 NA H4 bonferroni 0.027 <= 0.0 * 0.05 #> Inequality_holds #> H1 TRUE #> H2 TRUE #> H3 FALSE #> H4 FALSE graphicalMCP:::test_values_parametric(p, w, .05, test_corr = diag(4)) #> Intersection Hypothesis Test p <= c_value * Weight * Alpha #> H1 NA H1 parametric 0.024 <= 1.012823 * 0.5 * 0.05 #> H2 NA H2 parametric 0.010 <= 1.012823 * 0.5 * 0.05 #> H3 NA H3 parametric 0.026 <= 1.012823 * 0.0 * 0.05 #> H4 NA H4 parametric 0.027 <= 1.012823 * 0.0 * 0.05 #> Inequality_holds #> H1 TRUE #> H2 TRUE #> H3 FALSE #> H4 FALSE graphicalMCP:::test_values_simes(p, w, .05) #> Intersection Hypothesis Test p <= c_value * Weight * Alpha #> 1 NA H1 simes 0.024 <= 1.0 * 0.05 #> 2 NA H2 simes 0.010 <= 0.5 * 0.05 #> 3 NA H3 simes 0.026 <= 1.0 * 0.05 #> 4 NA H4 simes 0.027 <= 1.0 * 0.05 #> Inequality_holds #> 1 TRUE #> 2 TRUE #> 3 TRUE #> 4 TRUE"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/example-graphs.html","id":null,"dir":"Reference","previous_headings":"","what":"Example graphs from a selection of papers — bonferroni_holm","title":"Example graphs from a selection of papers — bonferroni_holm","text":"Example graphs selection papers","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/example-graphs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Example graphs from a selection of papers — bonferroni_holm","text":"","code":"bonferroni_holm(num_hyps, hyp_names = NULL) huque_alosh_bhore_2011(hyp_names = NULL) wiens_dmitrienko_2005(hyp_names = NULL) fixed_sequence(num_hyps = 3, hyp_names = NULL) fallback(hypotheses = c(1, 0, 0), hyp_names = NULL) simple_successive_1(hyp_names = NULL) simple_successive_2(hyp_names = NULL) random_graph(num_hyps, hyp_names = NULL) complex_example_1(hyp_names = NULL) complex_example_2(hyp_names = NULL) complex_example_2(hyp_names = NULL)"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/example-graphs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Example graphs from a selection of papers — bonferroni_holm","text":"num_hyps Number vertices graph hyp_names (Optional) character vector hypothesis names. names specified, hypotheses named sequentially H1, H2, ... hypotheses Hypothesis weights fallback procedure","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/example-graphs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Example graphs from a selection of papers — bonferroni_holm","text":"S3 object returned graph_create()","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/example-graphs.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Example graphs from a selection of papers — bonferroni_holm","text":"Bretz, F., Maurer, W., Brannath, W., Posch, M. (2009). graphical approach sequentially rejective multiple test procedures. Statistics Medicine, 28(4), 586–604. https://doi.org/10.1002/sim.3495 Bretz, F., Maurer, W., Hommel, G. (2011). Test power considerations multiple endpoint analyses using sequentially rejective graphical procedures. Statistics Medicine, 30(13), 1489–1501. https://doi.org/10.1002/sim.3988 Bretz, F., Posch, M., Glimm, E., Klinglmueller, F., Maurer, W., Rohmeyer, K. (2011). Graphical approaches multiple comparison procedures using weighted Bonferroni, Simes, parametric tests. Biometrical Journal, 53(6), 894–913. https://doi.org/10.1002/bimj.201000239 Lu, K. (2016). Graphical approaches using Bonferroni mixture weighted Simes tests. Statistics Medicine, 35(22), 4041–4055. https://doi.org/10.1002/sim.6985 Xi, D., Glimm, E., Maurer, W., Bretz, F. (2017). unified framework weighted parametric multiple test procedures. Biometrical Journal, 59(5), 918–931. https://doi.org/10.1002/bimj.201600233 Xi, D., Bretz, F. (2019). Symmetric graphs equally weighted tests, application Hochberg procedure. Statistics Medicine, 38(27), 5268–5282. https://doi.org/10.1002/sim.8375 Rohmeyer K, Klinglmueller F (2020). gMCP: Graph Based Multiple Test Procedures. R package version 0.8-15, https://cran.r-project.org/package=gMCP.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/example-graphs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Example graphs from a selection of papers — bonferroni_holm","text":"","code":"bonferroni_holm(3, hyp_names = paste(\"dose\", letters[1:3])) #> Initial graph #> #> --- Hypothesis weights --- #> dose a: 0.3333 #> dose b: 0.3333 #> dose c: 0.3333 #> #> --- Transition weights --- #> dose a dose b dose c #> dose a 0.0 0.5 0.5 #> dose b 0.5 0.0 0.5 #> dose c 0.5 0.5 0.0"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_calculate_power.html","id":null,"dir":"Reference","previous_headings":"","what":"Obtain hypothesis rejection probabilities — graph_calculate_power","title":"Obtain hypothesis rejection probabilities — graph_calculate_power","text":"often difficult tell likely given hypothesis rejected. power simulations useful. set distribution parameters, many p-values generated, graph tested one. testing strategy can used. probabilities calculated hypothesis rejected, well additional probabilities expected rejections probability rejecting hypothesis","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_calculate_power.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Obtain hypothesis rejection probabilities — graph_calculate_power","text":"","code":"graph_calculate_power( graph, alpha = 0.025, power_marginal = rep(alpha, length(graph$hypotheses)), test_groups = list(seq_along(graph$hypotheses)), test_types = c(\"bonferroni\"), test_corr = rep(list(NA), length(test_types)), sim_n = 100, sim_corr = diag(length(graph$hypotheses)), sim_success = NULL, sim_seed = NULL, force_closure = FALSE, verbose = FALSE )"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_calculate_power.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Obtain hypothesis rejection probabilities — graph_calculate_power","text":"graph initial graph returned graph_create() alpha numeric scalar specifying global significance level testing power_marginal numeric vector mean values use simulating p-values. Exactly one mean per hypothesis needed, p-values sampled multivariate normal distribution. See Details test_groups list numeric vectors specifying hypotheses test together test_types character vector tests apply given groups test_corr Optional test_types parametric. numeric matrix correlations hypotheses' test statistics sim_n integer scalar specifying many simulations run sim_corr numeric matrix correlations hypotheses used sample multivariate normal distribution generate p-values sim_success list user-defined functions apply power results. Functions must take one simulation's logical vector results input, return length-one logical vector. instance, \"success\" means rejecting hypotheses 1 2, use sim_success = list(\"1 2\" = function(x) x[1] && x[2]). list named, function body used name. Lambda functions also work starting R 4.1, e.g. sim_success = list(\\(x) x[3] || x[4]) sim_seed (Optional) Random seed set simulating p-values. Set use consistent set p simulations across power calculations force_closure logical scalar used determine whether full closure test used Bonferroni testing. Ignored tests non-Bonferroni verbose logical scalar specifying whether full matrix simulations test results included output ","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_calculate_power.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Obtain hypothesis rejection probabilities — graph_calculate_power","text":"list five elements power_local - rejection proportion hypothesis individually power_expected - average number hypotheses rejected single simulation power_at_least_1 - proportion simulations reject hypothesis power_all - proportion simulations reject hypotheses power_success - proportion simulations reject hypotheses specified sim_success","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_calculate_power.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Obtain hypothesis rejection probabilities — graph_calculate_power","text":"parameters normal distribution set power_marginal (means) sim_corr (correlation test statistics). mean hypothesis set marginal power $$d_i=P_{\\xi_i}(p_i\\leq\\alpha)$$ \\(\\xi_i\\) non-centrality parameter. correlation test statistics induced study design.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_calculate_power.html","id":"success","dir":"Reference","previous_headings":"","what":"Success","title":"Obtain hypothesis rejection probabilities — graph_calculate_power","text":"Success mean something different trial, lot flexibility sim_success parameter. However, flexibility means little validation inputs. user make sure function(s) passed mean think. implementation perspective, function applied row-wise matrix test results simulation, resulting sim_n length vector. mean vector returned \"Probability success\"","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_calculate_power.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Obtain hypothesis rejection probabilities — graph_calculate_power","text":"Bretz, F., Maurer, W., Brannath, W., Posch, M. (2009). graphical approach sequentially rejective multiple test procedures. Statistics Medicine, 28(4), 586–604. https://doi.org/10.1002/sim.3495 Bretz, F., Maurer, W., Hommel, G. (2011). Test power considerations multiple endpoint analyses using sequentially rejective graphical procedures. Statistics Medicine, 30(13), 1489–1501. https://doi.org/10.1002/sim.3988 Bretz, F., Posch, M., Glimm, E., Klinglmueller, F., Maurer, W., Rohmeyer, K. (2011). Graphical approaches multiple comparison procedures using weighted Bonferroni, Simes, parametric tests. Biometrical Journal, 53(6), 894–913. https://doi.org/10.1002/bimj.201000239 Lu, K. (2016). Graphical approaches using Bonferroni mixture weighted Simes tests. Statistics Medicine, 35(22), 4041–4055. https://doi.org/10.1002/sim.6985 Xi, D., Glimm, E., Maurer, W., Bretz, F. (2017). unified framework weighted parametric multiple test procedures. Biometrical Journal, 59(5), 918–931. https://doi.org/10.1002/bimj.201600233 Xi, D., Bretz, F. (2019). Symmetric graphs equally weighted tests, application Hochberg procedure. Statistics Medicine, 38(27), 5268–5282. https://doi.org/10.1002/sim.8375 Rohmeyer K, Klinglmueller F (2020). gMCP: Graph Based Multiple Test Procedures. R package version 0.8-15, https://cran.r-project.org/package=gMCP.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_calculate_power.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Obtain hypothesis rejection probabilities — graph_calculate_power","text":"","code":"par_gate <- simple_successive_1() # The default is to test all hypotheses with: Bonferroni testing at alpha # level .025, 0 mean under the alternative, and 0 correlation between # hypotheses under the alternative # The default of 100 simulations will usually need to be increased graph_calculate_power(par_gate, sim_n = 1e5) #> #> Test parameters ($inputs) ------------------------------------------------------ #> Initial graph #> #> --- Hypothesis weights --- #> H1: 0.5 #> H2: 0.5 #> H3: 0.0 #> H4: 0.0 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 0 0 1 0 #> H2 0 0 0 1 #> H3 0 1 0 0 #> H4 1 0 0 0 #> #> Alpha = 0.025 #> #> Test types #> bonferroni: (H1, H2, H3, H4) #> #> Simulation parameters ($inputs) ------------------------------------------------ #> Testing 100,000 simulations with multivariate normal params: #> #> H1 H2 H3 H4 #> Marginal power: 0.025 0.025 0.025 0.025 #> #> Correlation: H1 H2 H3 H4 #> H1 1 0 0 0 #> H2 0 1 0 0 #> H3 0 0 1 0 #> H4 0 0 0 1 #> #> Power calculation ($power) ----------------------------------------------------- #> H1 H2 H3 H4 #> Local power: 0.01201 0.01166 0.00016 0.00019 #> #> Expected no. of rejections: 0.02402 #> Power to reject 1 or more: 0.02349 #> Power to reject all: 0 #> # But any test group/type combination that works for [graph_test_closure()] # can be used graph_calculate_power( par_gate, alpha = .025, test_groups = list(1:2, 3:4), test_types = c(\"s\", \"p\"), test_corr = list(NA, diag(2)), sim_n = 1e5, sim_success = list( function(.) .[1] || .[2], function(.) .[1] && .[2] ) ) #> #> Test parameters ($inputs) ------------------------------------------------------ #> Initial graph #> #> --- Hypothesis weights --- #> H1: 0.5 #> H2: 0.5 #> H3: 0.0 #> H4: 0.0 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 0 0 1 0 #> H2 0 0 0 1 #> H3 0 1 0 0 #> H4 1 0 0 0 #> #> Alpha = 0.025 #> #> Parametric testing correlation: H3 H4 #> H3 1 0 #> H4 0 1 #> #> Test types #> simes: (H1, H2) #> parametric: (H3, H4) #> #> Simulation parameters ($inputs) ------------------------------------------------ #> Testing 100,000 simulations with multivariate normal params: #> #> H1 H2 H3 H4 #> Marginal power: 0.025 0.025 0.025 0.025 #> #> Correlation: H1 H2 H3 H4 #> H1 1 0 0 0 #> H2 0 1 0 0 #> H3 0 0 1 0 #> H4 0 0 0 1 #> #> Power calculation ($power) ----------------------------------------------------- #> H1 H2 H3 H4 #> Local power: 0.01203 0.01215 0.00018 0.00021 #> #> Expected no. of rejections: 0.02457 #> Power to reject 1 or more: 0.02403 #> Power to reject all: 0 #> #> Power to reject: .[1] || .[2] .[1] && .[2] #> 0.02403 0.00015 #>"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_create.html","id":null,"dir":"Reference","previous_headings":"","what":"Define a graph representing a multiple comparison procedure — graph_create","title":"Define a graph representing a multiple comparison procedure — graph_create","text":"multiple comparison procedure graph can represented 1) vector initial hypothesis weights, 2) matrix initial transition weights. function creates initial graph object using vector matrix. also validates inputs make sure combine form valid graph.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_create.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Define a graph representing a multiple comparison procedure — graph_create","text":"","code":"graph_create(hypotheses, transitions, hyp_names = NULL)"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_create.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Define a graph representing a multiple comparison procedure — graph_create","text":"hypotheses numeric vector hypothesis weights initial graphical multiple comparison procedure. Must vector values 0 & 1 (inclusive). length match row column lengths transitions. sum hypothesis weights exceed 1 transitions numeric matrix transition weights hypotheses initial graphical multiple comparison procedure. Must square matrix values 0 & 1 (inclusive). row column lengths match length hypotheses. row (Transition weights leaving hypothesis) can sum 1. diagonal (Transition weights hypothesis ) must 0s hyp_names (Optional) character vector hypothesis names. provided, names hypotheses transitions used. names specified, hypotheses named sequentially H1, H2, ...","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_create.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Define a graph representing a multiple comparison procedure — graph_create","text":"S3 object class initial_graph. underlying structure list elements hypotheses transitions","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_create.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Define a graph representing a multiple comparison procedure — graph_create","text":"validations performed : Weights numeric Length hypotheses dimensions transitions Explicit hyp_names override names hypotheses transitions Hypothesis weights must non-negative sum 1 Transition weights matrix: Diagonal must 1 Rows must sum 1 Values must non-negative","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_create.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Define a graph representing a multiple comparison procedure — graph_create","text":"Bretz, F., Maurer, W., Brannath, W., Posch, M. (2009). graphical approach sequentially rejective multiple test procedures. Statistics Medicine, 28(4), 586–604. https://doi.org/10.1002/sim.3495 Bretz, F., Maurer, W., Hommel, G. (2011). Test power considerations multiple endpoint analyses using sequentially rejective graphical procedures. Statistics Medicine, 30(13), 1489–1501. https://doi.org/10.1002/sim.3988 Bretz, F., Posch, M., Glimm, E., Klinglmueller, F., Maurer, W., Rohmeyer, K. (2011). Graphical approaches multiple comparison procedures using weighted Bonferroni, Simes, parametric tests. Biometrical Journal, 53(6), 894–913. https://doi.org/10.1002/bimj.201000239 Lu, K. (2016). Graphical approaches using Bonferroni mixture weighted Simes tests. Statistics Medicine, 35(22), 4041–4055. https://doi.org/10.1002/sim.6985 Xi, D., Glimm, E., Maurer, W., Bretz, F. (2017). unified framework weighted parametric multiple test procedures. Biometrical Journal, 59(5), 918–931. https://doi.org/10.1002/bimj.201600233 Xi, D., Bretz, F. (2019). Symmetric graphs equally weighted tests, application Hochberg procedure. Statistics Medicine, 38(27), 5268–5282. https://doi.org/10.1002/sim.8375 Rohmeyer K, Klinglmueller F (2020). gMCP: Graph Based Multiple Test Procedures. R package version 0.8-15, https://cran.r-project.org/package=gMCP.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_create.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Define a graph representing a multiple comparison procedure — graph_create","text":"","code":"# A graphical multiple comparison procedure with two primary hypotheses (H1 # and H2) and two secondary hypotheses (H3 and H4) # See Figure 1 in Bretz, F., Posch, M., Glimm, E., Klinglmueller, F., Maurer, # W., & Rohmeyer, K. (2011). Graphical approaches for multiple comparison # procedures using weighted Bonferroni, Simes, or parametric tests. # Biometrical Journal, 53(6), 894-913. hypotheses <- c(0.5, 0.5, 0, 0) transitions <- rbind( c(0, 0, 1, 0), c(0, 0, 0, 1), c(0, 1, 0, 0), c(1, 0, 0, 0) ) hyp_names <- c(\"H1\", \"H2\", \"H3\", \"H4\") g <- graph_create(hypotheses, transitions, hyp_names) g #> Initial graph #> #> --- Hypothesis weights --- #> H1: 0.5 #> H2: 0.5 #> H3: 0.0 #> H4: 0.0 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 0 0 1 0 #> H2 0 0 0 1 #> H3 0 1 0 0 #> H4 1 0 0 0 # Explicit names override names in `hypotheses` (with a warning) hypotheses <- c(h1 = 0.5, h2 = 0.5, h3 = 0, h4 = 0) transitions <- rbind( c(0, 0, 1, 0), c(0, 0, 0, 1), c(0, 1, 0, 0), c(1, 0, 0, 0) ) g <- graph_create(hypotheses, transitions, hyp_names) #> Warning: Hypothesis names specified - overriding names in #> `hypotheses` and `transitions` g #> Initial graph #> #> --- Hypothesis weights --- #> H1: 0.5 #> H2: 0.5 #> H3: 0.0 #> H4: 0.0 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 0 0 1 0 #> H2 0 0 0 1 #> H3 0 1 0 0 #> H4 1 0 0 0 # Explicit names override names in `transitions` (with a warning) hypotheses <- c(0.5, 0.5, 0, 0) transitions <- rbind( h1 = c(0, 0, 1, 0), h2 = c(0, 0, 0, 1), h3 = c(0, 1, 0, 0), h4 = c(1, 0, 0, 0) ) g <- graph_create(hypotheses, transitions, hyp_names) #> Warning: Hypothesis names specified - overriding names in #> `hypotheses` and `transitions` g #> Initial graph #> #> --- Hypothesis weights --- #> H1: 0.5 #> H2: 0.5 #> H3: 0.0 #> H4: 0.0 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 0 0 1 0 #> H2 0 0 0 1 #> H3 0 1 0 0 #> H4 1 0 0 0 # Use names in `hypotheses` hypotheses <- c(H1 = 0.5, H2 = 0.5, H3 = 0, H4 = 0) transitions <- rbind( c(0, 0, 1, 0), c(0, 0, 0, 1), c(0, 1, 0, 0), c(1, 0, 0, 0) ) g <- graph_create(hypotheses, transitions) g #> Initial graph #> #> --- Hypothesis weights --- #> H1: 0.5 #> H2: 0.5 #> H3: 0.0 #> H4: 0.0 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 0 0 1 0 #> H2 0 0 0 1 #> H3 0 1 0 0 #> H4 1 0 0 0 # Use names in `transitions` hypotheses <- c(0.5, 0.5, 0, 0) transitions <- rbind( H1 = c(0, 0, 1, 0), H2 = c(0, 0, 0, 1), H3 = c(0, 1, 0, 0), H4 = c(1, 0, 0, 0) ) g <- graph_create(hypotheses, transitions) g #> Initial graph #> #> --- Hypothesis weights --- #> H1: 0.5 #> H2: 0.5 #> H3: 0.0 #> H4: 0.0 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 0 0 1 0 #> H2 0 0 0 1 #> H3 0 1 0 0 #> H4 1 0 0 0 # When names are not specified, hypotheses are numbered sequentially as # H1, H2, ... hypotheses <- c(0.5, 0.5, 0, 0) transitions <- rbind( c(0, 0, 1, 0), c(0, 0, 0, 1), c(0, 1, 0, 0), c(1, 0, 0, 0) ) g <- graph_create(hypotheses, transitions) g #> Initial graph #> #> --- Hypothesis weights --- #> H1: 0.5 #> H2: 0.5 #> H3: 0.0 #> H4: 0.0 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 0 0 1 0 #> H2 0 0 0 1 #> H3 0 1 0 0 #> H4 1 0 0 0"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_generate_weights.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate weights for the closure of a graph — graph_generate_weights","title":"Calculate weights for the closure of a graph — graph_generate_weights","text":"closure graph set sub-graphs, intersections hypotheses, graph. Weights sub-graph calculated using weighting strategy defined Bretz et al (2011).","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_generate_weights.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate weights for the closure of a graph — graph_generate_weights","text":"","code":"graph_generate_weights(graph)"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_generate_weights.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate weights for the closure of a graph — graph_generate_weights","text":"graph initial graph returned graph_create()","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_generate_weights.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate weights for the closure of a graph — graph_generate_weights","text":"numeric matrix intersection hypothesis weights. row corresponds single intersection hypothesis. first half columns indicate hypotheses included given intersection hypothesis, second half columns weights","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_generate_weights.html","id":"performance","dir":"Reference","previous_headings":"","what":"Performance","title":"Calculate weights for the closure of a graph — graph_generate_weights","text":"Much thought given performance code, memory time usage can grow quickly graph size grows. systems used testing, size 10 graph median run time 20-60 ms. Run time increases rate O(2 ^ n), e.g. size 5 graph takes approximately twice long run size 4 graph. See vignette(\"generate-weights-performance\") detailed analysis explanation","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_generate_weights.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Calculate weights for the closure of a graph — graph_generate_weights","text":"Bretz, F., Maurer, W., Brannath, W., Posch, M. (2009). graphical approach sequentially rejective multiple test procedures. Statistics Medicine, 28(4), 586–604. https://doi.org/10.1002/sim.3495 Bretz, F., Maurer, W., Hommel, G. (2011). Test power considerations multiple endpoint analyses using sequentially rejective graphical procedures. Statistics Medicine, 30(13), 1489–1501. https://doi.org/10.1002/sim.3988 Bretz, F., Posch, M., Glimm, E., Klinglmueller, F., Maurer, W., Rohmeyer, K. (2011). Graphical approaches multiple comparison procedures using weighted Bonferroni, Simes, parametric tests. Biometrical Journal, 53(6), 894–913. https://doi.org/10.1002/bimj.201000239 Lu, K. (2016). Graphical approaches using Bonferroni mixture weighted Simes tests. Statistics Medicine, 35(22), 4041–4055. https://doi.org/10.1002/sim.6985 Xi, D., Glimm, E., Maurer, W., Bretz, F. (2017). unified framework weighted parametric multiple test procedures. Biometrical Journal, 59(5), 918–931. https://doi.org/10.1002/bimj.201600233 Xi, D., Bretz, F. (2019). Symmetric graphs equally weighted tests, application Hochberg procedure. Statistics Medicine, 38(27), 5268–5282. https://doi.org/10.1002/sim.8375 Rohmeyer K, Klinglmueller F (2020). gMCP: Graph Based Multiple Test Procedures. R package version 0.8-15, https://cran.r-project.org/package=gMCP.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_generate_weights.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculate weights for the closure of a graph — graph_generate_weights","text":"","code":"par_gate <- graph_create( hypotheses = c(.5, .5, 0, 0), transitions = rbind( c(0, 0, 1, 0), c(0, 0, 0, 1), c(0, 1, 0, 0), c(1, 0, 0, 0) ) ) graph_generate_weights(par_gate) #> H1 H2 H3 H4 H1 H2 H3 H4 #> 1 1 1 1 1 0.5 0.5 0.0 0.0 #> 2 1 1 1 0 0.5 0.5 0.0 0.0 #> 3 1 1 0 1 0.5 0.5 0.0 0.0 #> 4 1 1 0 0 0.5 0.5 0.0 0.0 #> 5 1 0 1 1 0.5 0.0 0.0 0.5 #> 6 1 0 1 0 1.0 0.0 0.0 0.0 #> 7 1 0 0 1 0.5 0.0 0.0 0.5 #> 8 1 0 0 0 1.0 0.0 0.0 0.0 #> 9 0 1 1 1 0.0 0.5 0.5 0.0 #> 10 0 1 1 0 0.0 0.5 0.5 0.0 #> 11 0 1 0 1 0.0 1.0 0.0 0.0 #> 12 0 1 0 0 0.0 1.0 0.0 0.0 #> 13 0 0 1 1 0.0 0.0 0.5 0.5 #> 14 0 0 1 0 0.0 0.0 1.0 0.0 #> 15 0 0 0 1 0.0 0.0 0.0 1.0"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_rejection_orderings.html","id":null,"dir":"Reference","previous_headings":"","what":"Find alternate rejection orderings for shortcut testing — graph_rejection_orderings","title":"Find alternate rejection orderings for shortcut testing — graph_rejection_orderings","text":"using graph_test_shortcut(), may multiple hypotheses can rejected step. specific hypothesis chosen decided based minimum adjusted p-value. function shows every order deletes hypotheses, hypothesis still valid deletion step chosen.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_rejection_orderings.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find alternate rejection orderings for shortcut testing — graph_rejection_orderings","text":"","code":"graph_rejection_orderings(shortcut_test_result)"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_rejection_orderings.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find alternate rejection orderings for shortcut testing — graph_rejection_orderings","text":"shortcut_test_result graph_report object returned graph_test_shortcut()","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_rejection_orderings.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find alternate rejection orderings for shortcut testing — graph_rejection_orderings","text":"modified graph_report object containing valid orderings deleting significant hypotheses","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_rejection_orderings.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find alternate rejection orderings for shortcut testing — graph_rejection_orderings","text":"","code":"graph <- simple_successive_2() short_res <- graph_test_shortcut(graph, c(.018, .01, .03, .004)) # Reject H1, H2, and H4 short_res$outputs$rejected #> H1 H2 H3 H4 #> TRUE TRUE FALSE TRUE # But these cannot be rejected in any order - For instance, H4 has 0 weight # in the initial graph and cannot be rejected first graph_rejection_orderings(short_res) #> #> Test parameters ($inputs) ------------------------------------------------------ #> Initial graph #> #> --- Hypothesis weights --- #> H1: 0.5 #> H2: 0.5 #> H3: 0.0 #> H4: 0.0 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 0.0 0.5 0.5 0.0 #> H2 0.5 0.0 0.0 0.5 #> H3 0.0 1.0 0.0 0.0 #> H4 1.0 0.0 0.0 0.0 #> #> Alpha = 0.025 #> #> H1 H2 H3 H4 #> Unadjusted p-values: 0.018 0.010 0.030 0.004 #> #> Test types #> bonferroni: (H1, H2, H3, H4) #> #> Test summary ($outputs) -------------------------------------------------------- #> Hypothesis Adj. P-value Reject #> H1 0.02 TRUE #> H2 0.02 TRUE #> H3 0.03 FALSE #> H4 0.02 TRUE #> #> Final updated graph after removing rejected hypotheses #> #> --- Hypothesis weights --- #> H1: NA #> H2: NA #> H3: 1 #> H4: NA #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 NA NA NA NA #> H2 NA NA NA NA #> H3 NA NA 0 NA #> H4 NA NA NA NA #> #> Alternate rejection orderings ($valid_rejection_orderings) --------------------- #> H2 H4 H1 #> 2 4 1 #> #> H2 H1 H4 #> 2 1 4 #> # Finally, intermediate graphs can be obtained by putting one of the # orderings outputs into `graph_update()` graph_update(graph, delete = c(2, 1, 4)) #> Initial graph #> #> --- Hypothesis weights --- #> H1: 0.5 #> H2: 0.5 #> H3: 0.0 #> H4: 0.0 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 0.0 0.5 0.5 0.0 #> H2 0.5 0.0 0.0 0.5 #> H3 0.0 1.0 0.0 0.0 #> H4 1.0 0.0 0.0 0.0 #> #> Updated graph after deleting hypotheses 2, 1, 4 #> #> --- Hypothesis weights --- #> H1: NA #> H2: NA #> H3: 1 #> H4: NA #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 NA NA NA NA #> H2 NA NA NA NA #> H3 NA NA 0 NA #> H4 NA NA NA NA #> #> Deletion sequence ($intermediate_graphs) --------------------------------------- #> #> Initial graph #> #> --- Hypothesis weights --- #> H1: 0.5 #> H2: 0.5 #> H3: 0.0 #> H4: 0.0 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 0.0 0.5 0.5 0.0 #> H2 0.5 0.0 0.0 0.5 #> H3 0.0 1.0 0.0 0.0 #> H4 1.0 0.0 0.0 0.0 #> #> Step 1: Updated graph after removing hypothesis 2 #> #> --- Hypothesis weights --- #> H1: 0.75 #> H2: NA #> H3: 0.00 #> H4: 0.25 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 0.000000 NA 0.666667 0.333333 #> H2 NA NA NA NA #> H3 0.500000 NA 0.000000 0.500000 #> H4 1.000000 NA 0.000000 0.000000 #> #> Step 2: Updated graph after removing hypotheses 2, 1 #> #> --- Hypothesis weights --- #> H1: NA #> H2: NA #> H3: 0.5 #> H4: 0.5 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 NA NA NA NA #> H2 NA NA NA NA #> H3 NA NA 0 1 #> H4 NA NA 1 0 #> #> Step 3: Updated graph after removing hypotheses 2, 1, 4 #> #> --- Hypothesis weights --- #> H1: NA #> H2: NA #> H3: 1 #> H4: NA #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 NA NA NA NA #> H2 NA NA NA NA #> H3 NA NA 0 NA #> H4 NA NA NA NA #> #> Final updated graph after removing deleted hypotheses #> #> --- Hypothesis weights --- #> H1: NA #> H2: NA #> H3: 1 #> H4: NA #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 NA NA NA NA #> H2 NA NA NA NA #> H3 NA NA 0 NA #> H4 NA NA NA NA #>"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_update.html","id":null,"dir":"Reference","previous_headings":"","what":"Delete hypotheses from a graph — graph_update","title":"Delete hypotheses from a graph — graph_update","text":"always obvious graph's weights look like deleting one hypotheses. graph_generate_weights() calculates sub-graphs' hypothesis weights, graph_update() gives detailed view single set deletions, including transition weights well.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_update.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Delete hypotheses from a graph — graph_update","text":"","code":"graph_update(graph, delete)"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_update.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Delete hypotheses from a graph — graph_update","text":"graph initial graph returned graph_create() delete logical integer vector, denoting hypotheses keep/delete. logical vector must match size graph, one entry per hypothesis, results \"unordered mode,\" selected hypotheses deleted sequential order. integer vector can length, must contain valid hypothesis numbers (greater 0, less equal size graph). trigger \"ordered mode,\" selected hypotheses deleted order appear delete","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_update.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Delete hypotheses from a graph — graph_update","text":"object class updated_graph 3 elements initial graph object Boolean vector indicating hypotheses kept/deleted updated graph object specific hypotheses deleted","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_update.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Delete hypotheses from a graph — graph_update","text":"Bretz, F., Maurer, W., Brannath, W., Posch, M. (2009). graphical approach sequentially rejective multiple test procedures. Statistics Medicine, 28(4), 586–604. https://doi.org/10.1002/sim.3495 Bretz, F., Maurer, W., Hommel, G. (2011). Test power considerations multiple endpoint analyses using sequentially rejective graphical procedures. Statistics Medicine, 30(13), 1489–1501. https://doi.org/10.1002/sim.3988 Bretz, F., Posch, M., Glimm, E., Klinglmueller, F., Maurer, W., Rohmeyer, K. (2011). Graphical approaches multiple comparison procedures using weighted Bonferroni, Simes, parametric tests. Biometrical Journal, 53(6), 894–913. https://doi.org/10.1002/bimj.201000239 Lu, K. (2016). Graphical approaches using Bonferroni mixture weighted Simes tests. Statistics Medicine, 35(22), 4041–4055. https://doi.org/10.1002/sim.6985 Xi, D., Glimm, E., Maurer, W., Bretz, F. (2017). unified framework weighted parametric multiple test procedures. Biometrical Journal, 59(5), 918–931. https://doi.org/10.1002/bimj.201600233 Xi, D., Bretz, F. (2019). Symmetric graphs equally weighted tests, application Hochberg procedure. Statistics Medicine, 38(27), 5268–5282. https://doi.org/10.1002/sim.8375 Rohmeyer K, Klinglmueller F (2020). gMCP: Graph Based Multiple Test Procedures. R package version 0.8-15, https://cran.r-project.org/package=gMCP.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_update.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Delete hypotheses from a graph — graph_update","text":"","code":"hypotheses <- c(0.5, 0.5, 0, 0) transitions <- rbind( c(0, 0, 1, 0), c(0, 0, 0, 1), c(0, 1, 0, 0), c(1, 0, 0, 0) ) g <- graph_create(hypotheses, transitions) # Delete the second hypothesis graph_update(g, c(TRUE, FALSE, TRUE, TRUE)) #> Initial graph #> #> --- Hypothesis weights --- #> H1: 0.5 #> H2: 0.5 #> H3: 0.0 #> H4: 0.0 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 0 0 1 0 #> H2 0 0 0 1 #> H3 0 1 0 0 #> H4 1 0 0 0 #> #> Updated graph after deleting hypotheses 1, 3, 4 #> #> --- Hypothesis weights --- #> H1: NA #> H2: 1 #> H3: NA #> H4: NA #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 NA NA NA NA #> H2 NA 0 NA NA #> H3 NA NA NA NA #> H4 NA NA NA NA # Equivalent # graph_update(g, 2)"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graphicalMCP-package.html","id":null,"dir":"Reference","previous_headings":"","what":"graphicalMCP: Graphical Approach for Multiple Comparison Procedures — graphicalMCP-package","title":"graphicalMCP: Graphical Approach for Multiple Comparison Procedures — graphicalMCP-package","text":"multiple comparison procedure (multiple test procedure) statistical analysis method determining efficacy multiple drugs, multiple doses drug, single clinical trial. (Bretz et al., 2011) laid graph-based approach multiple comparison procedures, weights vertices edges graph determined independently particular statistical test used assess results. low-dependency implementation methods described subsequent papers.","code":""},{"path":[]},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graphicalMCP-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"graphicalMCP: Graphical Approach for Multiple Comparison Procedures — graphicalMCP-package","text":"Maintainer: Dong Xi dong.xi@gilead.com Authors: Ethan Brockmann ethan.brockmann@atorusresearch.com contributors: Gilead Biostatistics [copyright holder, funder] Atorus Research LLC [copyright holder]","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/plot.initial_graph.html","id":null,"dir":"Reference","previous_headings":"","what":"S3 plot method for the class initial_graph — plot.initial_graph","title":"S3 plot method for the class initial_graph — plot.initial_graph","text":"S3 plot method class initial_graph","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/plot.initial_graph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"S3 plot method for the class initial_graph — plot.initial_graph","text":"","code":"# S3 method for initial_graph plot( x, ..., layout = \"grid\", nrow = NULL, ncol = NULL, edge_curves = NULL, precision = 4, eps = NULL, background_color = \"white\", margins = c(0, 0, 0, 0) )"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/plot.initial_graph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"S3 plot method for the class initial_graph — plot.initial_graph","text":"x initial graph returned graph_create() ... arguments passed igraph::plot.igraph() layout igraph layout specification (See ?igraph.plotting), \"grid\", lays hypotheses left--right, top--bottom nrow rows ncol columns. nrow integer scalar specifying number rows vertex grid. row columns counts specified, vertices laid close square possible. ncol integer scalar specifying number columns vertex grid. row columns counts specified, vertices laid close square possible. edge_curves named numeric vector specifying curvature edges. Edge pairs (two vertices share edge possible direction) detected automatically get 0.25 curvature. Adjust edges adding entry name \"vertex1|vertex2. Adjust default edge pairs curvature adding entry name \"pairs\". precision integer scalar specifying many decimal places displayed weights eps numeric scalar. Edge weights 0 eps displayed \\(\\epsilon\\), edge weights 1 - eps 1 displayed \\(1 - \\epsilon\\) background_color character scalar specifying background color whole plotting area. Passed directly graphics::par() (bg) margins length 4 numeric vector specifying margins plot. Defaults 0, since igraph plots tend large margins. passed directly graphics::par() (mar)","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/plot.initial_graph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"S3 plot method for the class initial_graph — plot.initial_graph","text":"NULL, plotting graph","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/plot.initial_graph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"S3 plot method for the class initial_graph — plot.initial_graph","text":"","code":"plot(simple_successive_2(), layout = \"grid\")"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/plot.updated_graph.html","id":null,"dir":"Reference","previous_headings":"","what":"S3 plot method for the class updated_graph — plot.updated_graph","title":"S3 plot method for the class updated_graph — plot.updated_graph","text":"S3 plot method class updated_graph","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/plot.updated_graph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"S3 plot method for the class updated_graph — plot.updated_graph","text":"","code":"# S3 method for updated_graph plot(x, ...)"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/plot.updated_graph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"S3 plot method for the class updated_graph — plot.updated_graph","text":"x updated_graph object returned graph_update() ... Arguments passed plot.initial_graph layout igraph layout specification (See ?igraph.plotting), \"grid\", lays hypotheses left--right, top--bottom nrow rows ncol columns. nrow integer scalar specifying number rows vertex grid. row columns counts specified, vertices laid close square possible. ncol integer scalar specifying number columns vertex grid. row columns counts specified, vertices laid close square possible. edge_curves named numeric vector specifying curvature edges. Edge pairs (two vertices share edge possible direction) detected automatically get 0.25 curvature. Adjust edges adding entry name \"vertex1|vertex2. Adjust default edge pairs curvature adding entry name \"pairs\". precision integer scalar specifying many decimal places displayed weights eps numeric scalar. Edge weights 0 eps displayed \\(\\epsilon\\), edge weights 1 - eps 1 displayed \\(1 - \\epsilon\\) background_color character scalar specifying background color whole plotting area. Passed directly graphics::par() (bg) margins length 4 numeric vector specifying margins plot. Defaults 0, since igraph plots tend large margins. passed directly graphics::par() (mar)","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/plot.updated_graph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"S3 plot method for the class updated_graph — plot.updated_graph","text":"NULL, plotting graph","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/plot.updated_graph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"S3 plot method for the class updated_graph — plot.updated_graph","text":"","code":"plot( graph_update( simple_successive_2(), c(TRUE, FALSE, TRUE, TRUE) ), layout = \"grid\" )"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/print.graph_report.html","id":null,"dir":"Reference","previous_headings":"","what":"S3 print method for class graph_report — print.graph_report","title":"S3 print method for class graph_report — print.graph_report","text":"graph report displays initial graph tested, p-values & alpha used tests, hypotheses can rejected, Detailed test results matrix, including results graph_generate_weights() & test results intersection hypothesis","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/print.graph_report.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"S3 print method for class graph_report — print.graph_report","text":"","code":"# S3 method for graph_report print(x, ..., precision = 4, indent = 2, rows = 10)"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/print.graph_report.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"S3 print method for class graph_report — print.graph_report","text":"x object class graph_report print ... values passed methods (currently unused) precision integer scalar indicating maximum number decimals include numeric values indent integer scalar indicating many spaces indent results rows integer scalar indicating many rows verbose test values output print","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/print.initial_graph.html","id":null,"dir":"Reference","previous_headings":"","what":"S3 print method for the class initial_graph — print.initial_graph","title":"S3 print method for the class initial_graph — print.initial_graph","text":"printed initial_graph displays header stating object , hypothesis weights, transition weights.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/print.initial_graph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"S3 print method for the class initial_graph — print.initial_graph","text":"","code":"# S3 method for initial_graph print(x, ..., precision = 4, indent = 0, title = \"Initial graph\")"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/print.initial_graph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"S3 print method for the class initial_graph — print.initial_graph","text":"x object class initial_graph print ... values passed methods (currently unused) precision integer scalar indicating maximum number decimals include numeric values indent integer scalar indicating many spaces indent results title First line printing, used internally distinguish initial graphs updated graphs","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/print.power_report.html","id":null,"dir":"Reference","previous_headings":"","what":"S3 print method for class power_report — print.power_report","title":"S3 print method for class power_report — print.power_report","text":"power report displays initial graph tested, Testing simulation options, Final power calculations, (Partial) Detailed p-values test results - underlying object contains full tables","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/print.power_report.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"S3 print method for class power_report — print.power_report","text":"","code":"# S3 method for power_report print(x, ..., precision = 4, indent = 2, rows = 10)"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/print.power_report.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"S3 print method for class power_report — print.power_report","text":"x object class power_report print ... values passed methods (currently unused) precision integer scalar indicating maximum number decimals include numeric values indent integer scalar indicating many spaces indent results rows integer scalar indicating many rows verbose output print","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/print.updated_graph.html","id":null,"dir":"Reference","previous_headings":"","what":"S3 print method for class updated_graph — print.updated_graph","title":"S3 print method for class updated_graph — print.updated_graph","text":"printed updated_graph displays initial graph, vector keep/delete hypotheses, updated graph","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/print.updated_graph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"S3 print method for class updated_graph — print.updated_graph","text":"","code":"# S3 method for updated_graph print(x, ..., precision = 6, indent = 2)"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/print.updated_graph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"S3 print method for class updated_graph — print.updated_graph","text":"x object class updated_graph print ... values passed methods (currently unused) precision integer scalar indicating maximum number decimals include numeric values indent integer scalar indicating many spaces indent results","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/testing-fast.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate hypothesis rejection results efficiently — graph_test_closure_fast","title":"Calculate hypothesis rejection results efficiently — graph_test_closure_fast","text":"insight nice reporting, prefer graph_test_closure() graph_test_shortcut() options. reasonably fast interactive use. However order minimize power run time, efficient testing functions available. power simulation can segmented certain parts, like generating weights calculating adjusted weights, can done single time. closure testing function stripped just vectorized lines efficiency. separate optimized function available testing graph Bonferroni sequential shortcut.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/testing-fast.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate hypothesis rejection results efficiently — graph_test_closure_fast","text":"","code":"graph_test_closure_fast(p, alpha, adjusted_weights, matrix_intersections) graph_test_shortcut_fast(p, alpha, adjusted_weights)"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/testing-fast.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate hypothesis rejection results efficiently — graph_test_closure_fast","text":"p numeric vector p-values alpha numeric scalar specifying global significance level testing adjusted_weights weights (second half columns) graph_generate_weights() output, adjusted appropriate testing algorithm (Bonferroni, Simes, parametric) graph initial graph returned graph_create() intersections first half columns graph_generate_weights() output, indicating hypotheses contained intersection","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/testing-fast.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate hypothesis rejection results efficiently — graph_test_closure_fast","text":"logical integer vector results indicating whether hypothesis can accepted rejected globally.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/testing-fast.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Calculate hypothesis rejection results efficiently — graph_test_closure_fast","text":"Bretz, F., Maurer, W., Brannath, W., Posch, M. (2009). graphical approach sequentially rejective multiple test procedures. Statistics Medicine, 28(4), 586–604. https://doi.org/10.1002/sim.3495 Bretz, F., Maurer, W., Hommel, G. (2011). Test power considerations multiple endpoint analyses using sequentially rejective graphical procedures. Statistics Medicine, 30(13), 1489–1501. https://doi.org/10.1002/sim.3988 Bretz, F., Posch, M., Glimm, E., Klinglmueller, F., Maurer, W., Rohmeyer, K. (2011). Graphical approaches multiple comparison procedures using weighted Bonferroni, Simes, parametric tests. Biometrical Journal, 53(6), 894–913. https://doi.org/10.1002/bimj.201000239 Lu, K. (2016). Graphical approaches using Bonferroni mixture weighted Simes tests. Statistics Medicine, 35(22), 4041–4055. https://doi.org/10.1002/sim.6985 Xi, D., Glimm, E., Maurer, W., Bretz, F. (2017). unified framework weighted parametric multiple test procedures. Biometrical Journal, 59(5), 918–931. https://doi.org/10.1002/bimj.201600233 Xi, D., Bretz, F. (2019). Symmetric graphs equally weighted tests, application Hochberg procedure. Statistics Medicine, 38(27), 5268–5282. https://doi.org/10.1002/sim.8375 Rohmeyer K, Klinglmueller F (2020). gMCP: Graph Based Multiple Test Procedures. R package version 0.8-15, https://cran.r-project.org/package=gMCP.","code":""},{"path":[]},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/testing-fast.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculate hypothesis rejection results efficiently — graph_test_closure_fast","text":"","code":"par_gate <- simple_successive_1() num_hyps <- length(par_gate$hypotheses) p <- c(.001, .02, .002, .03) weighting_strategy <- graph_generate_weights(par_gate) intersections <- weighting_strategy[, seq_len(num_hyps), drop = FALSE] adjusted_weights <- weighting_strategy[, seq_len(num_hyps) + num_hyps, drop = FALSE] graphicalMCP:::graph_test_closure_fast( p, .025, adjusted_weights, intersections ) #> H1 H2 H3 H4 #> TRUE TRUE TRUE FALSE graphicalMCP:::graph_test_shortcut_fast( p, .025, adjusted_weights ) #> H1 H2 H3 H4 #> TRUE TRUE TRUE FALSE"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/testing.html","id":null,"dir":"Reference","previous_headings":"","what":"Report details of hypothesis rejections — graph_test_closure","title":"Report details of hypothesis rejections — graph_test_closure","text":"slower graph testing functions design choices made favor ease interpreting results speed. Results include hypothesis rejection decisions, also test values led final result. functions include options reporting details using adjusted p-value method adjusted weight method.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/testing.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Report details of hypothesis rejections — graph_test_closure","text":"","code":"graph_test_closure( graph, p, alpha = 0.025, test_groups = list(seq_along(graph$hypotheses)), test_types = c(\"bonferroni\"), test_corr = rep(list(NA), length(test_types)), verbose = FALSE, test_values = FALSE ) graph_test_shortcut( graph, p, alpha = 0.025, verbose = FALSE, test_values = FALSE )"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/testing.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Report details of hypothesis rejections — graph_test_closure","text":"graph initial graph returned graph_create() p numeric vector p-values alpha numeric scalar specifying global significance level testing test_groups list numeric vectors specifying hypotheses test together test_types character vector tests apply given groups test_corr (Optional) numeric matrix correlations hypotheses' test statistics verbose logical scalar specifying whether results intersection hypothesis included test_values logical scalar specifying whether hypothesis-level detail included results, including calculating adjusted weights parametric tests","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/testing.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Report details of hypothesis rejections — graph_test_closure","text":"graph_report object, list 4 elements: inputs, outputs, details, test_values Inputs - list input parameters used run test Outputs - list global test results Details - matrix detailed adjusted p-value results (graph deletion sequence shortcut testing) Test values - data frame hypothesis-level test details intersection (step shortcut testing)","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/testing.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Report details of hypothesis rejections — graph_test_closure","text":"Bretz, F., Maurer, W., Brannath, W., Posch, M. (2009). graphical approach sequentially rejective multiple test procedures. Statistics Medicine, 28(4), 586–604. https://doi.org/10.1002/sim.3495 Bretz, F., Maurer, W., Hommel, G. (2011). Test power considerations multiple endpoint analyses using sequentially rejective graphical procedures. Statistics Medicine, 30(13), 1489–1501. https://doi.org/10.1002/sim.3988 Bretz, F., Posch, M., Glimm, E., Klinglmueller, F., Maurer, W., Rohmeyer, K. (2011). Graphical approaches multiple comparison procedures using weighted Bonferroni, Simes, parametric tests. Biometrical Journal, 53(6), 894–913. https://doi.org/10.1002/bimj.201000239 Lu, K. (2016). Graphical approaches using Bonferroni mixture weighted Simes tests. Statistics Medicine, 35(22), 4041–4055. https://doi.org/10.1002/sim.6985 Xi, D., Glimm, E., Maurer, W., Bretz, F. (2017). unified framework weighted parametric multiple test procedures. Biometrical Journal, 59(5), 918–931. https://doi.org/10.1002/bimj.201600233 Xi, D., Bretz, F. (2019). Symmetric graphs equally weighted tests, application Hochberg procedure. Statistics Medicine, 38(27), 5268–5282. https://doi.org/10.1002/sim.8375 Rohmeyer K, Klinglmueller F (2020). gMCP: Graph Based Multiple Test Procedures. R package version 0.8-15, https://cran.r-project.org/package=gMCP.","code":""},{"path":[]},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/testing.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Report details of hypothesis rejections — graph_test_closure","text":"","code":"hypotheses <- c(0.5, 0.5, 0, 0) transitions <- rbind( c(0, 0, 1, 0), c(0, 0, 0, 1), c(0, 1, 0, 0), c(1, 0, 0, 0) ) g <- graph_create(hypotheses, transitions) p <- c(.01, .005, .015, .022) test_corr <- list(NA, matrix(c(1, .5, .5, 1), nrow = 2, byrow = TRUE)) # The default is all Bonferroni with alpha = .025 graph_test_closure(g, p) #> #> Test parameters ($inputs) ------------------------------------------------------ #> Initial graph #> #> --- Hypothesis weights --- #> H1: 0.5 #> H2: 0.5 #> H3: 0.0 #> H4: 0.0 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 0 0 1 0 #> H2 0 0 0 1 #> H3 0 1 0 0 #> H4 1 0 0 0 #> #> Alpha = 0.025 #> #> H1 H2 H3 H4 #> Unadjusted p-values: 0.010 0.005 0.015 0.022 #> #> Test types #> bonferroni: (H1, H2, H3, H4) #> #> Test summary ($outputs) -------------------------------------------------------- #> Hypothesis Adj. P-value Reject #> H1 0.02 TRUE #> H2 0.01 TRUE #> H3 0.03 FALSE #> H4 0.03 FALSE #> #> Final updated graph after removing rejected hypotheses #> #> --- Hypothesis weights --- #> H1: NA #> H2: NA #> H3: 0.5 #> H4: 0.5 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 NA NA NA NA #> H2 NA NA NA NA #> H3 NA NA 0 1 #> H4 NA NA 1 0 #> # But tests can be specified at the hypothesis-level graph_test_closure( graph = g, p = p, alpha = .025, test_groups = list(1:2, 3:4), test_types = c(\"bonferroni\", \"parametric\"), test_corr = test_corr ) #> #> Test parameters ($inputs) ------------------------------------------------------ #> Initial graph #> #> --- Hypothesis weights --- #> H1: 0.5 #> H2: 0.5 #> H3: 0.0 #> H4: 0.0 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 0 0 1 0 #> H2 0 0 0 1 #> H3 0 1 0 0 #> H4 1 0 0 0 #> #> Alpha = 0.025 #> #> H1 H2 H3 H4 #> Unadjusted p-values: 0.010 0.005 0.015 0.022 #> #> Correlation matrix: H3 H4 #> H3 1.0 0.5 #> H4 0.5 1.0 #> #> Test types #> bonferroni: (H1, H2) #> parametric: (H3, H4) #> #> Test summary ($outputs) -------------------------------------------------------- #> Hypothesis Adj. P-value Reject #> H1 0.02000 TRUE #> H2 0.01000 TRUE #> H3 0.02773 FALSE #> H4 0.02773 FALSE #> #> Final updated graph after removing rejected hypotheses #> #> --- Hypothesis weights --- #> H1: NA #> H2: NA #> H3: 0.5 #> H4: 0.5 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 NA NA NA NA #> H2 NA NA NA NA #> H3 NA NA 0 1 #> H4 NA NA 1 0 #>"}]
+[{"path":"https://urban-sniffle-p11zlpj.pages.github.io/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"GNU General Public License","title":"GNU General Public License","text":"Version 3, 29 June 2007Copyright © 2007 Free Software Foundation, Inc. Everyone permitted copy distribute verbatim copies license document, changing allowed.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/LICENSE.html","id":"preamble","dir":"","previous_headings":"","what":"Preamble","title":"GNU General Public License","text":"GNU General Public License free, copyleft license software kinds works. licenses software practical works designed take away freedom share change works. contrast, GNU General Public License intended guarantee freedom share change versions program–make sure remains free software users. , Free Software Foundation, use GNU General Public License software; applies also work released way authors. can apply programs, . speak free software, referring freedom, price. General Public Licenses designed make sure freedom distribute copies free software (charge wish), receive source code can get want , can change software use pieces new free programs, know can things. protect rights, need prevent others denying rights asking surrender rights. Therefore, certain responsibilities distribute copies software, modify : responsibilities respect freedom others. example, distribute copies program, whether gratis fee, must pass recipients freedoms received. must make sure , , receive can get source code. must show terms know rights. Developers use GNU GPL protect rights two steps: (1) assert copyright software, (2) offer License giving legal permission copy, distribute /modify . developers’ authors’ protection, GPL clearly explains warranty free software. users’ authors’ sake, GPL requires modified versions marked changed, problems attributed erroneously authors previous versions. devices designed deny users access install run modified versions software inside , although manufacturer can . fundamentally incompatible aim protecting users’ freedom change software. systematic pattern abuse occurs area products individuals use, precisely unacceptable. Therefore, designed version GPL prohibit practice products. problems arise substantially domains, stand ready extend provision domains future versions GPL, needed protect freedom users. Finally, every program threatened constantly software patents. States allow patents restrict development use software general-purpose computers, , wish avoid special danger patents applied free program make effectively proprietary. prevent , GPL assures patents used render program non-free. precise terms conditions copying, distribution modification follow.","code":""},{"path":[]},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/LICENSE.html","id":"id_0-definitions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"0. Definitions","title":"GNU General Public License","text":"“License” refers version 3 GNU General Public License. “Copyright” also means copyright-like laws apply kinds works, semiconductor masks. “Program” refers copyrightable work licensed License. licensee addressed “”. “Licensees” “recipients” may individuals organizations. “modify” work means copy adapt part work fashion requiring copyright permission, making exact copy. resulting work called “modified version” earlier work work “based ” earlier work. “covered work” means either unmodified Program work based Program. “propagate” work means anything , without permission, make directly secondarily liable infringement applicable copyright law, except executing computer modifying private copy. Propagation includes copying, distribution (without modification), making available public, countries activities well. “convey” work means kind propagation enables parties make receive copies. Mere interaction user computer network, transfer copy, conveying. interactive user interface displays “Appropriate Legal Notices” extent includes convenient prominently visible feature (1) displays appropriate copyright notice, (2) tells user warranty work (except extent warranties provided), licensees may convey work License, view copy License. interface presents list user commands options, menu, prominent item list meets criterion.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/LICENSE.html","id":"id_1-source-code","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"1. Source Code","title":"GNU General Public License","text":"“source code” work means preferred form work making modifications . “Object code” means non-source form work. “Standard Interface” means interface either official standard defined recognized standards body, , case interfaces specified particular programming language, one widely used among developers working language. “System Libraries” executable work include anything, work whole, () included normal form packaging Major Component, part Major Component, (b) serves enable use work Major Component, implement Standard Interface implementation available public source code form. “Major Component”, context, means major essential component (kernel, window system, ) specific operating system () executable work runs, compiler used produce work, object code interpreter used run . “Corresponding Source” work object code form means source code needed generate, install, (executable work) run object code modify work, including scripts control activities. However, include work’s System Libraries, general-purpose tools generally available free programs used unmodified performing activities part work. example, Corresponding Source includes interface definition files associated source files work, source code shared libraries dynamically linked subprograms work specifically designed require, intimate data communication control flow subprograms parts work. Corresponding Source need include anything users can regenerate automatically parts Corresponding Source. Corresponding Source work source code form work.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/LICENSE.html","id":"id_2-basic-permissions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"2. Basic Permissions","title":"GNU General Public License","text":"rights granted License granted term copyright Program, irrevocable provided stated conditions met. License explicitly affirms unlimited permission run unmodified Program. output running covered work covered License output, given content, constitutes covered work. License acknowledges rights fair use equivalent, provided copyright law. may make, run propagate covered works convey, without conditions long license otherwise remains force. may convey covered works others sole purpose make modifications exclusively , provide facilities running works, provided comply terms License conveying material control copyright. thus making running covered works must exclusively behalf, direction control, terms prohibit making copies copyrighted material outside relationship . Conveying circumstances permitted solely conditions stated . Sublicensing allowed; section 10 makes unnecessary.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/LICENSE.html","id":"id_3-protecting-users-legal-rights-from-anti-circumvention-law","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"3. Protecting Users’ Legal Rights From Anti-Circumvention Law","title":"GNU General Public License","text":"covered work shall deemed part effective technological measure applicable law fulfilling obligations article 11 WIPO copyright treaty adopted 20 December 1996, similar laws prohibiting restricting circumvention measures. convey covered work, waive legal power forbid circumvention technological measures extent circumvention effected exercising rights License respect covered work, disclaim intention limit operation modification work means enforcing, work’s users, third parties’ legal rights forbid circumvention technological measures.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/LICENSE.html","id":"id_4-conveying-verbatim-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"4. Conveying Verbatim Copies","title":"GNU General Public License","text":"may convey verbatim copies Program’s source code receive , medium, provided conspicuously appropriately publish copy appropriate copyright notice; keep intact notices stating License non-permissive terms added accord section 7 apply code; keep intact notices absence warranty; give recipients copy License along Program. may charge price price copy convey, may offer support warranty protection fee.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/LICENSE.html","id":"id_5-conveying-modified-source-versions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"5. Conveying Modified Source Versions","title":"GNU General Public License","text":"may convey work based Program, modifications produce Program, form source code terms section 4, provided also meet conditions: ) work must carry prominent notices stating modified , giving relevant date. b) work must carry prominent notices stating released License conditions added section 7. requirement modifies requirement section 4 “keep intact notices”. c) must license entire work, whole, License anyone comes possession copy. License therefore apply, along applicable section 7 additional terms, whole work, parts, regardless packaged. License gives permission license work way, invalidate permission separately received . d) work interactive user interfaces, must display Appropriate Legal Notices; however, Program interactive interfaces display Appropriate Legal Notices, work need make . compilation covered work separate independent works, nature extensions covered work, combined form larger program, volume storage distribution medium, called “aggregate” compilation resulting copyright used limit access legal rights compilation’s users beyond individual works permit. Inclusion covered work aggregate cause License apply parts aggregate.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/LICENSE.html","id":"id_6-conveying-non-source-forms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"6. Conveying Non-Source Forms","title":"GNU General Public License","text":"may convey covered work object code form terms sections 4 5, provided also convey machine-readable Corresponding Source terms License, one ways: ) Convey object code , embodied , physical product (including physical distribution medium), accompanied Corresponding Source fixed durable physical medium customarily used software interchange. b) Convey object code , embodied , physical product (including physical distribution medium), accompanied written offer, valid least three years valid long offer spare parts customer support product model, give anyone possesses object code either (1) copy Corresponding Source software product covered License, durable physical medium customarily used software interchange, price reasonable cost physically performing conveying source, (2) access copy Corresponding Source network server charge. c) Convey individual copies object code copy written offer provide Corresponding Source. alternative allowed occasionally noncommercially, received object code offer, accord subsection 6b. d) Convey object code offering access designated place (gratis charge), offer equivalent access Corresponding Source way place charge. need require recipients copy Corresponding Source along object code. place copy object code network server, Corresponding Source may different server (operated third party) supports equivalent copying facilities, provided maintain clear directions next object code saying find Corresponding Source. Regardless server hosts Corresponding Source, remain obligated ensure available long needed satisfy requirements. e) Convey object code using peer--peer transmission, provided inform peers object code Corresponding Source work offered general public charge subsection 6d. separable portion object code, whose source code excluded Corresponding Source System Library, need included conveying object code work. “User Product” either (1) “consumer product”, means tangible personal property normally used personal, family, household purposes, (2) anything designed sold incorporation dwelling. determining whether product consumer product, doubtful cases shall resolved favor coverage. particular product received particular user, “normally used” refers typical common use class product, regardless status particular user way particular user actually uses, expects expected use, product. product consumer product regardless whether product substantial commercial, industrial non-consumer uses, unless uses represent significant mode use product. “Installation Information” User Product means methods, procedures, authorization keys, information required install execute modified versions covered work User Product modified version Corresponding Source. information must suffice ensure continued functioning modified object code case prevented interfered solely modification made. convey object code work section , , specifically use , User Product, conveying occurs part transaction right possession use User Product transferred recipient perpetuity fixed term (regardless transaction characterized), Corresponding Source conveyed section must accompanied Installation Information. requirement apply neither third party retains ability install modified object code User Product (example, work installed ROM). requirement provide Installation Information include requirement continue provide support service, warranty, updates work modified installed recipient, User Product modified installed. Access network may denied modification materially adversely affects operation network violates rules protocols communication across network. Corresponding Source conveyed, Installation Information provided, accord section must format publicly documented (implementation available public source code form), must require special password key unpacking, reading copying.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/LICENSE.html","id":"id_7-additional-terms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"7. Additional Terms","title":"GNU General Public License","text":"“Additional permissions” terms supplement terms License making exceptions one conditions. Additional permissions applicable entire Program shall treated though included License, extent valid applicable law. additional permissions apply part Program, part may used separately permissions, entire Program remains governed License without regard additional permissions. convey copy covered work, may option remove additional permissions copy, part . (Additional permissions may written require removal certain cases modify work.) may place additional permissions material, added covered work, can give appropriate copyright permission. Notwithstanding provision License, material add covered work, may (authorized copyright holders material) supplement terms License terms: ) Disclaiming warranty limiting liability differently terms sections 15 16 License; b) Requiring preservation specified reasonable legal notices author attributions material Appropriate Legal Notices displayed works containing ; c) Prohibiting misrepresentation origin material, requiring modified versions material marked reasonable ways different original version; d) Limiting use publicity purposes names licensors authors material; e) Declining grant rights trademark law use trade names, trademarks, service marks; f) Requiring indemnification licensors authors material anyone conveys material (modified versions ) contractual assumptions liability recipient, liability contractual assumptions directly impose licensors authors. non-permissive additional terms considered “restrictions” within meaning section 10. Program received , part , contains notice stating governed License along term restriction, may remove term. license document contains restriction permits relicensing conveying License, may add covered work material governed terms license document, provided restriction survive relicensing conveying. add terms covered work accord section, must place, relevant source files, statement additional terms apply files, notice indicating find applicable terms. Additional terms, permissive non-permissive, may stated form separately written license, stated exceptions; requirements apply either way.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/LICENSE.html","id":"id_8-termination","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"8. Termination","title":"GNU General Public License","text":"may propagate modify covered work except expressly provided License. attempt otherwise propagate modify void, automatically terminate rights License (including patent licenses granted third paragraph section 11). However, cease violation License, license particular copyright holder reinstated () provisionally, unless copyright holder explicitly finally terminates license, (b) permanently, copyright holder fails notify violation reasonable means prior 60 days cessation. Moreover, license particular copyright holder reinstated permanently copyright holder notifies violation reasonable means, first time received notice violation License (work) copyright holder, cure violation prior 30 days receipt notice. Termination rights section terminate licenses parties received copies rights License. rights terminated permanently reinstated, qualify receive new licenses material section 10.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/LICENSE.html","id":"id_9-acceptance-not-required-for-having-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"9. Acceptance Not Required for Having Copies","title":"GNU General Public License","text":"required accept License order receive run copy Program. Ancillary propagation covered work occurring solely consequence using peer--peer transmission receive copy likewise require acceptance. However, nothing License grants permission propagate modify covered work. actions infringe copyright accept License. Therefore, modifying propagating covered work, indicate acceptance License .","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/LICENSE.html","id":"id_10-automatic-licensing-of-downstream-recipients","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"10. Automatic Licensing of Downstream Recipients","title":"GNU General Public License","text":"time convey covered work, recipient automatically receives license original licensors, run, modify propagate work, subject License. responsible enforcing compliance third parties License. “entity transaction” transaction transferring control organization, substantially assets one, subdividing organization, merging organizations. propagation covered work results entity transaction, party transaction receives copy work also receives whatever licenses work party’s predecessor interest give previous paragraph, plus right possession Corresponding Source work predecessor interest, predecessor can get reasonable efforts. may impose restrictions exercise rights granted affirmed License. example, may impose license fee, royalty, charge exercise rights granted License, may initiate litigation (including cross-claim counterclaim lawsuit) alleging patent claim infringed making, using, selling, offering sale, importing Program portion .","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/LICENSE.html","id":"id_11-patents","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"11. Patents","title":"GNU General Public License","text":"“contributor” copyright holder authorizes use License Program work Program based. work thus licensed called contributor’s “contributor version”. contributor’s “essential patent claims” patent claims owned controlled contributor, whether already acquired hereafter acquired, infringed manner, permitted License, making, using, selling contributor version, include claims infringed consequence modification contributor version. purposes definition, “control” includes right grant patent sublicenses manner consistent requirements License. contributor grants non-exclusive, worldwide, royalty-free patent license contributor’s essential patent claims, make, use, sell, offer sale, import otherwise run, modify propagate contents contributor version. following three paragraphs, “patent license” express agreement commitment, however denominated, enforce patent (express permission practice patent covenant sue patent infringement). “grant” patent license party means make agreement commitment enforce patent party. convey covered work, knowingly relying patent license, Corresponding Source work available anyone copy, free charge terms License, publicly available network server readily accessible means, must either (1) cause Corresponding Source available, (2) arrange deprive benefit patent license particular work, (3) arrange, manner consistent requirements License, extend patent license downstream recipients. “Knowingly relying” means actual knowledge , patent license, conveying covered work country, recipient’s use covered work country, infringe one identifiable patents country reason believe valid. , pursuant connection single transaction arrangement, convey, propagate procuring conveyance , covered work, grant patent license parties receiving covered work authorizing use, propagate, modify convey specific copy covered work, patent license grant automatically extended recipients covered work works based . patent license “discriminatory” include within scope coverage, prohibits exercise , conditioned non-exercise one rights specifically granted License. may convey covered work party arrangement third party business distributing software, make payment third party based extent activity conveying work, third party grants, parties receive covered work , discriminatory patent license () connection copies covered work conveyed (copies made copies), (b) primarily connection specific products compilations contain covered work, unless entered arrangement, patent license granted, prior 28 March 2007. Nothing License shall construed excluding limiting implied license defenses infringement may otherwise available applicable patent law.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/LICENSE.html","id":"id_12-no-surrender-of-others-freedom","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"12. No Surrender of Others’ Freedom","title":"GNU General Public License","text":"conditions imposed (whether court order, agreement otherwise) contradict conditions License, excuse conditions License. convey covered work satisfy simultaneously obligations License pertinent obligations, consequence may convey . example, agree terms obligate collect royalty conveying convey Program, way satisfy terms License refrain entirely conveying Program.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/LICENSE.html","id":"id_13-use-with-the-gnu-affero-general-public-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"13. Use with the GNU Affero General Public License","title":"GNU General Public License","text":"Notwithstanding provision License, permission link combine covered work work licensed version 3 GNU Affero General Public License single combined work, convey resulting work. terms License continue apply part covered work, special requirements GNU Affero General Public License, section 13, concerning interaction network apply combination .","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/LICENSE.html","id":"id_14-revised-versions-of-this-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"14. Revised Versions of this License","title":"GNU General Public License","text":"Free Software Foundation may publish revised /new versions GNU General Public License time time. new versions similar spirit present version, may differ detail address new problems concerns. version given distinguishing version number. Program specifies certain numbered version GNU General Public License “later version” applies , option following terms conditions either numbered version later version published Free Software Foundation. Program specify version number GNU General Public License, may choose version ever published Free Software Foundation. Program specifies proxy can decide future versions GNU General Public License can used, proxy’s public statement acceptance version permanently authorizes choose version Program. Later license versions may give additional different permissions. However, additional obligations imposed author copyright holder result choosing follow later version.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/LICENSE.html","id":"id_15-disclaimer-of-warranty","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"15. Disclaimer of Warranty","title":"GNU General Public License","text":"WARRANTY PROGRAM, EXTENT PERMITTED APPLICABLE LAW. EXCEPT OTHERWISE STATED WRITING COPYRIGHT HOLDERS /PARTIES PROVIDE PROGRAM “” WITHOUT WARRANTY KIND, EITHER EXPRESSED IMPLIED, INCLUDING, LIMITED , IMPLIED WARRANTIES MERCHANTABILITY FITNESS PARTICULAR PURPOSE. ENTIRE RISK QUALITY PERFORMANCE PROGRAM . PROGRAM PROVE DEFECTIVE, ASSUME COST NECESSARY SERVICING, REPAIR CORRECTION.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/LICENSE.html","id":"id_16-limitation-of-liability","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"16. Limitation of Liability","title":"GNU General Public License","text":"EVENT UNLESS REQUIRED APPLICABLE LAW AGREED WRITING COPYRIGHT HOLDER, PARTY MODIFIES /CONVEYS PROGRAM PERMITTED , LIABLE DAMAGES, INCLUDING GENERAL, SPECIAL, INCIDENTAL CONSEQUENTIAL DAMAGES ARISING USE INABILITY USE PROGRAM (INCLUDING LIMITED LOSS DATA DATA RENDERED INACCURATE LOSSES SUSTAINED THIRD PARTIES FAILURE PROGRAM OPERATE PROGRAMS), EVEN HOLDER PARTY ADVISED POSSIBILITY DAMAGES.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/LICENSE.html","id":"id_17-interpretation-of-sections-15-and-16","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"17. Interpretation of Sections 15 and 16","title":"GNU General Public License","text":"disclaimer warranty limitation liability provided given local legal effect according terms, reviewing courts shall apply local law closely approximates absolute waiver civil liability connection Program, unless warranty assumption liability accompanies copy Program return fee. END TERMS CONDITIONS","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/LICENSE.html","id":"how-to-apply-these-terms-to-your-new-programs","dir":"","previous_headings":"","what":"How to Apply These Terms to Your New Programs","title":"GNU General Public License","text":"develop new program, want greatest possible use public, best way achieve make free software everyone can redistribute change terms. , attach following notices program. safest attach start source file effectively state exclusion warranty; file least “copyright” line pointer full notice found. Also add information contact electronic paper mail. program terminal interaction, make output short notice like starts interactive mode: hypothetical commands show w show c show appropriate parts General Public License. course, program’s commands might different; GUI interface, use “box”. also get employer (work programmer) school, , sign “copyright disclaimer” program, necessary. information , apply follow GNU GPL, see . GNU General Public License permit incorporating program proprietary programs. program subroutine library, may consider useful permit linking proprietary applications library. want , use GNU Lesser General Public License instead License. first, please read .","code":" Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free software, and you are welcome to redistribute it under certain conditions; type 'show c' for details."},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/generate-closure.html","id":"what-is-the-closure","dir":"Articles","previous_headings":"","what":"What is the closure?","title":"Generating the closure of a graph","text":"closure graph set sub-graphs, along weights calculated according algorithm 1 Bretz et al (2011). primarily used closed testing, sub-graphs tested significance, results aggregated determine null hypotheses significant globally. Throughout article common example used demonstrations - simple successive graph. two primary hypotheses, \\(H_1\\) \\(H_2\\), initial weight evenly split . secondary hypotheses, \\(H_3\\) \\(H_4\\), weight propagated \\(H_1\\) \\(H_2\\) deleted, respectively.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/generate-closure.html","id":"components-of-the-closure","dir":"Articles","previous_headings":"What is the closure?","what":"Components of the closure","title":"Generating the closure of a graph","text":"graphicalMCP, closure represented matrix, row represents sub-graph (also called intersection hypothesis), column corresponds individual hypothesis. matrix can created graph_generate_weights(), two parts: indicator matrix showing hypotheses contained sub-graph (-called powerset set), weights matrix containing induced weights sub-graph.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/generate-closure.html","id":"properties-of-the-closure","dir":"Articles","previous_headings":"What is the closure?","what":"Properties of the closure","title":"Generating the closure of a graph","text":"rows closure generated particular way order give useful properties.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/generate-closure.html","id":"repeating-recursive-blocks","dir":"Articles","previous_headings":"What is the closure? > Properties of the closure","what":"Repeating recursive blocks","title":"Generating the closure of a graph","text":"First, notice row can obtained row higher matrix flipping single 1 0. example, go row 1 row 3 flipping \\(H_3\\), go row 10 row 14 flipping \\(H_2\\). upper row pairing like can thought “parent” sub-graph, lower row “child” sub-graph. Flipping 0 1 moving matrix called “finding sub-graph’s parent.” Now consider parent-finding strategy left-0 row flipped. reveals pattern bottom half top half, row’s parent bottom half corresponding row top half, eight rows . pattern repeats within box recursively, top half box matching bottom half, first missing hypothesis flipped 0 1.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/generate-closure.html","id":"binary-counting","dir":"Articles","previous_headings":"What is the closure? > Properties of the closure","what":"Binary counting","title":"Generating the closure of a graph","text":"second useful property somewhat re-framing first, perhaps viewed reason first true. Starting bottom row, powerset particular order counts 1 binary, incrementing 1 per row. means row number can directly calculated vector showing hypotheses currently deleted graph: row_number == number_of_rows - incl_excl_vec_converted_to_base_10 + 1. example, intersection number 6 hypothesis vector 1010. interpreted binary, 1 * 8 + 0 * 4 + 1 * 2 + 0 * 1 = 10 base 10, 6 == 15 - 10 + 1.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/generate-closure.html","id":"strategies","dir":"Articles","previous_headings":"","what":"Strategies","title":"Generating the closure of a graph","text":"size closure grows quickly graph size increases (n-graph 2^n - 1 sub-graphs), calculating full closure large graphs can computationally intensive. Optimizing process led three main strategies: simplest approach, uses full graph starting point every sub-graph, deletes appropriate hypotheses recursive method, traverses closure tree, deleting one hypothesis time step graphs formulaic shortcut using order graphs generated recursive method Note discussion methods focuses primarily weights side rather powerset side closure. fastest methods discovered generate powerset implicitly missing values weights side. methods simple approach, rely powerset order generate weights, powerset can created efficiently. num_hyps refers number hypotheses initial graph.","code":"powerset <- as.matrix(rev(expand.grid(rep(list(1:0), num_hyps))[-2^num_hyps, ]))"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/generate-closure.html","id":"simple-approach","dir":"Articles","previous_headings":"Strategies","what":"Simple approach","title":"Generating the closure of a graph","text":"simplest approach generate weights closure apply graph_update() initial graph sub-graph. short sweet write, ’s inefficient hypothesis gets deleted graph multiple times. code simple method.","code":"ggw_simple <- function(graph) { num_hyps <- length(graph$hypotheses) matrix_intersections <- as.matrix(rev(expand.grid(rep(list(1:0), num_hyps))[-2^num_hyps, ])) colnames(matrix_intersections) <- names(graph$hypotheses) matrix_weights <- apply( matrix_intersections, 1, function(h) graph_update(graph, !h)$updated_graph$hypotheses, simplify = FALSE ) cbind(matrix_intersections, do.call(rbind, matrix_weights)) }"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/generate-closure.html","id":"recursive","dir":"Articles","previous_headings":"Strategies","what":"Recursive","title":"Generating the closure of a graph","text":"recursive method treats space sub-graphs tree, initial graph root, sub-graphs decreasing size going branches. essence recursive step delete hypothesis current graph. every hypothesis every sub-graph tree result taking multiple paths many graphs. key part recursive step memory - graph tree delete hypotheses come hypothesis just deleted reach current graph. base case also needs memory - reached graph one hypothesis left, last-deleted hypothesis number larger current hypotheses. memory recursion enables tree traversal reach unique graph state exactly . implementation recursion, followed wrapper processing sub-graph list standard matrix form.","code":"delete_nodes_recursive <- function(graph, last = 0) { init_hypotheses <- hypotheses <- graph$hypotheses init_transitions <- transitions <- graph$transitions ### base case int_hyp <- as.integer(names(hypotheses)) is_single_node <- length(hypotheses) == 1 last_is_bigger <- last > max(int_hyp) if (is_single_node || last_is_bigger) { return(list(graph)) } ### recursive step children <- list() for (orig_hyp_num in int_hyp[int_hyp > last]) { del_index <- match(orig_hyp_num, int_hyp) hyp_nums <- seq_along(hypotheses)[seq_along(hypotheses) != del_index] for (hyp_num in hyp_nums) { hypotheses[[hyp_num]] <- init_hypotheses[[hyp_num]] + init_hypotheses[[del_index]] * init_transitions[[del_index, hyp_num]] denominator <- 1 - init_transitions[[hyp_num, del_index]] * init_transitions[[del_index, hyp_num]] for (end_num in hyp_nums) { if (hyp_num == end_num || denominator <= 0) { transitions[[hyp_num, end_num]] <- 0 } else { transitions[[hyp_num, end_num]] <- ( init_transitions[[hyp_num, end_num]] + init_transitions[[hyp_num, del_index]] * init_transitions[[del_index, end_num]] ) / denominator } } } smaller_graph <- structure( list( hypotheses = hypotheses[-del_index], transitions = as.matrix(transitions[-del_index, -del_index]) ), class = \"initial_graph\" ) children[[del_index]] <- delete_nodes_recursive( smaller_graph, orig_hyp_num ) } c( unlist(children, recursive = FALSE), list(graph) ) } ggw_recursive <- function(graph) { # The recursion requires the hypotheses to be named sequentially as actual # numbers for the memory property to work hyp_names <- names(graph$hypotheses) names(graph$hypotheses) <- seq_along(graph$hypotheses) colnames(graph$transitions) <- names(graph$hypotheses) rownames(graph$transitions) <- names(graph$hypotheses) # Recursively generate a list of all sub-graphs list_subgraphs <- delete_nodes_recursive(graph) # Process the list of graphs into the normal matrix form matrix_weights <- structure( do.call( rbind, lapply( list_subgraphs, function(graph) graph$hypotheses[as.character(seq_along(hyp_names))] ) ), dimnames = list(1:(2^length(hyp_names) - 1), hyp_names) ) matrix_intersections <- !is.na(matrix_weights) matrix_weights[is.na(matrix_weights)] <- 0 cbind(matrix_intersections, matrix_weights) }"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/generate-closure.html","id":"formula-shortcut","dir":"Articles","previous_headings":"Strategies","what":"Formula shortcut","title":"Generating the closure of a graph","text":"Finally, fastest method found far - formula shortcut. recursion can save lot time first method, still bit overhead get list sub-graphs matrix form standard. “repeating block” property closure mentioned earlier useful. Instead using recursion connect parent sub-graphs children, pair formulas can used. One formula generates parent graph obtained flipping left-0 1: .call(c, lapply(2^(seq_len(num_hyps) - 1), seq_len)). Note rows 2 (non-existent) row 16, empty graph. Row 1 parent graph. left-0 child graph easy find, parent graph’s perspective, formula calculates hypothesis delete: rep(rev(seq_len(num_hyps)), 2^(seq_len(num_hyps) - 1)). also applies rows 2 16. formula shortcut also results simpler code recursive solution.","code":""},{"path":[]},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/generate-closure.html","id":"generating-the-closure","dir":"Articles","previous_headings":"Performance gains","what":"Generating the closure","title":"Generating the closure of a graph","text":"formula method reduces step generating closure single deletion prior graph, almost additional overhead. ’s different methods fare, including version gMCP package reference. Also worthy note lrstat package, contains MCP-related functions, including generating weights closure. uses excellent C++ code perform even faster, since speed current formula-based method acceptable, adding Rcpp dependency considered worth additional time savings.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/generate-closure.html","id":"power-simulations","dir":"Articles","previous_headings":"Performance gains","what":"Power simulations","title":"Generating the closure of a graph","text":"time savings closure nice, graphs savings make big difference compared longer run-times e.g. power simulations. However, paying attention closure important reasons , improving power algorithm.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/generate-closure.html","id":"standard-algorithm","dir":"Articles","previous_headings":"Performance gains > Power simulations","what":"Standard algorithm","title":"Generating the closure of a graph","text":"typical method running Bonferroni shortcut procedure graph : Search graph single hypothesis can rejected Delete rejected hypothesis update weights Repeat significant hypotheses Running process either R low-level language like C fast single procedure, ’s run 100,000 times power simulation, R version becomes onerous. However, ’s lot duplication power simulation using method. many simulations, steps taken, means re-calculating set weights many times.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/generate-closure.html","id":"closure-shortcut","dir":"Articles","previous_headings":"Performance gains > Power simulations","what":"Closure shortcut","title":"Generating the closure of a graph","text":"binary counting property closure admits shortcut can implemented R get scalable competitor typical algorithm: Generate closure single time get sub-graph weights efficiently simulation: 1. Search graph hypotheses can rejected - fast vectorization 1. Using binary counting property, index row closure corresponding hypotheses rejected far get updated weights - substantially faster updating graph re-calculating weights, especially larger graphs 1. Repeat using updated weights method fast gMCP’s C implementation, still runs substantial power simulations matter seconds. biggest drawback can scale differently different graph structures. instance fixed sequence procedure can take longer balanced graph, like Holm procedure, takes steps reject possible hypotheses.","code":""},{"path":[]},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/graph-examples.html","id":"multiple-comparison-procedures","dir":"Articles","previous_headings":"Introduction","what":"Multiple comparison procedures","title":"Commonly-used graph examples","text":"confirmatory clinical trials multiple endpoints, valid graph can made graph_create(), patterns established time. demonstrate run patterns graphicalMCP.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/graph-examples.html","id":"bonferroni-holm","dir":"Articles","previous_headings":"","what":"Bonferroni-Holm","title":"Commonly-used graph examples","text":"","code":"transitions <- matrix(1 / 4, 5, 5) diag(transitions) <- 0 bonferroni_holm_graph <- graph_create(rep(1 / 5, 5), transitions) plot(bonferroni_holm_graph)"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/graph-examples.html","id":"fixed-sequence","dir":"Articles","previous_headings":"","what":"Fixed sequence","title":"Commonly-used graph examples","text":"","code":"fixed_sequence_graph <- graph_create( c(1, 0, 0, 0), rbind( c(0, 1, 0, 0), c(0, 0, 1, 0), c(0, 0, 0, 1), c(0, 0, 0, 0) ) ) plot(fixed_sequence_graph, layout = \"grid\", nrow = 1)"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/graph-examples.html","id":"simple-successive","dir":"Articles","previous_headings":"","what":"Simple successive","title":"Commonly-used graph examples","text":"General successive graphs good example multiple variations may useful slight differences starting edge weights. Variable edge weights currently supported, can done particular graph light wrapper. multiple variations can created compared easily.","code":"simple_successive_graph <- graph_create( c(.5, .5, 0, 0), rbind( c(0, 0, 1, 0), c(0, 0, 0, 1), c(0, 1, 0, 0), c(1, 0, 0, 0) ) ) plot(simple_successive_graph, layout = \"grid\", nrow = 2) simple_successive_var <- function(gamma) { graph_create( c(.5, .5, 0, 0), rbind( c(0, gamma, 1 - gamma, 0), c(gamma, 0, 0, 1 - gamma), c(0, 1, 0, 0), c(1, 0, 0, 0) ) ) } plot( simple_successive_var(.75), layout = \"grid\", nrow = 2, vertex.label.cex = .7, edge.label.cex = .7 ) plot( simple_successive_var(.9), layout = \"grid\", nrow = 2, vertex.label.cex = .7, edge.label.cex = .7 )"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/graph-examples.html","id":"huque-alosh-bhore-2011","dir":"Articles","previous_headings":"","what":"Huque-Alosh-Bhore (2011)","title":"Commonly-used graph examples","text":"","code":"hab_2011_graph <- graph_create( c(1, 0, 0, 0), rbind( c(0, .5, .5, 0), c(0, 0, 0, 1), c(0, .5, 0, .5), c(0, 1, 0, 0) ) ) plot(hab_2011_graph, layout = \"grid\")"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/graph-examples.html","id":"wiens-dmitrienko-2005","dir":"Articles","previous_headings":"","what":"Wiens-Dmitrienko (2005)","title":"Commonly-used graph examples","text":"","code":"wd_2005_graph <- graph_create( c(1 / 3, 1 / 3, 1 / 3), rbind( c(0, 1, 0), c(0, 0, 1), c(.5, .5, 0) ) ) plot( wd_2005_graph, layout = \"grid\", nrow = 1, edge_curves = c(pairs = -6, \"H3|H1\" = -6) )"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/graph-examples.html","id":"parallel-gate-keeping","dir":"Articles","previous_headings":"","what":"Parallel gate-keeping","title":"Commonly-used graph examples","text":"","code":"par_gate_graph <- graph_create( c(.5, .5, 0, 0), rbind( c(0, 0, .5, .5), c(0, 0, .5, .5), c(0, 0, 0, 1), c(0, 0, 1, 0) ) ) plot(par_gate_graph, layout = \"grid\", nrow = 2)"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/graph-examples.html","id":"improved-parallel-gate-keeping","dir":"Articles","previous_headings":"","what":"Improved parallel gate-keeping","title":"Commonly-used graph examples","text":"","code":"imp_par_gate_graph <- graph_create( c(.5, .5, 0, 0), rbind( c(0, 0, .5, .5), c(0, 0, .5, .5), c(.0001, 0, 0, .9999), c(0, .0001, .9999, 0) ) ) plot(imp_par_gate_graph, layout = \"grid\", nrow = 2)"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/shortuct-testing.html","id":"multiple-comparison-problem","dir":"Articles","previous_headings":"","what":"Multiple comparison problem","title":"Sequentially rejective graphical approaches based on Bonferroni tests","text":"Consider confirmatory clinical trial comparing test treatment (treatment) control treatment (control) disease. two doses treatment: low dose high dose. two endpoints included multiplicity adjustment strategy, primary endpoint (PE) secondary endpoint (SE). total, four null hypotheses: \\(H_1\\) \\(H_3\\) primary secondary hypotheses respectively low dose versus control; \\(H_2\\) \\(H_4\\) primary secondary hypotheses respectively high dose versus control. discussing appropriate multiple comparison procedures, clinical considerations, adds structure multiple comparison procedures, can flexibly incorporated using graphical approaches. First, low high doses considered equally important, means rejecting primary hypothesis either dose versus control leads successful trial. Regarding secondary hypotheses, one tested corresponding primary hypothesis rejected. means \\(H_3\\) tested \\(H_1\\) rejected; \\(H_4\\) tested \\(H_2\\) rejected. addition, statistical considerations complete graph. primary hypotheses \\(H_1\\) \\(H_2\\) equal hypothesis weight 0.5. secondary hypotheses hypothesis weight 0. primary hypothesis rejected, weight propagate along two outgoing edges: one primary hypothesis one descendant secondary hypothesis. two edges equal transition weight 0.5. primary secondary hypotheses rejected dose-control comparison, hypothesis weights propagated primary hypothesis dose-control comparison. specifications, can create following graph.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/shortuct-testing.html","id":"create-a-graph","dir":"Articles","previous_headings":"","what":"Create a graph","title":"Sequentially rejective graphical approaches based on Bonferroni tests","text":"","code":"hypotheses <- c(0.5, 0.5, 0, 0) transitions <- rbind( c(0, 0.5, 0.5, 0), c(0.5, 0, 0, 0.5), c(0, 1, 0, 0), c(1, 0, 0, 0) ) hyp_names <- c(\"H1\", \"H2\", \"H3\", \"H4\") g <- graph_create(hypotheses, transitions, hyp_names) plot(g, layout = \"grid\", vertex.size = 20)"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/shortuct-testing.html","id":"perform-the-graphical-multiple-comparison-procedure","dir":"Articles","previous_headings":"","what":"Perform the graphical multiple comparison procedure","title":"Sequentially rejective graphical approaches based on Bonferroni tests","text":"Given set p-values \\(H_1, \\ldots, H_4\\), graphical multiple comparison procedure can performed control familywise error rate (FWER) significance level alpha. graph_test_shortcut function agnostic one-sided two-sided tests. one-sided p-values, alpha often set 0.025 (default); two-sided p-values, alpha often set 0.05. consider one-sided tests . hypothesis rejected adjusted p-value less equal alpha. running procedure, hypotheses \\(H_1\\), \\(H_2\\), \\(H_4\\) rejected adjusted p-value calculated.","code":"p_values <- c(.013, .012, .105, .005) test_results <- graph_test_shortcut(g, p = p_values, alpha = 0.025) test_results$outputs # Adjusted p-values and rejections #> $adjusted_p #> H1 H2 H3 H4 #> 0.024 0.024 0.105 0.024 #> #> $rejected #> H1 H2 H3 H4 #> TRUE TRUE FALSE TRUE #> #> $graph #> Initial graph #> #> --- Hypothesis weights --- #> H1: 0 #> H2: 0 #> H3: 1 #> H4: 0 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 0 0 0 0 #> H2 0 0 0 0 #> H3 0 0 0 0 #> H4 0 0 0 0"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/shortuct-testing.html","id":"obtain-final-and-intermediate-graphs-after-rejections","dir":"Articles","previous_headings":"Perform the graphical multiple comparison procedure","what":"Obtain final and intermediate graphs after rejections","title":"Sequentially rejective graphical approaches based on Bonferroni tests","text":"addition, two graphs provided: one initial graph one final graph removing rejected hypotheses \\(H_1\\), \\(H_2\\), \\(H_4\\). also interested intermediate graphs - example, graph \\(H_1\\) \\(H_2\\) rejected - can specify verbose = TRUE. Note intermediate graphs depends order rejections, .e., sequence hypotheses rejected. default order defined increasing adjusted p-values earlier hypothesis numbering case ties adjusted p-values. Among rejected hypotheses, one smallest adjusted p-value first rejected one largest adjusted p-value last rejected. example, default order rejection \\(H_2\\rightarrow H_1\\rightarrow H_4\\). obtain intermediate graphs based order rejection, one can specify test_results_verbose$details$results. example, graph \\(H_1\\) \\(H_2\\) rejected given test_results_verbose$details$results[[3]]. order rejections may unique orders valid. example, rejected hypotheses \\(H_1\\), \\(H_2\\) \\(H_4\\). default order rejections \\(H_2 \\rightarrow H_1 \\rightarrow H_4\\). Another valid order rejections \\(H_2 \\rightarrow H_4 \\rightarrow H_1\\). However, first rejected hypothesis can \\(H_1\\) \\(H_4\\). obtain possible rejection orders, one can use function graph_rejection_orderings. Initial, intermediate final graphs can obtained using function graph_update particular order rejections. order intermediate graphs determined deleting hypothesis lowest adjusted p-values step (smaller hypothesis sequentially case adjusted p-value ties). cases, order valid order deletion. example, minimum adjusted p-value method results deleting order \\(H_2 \\rightarrow H_1 \\rightarrow H_4\\). \\(H_2 \\rightarrow H_4 \\rightarrow H_1\\) also valid deletion order. Deletion order can customized using [custom_order_function_once_it_is_written()].","code":"test_results_verbose <- graph_test_shortcut(g, p = p_values, alpha = 0.025, verbose = TRUE) test_results_verbose$details$results[[3]] # Intermediate graph after H1 and H2 rejected #> Initial graph #> #> --- Hypothesis weights --- #> H1: 0.0 #> H2: 0.0 #> H3: 0.5 #> H4: 0.5 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 0 0 0 0 #> H2 0 0 0 0 #> H3 0 0 0 1 #> H4 0 0 1 0 orders <- graph_rejection_orderings(test_results)$valid_orderings # Obtain all valid orders of rejections orders #> [[1]] #> H2 H4 H1 #> 2 4 1 #> #> [[2]] #> H2 H1 H4 #> 2 1 4 graph_update(g, delete = orders[[2]]) # Graphs following the order of H2, H4, and H1 #> Initial graph #> #> --- Hypothesis weights --- #> H1: 0.5 #> H2: 0.5 #> H3: 0.0 #> H4: 0.0 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 0.0 0.5 0.5 0.0 #> H2 0.5 0.0 0.0 0.5 #> H3 0.0 1.0 0.0 0.0 #> H4 1.0 0.0 0.0 0.0 #> #> Updated graph after deleting hypotheses 2, 1, 4 #> #> --- Hypothesis weights --- #> H1: NA #> H2: NA #> H3: 1 #> H4: NA #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 NA NA NA NA #> H2 NA NA NA NA #> H3 NA NA 0 NA #> H4 NA NA NA NA #> #> Deletion sequence ($intermediate_graphs) --------------------------------------- #> #> Initial graph #> #> --- Hypothesis weights --- #> H1: 0.5 #> H2: 0.5 #> H3: 0.0 #> H4: 0.0 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 0.0 0.5 0.5 0.0 #> H2 0.5 0.0 0.0 0.5 #> H3 0.0 1.0 0.0 0.0 #> H4 1.0 0.0 0.0 0.0 #> #> Step 1: Updated graph after removing hypothesis 2 #> #> --- Hypothesis weights --- #> H1: 0.75 #> H2: NA #> H3: 0.00 #> H4: 0.25 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 0.000000 NA 0.666667 0.333333 #> H2 NA NA NA NA #> H3 0.500000 NA 0.000000 0.500000 #> H4 1.000000 NA 0.000000 0.000000 #> #> Step 2: Updated graph after removing hypotheses 2, 1 #> #> --- Hypothesis weights --- #> H1: NA #> H2: NA #> H3: 0.5 #> H4: 0.5 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 NA NA NA NA #> H2 NA NA NA NA #> H3 NA NA 0 1 #> H4 NA NA 1 0 #> #> Step 3: Updated graph after removing hypotheses 2, 1, 4 #> #> --- Hypothesis weights --- #> H1: NA #> H2: NA #> H3: 1 #> H4: NA #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 NA NA NA NA #> H2 NA NA NA NA #> H3 NA NA 0 NA #> H4 NA NA NA NA #> #> Final updated graph after removing deleted hypotheses #> #> --- Hypothesis weights --- #> H1: NA #> H2: NA #> H3: 1 #> H4: NA #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 NA NA NA NA #> H2 NA NA NA NA #> H3 NA NA 0 NA #> H4 NA NA NA NA"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/shortuct-testing.html","id":"obtain-adjusted-significance-levels","dir":"Articles","previous_headings":"Perform the graphical multiple comparison procedure","what":"Obtain adjusted significance levels","title":"Sequentially rejective graphical approaches based on Bonferroni tests","text":"equivalent way obtain rejections adjusting significance levels. hypothesis rejected p-value less equal adjusted significance level. adjusted significance levels calculated order adjusted p-values: \\(H_2 \\rightarrow H_1 \\rightarrow H_4\\), four steps checking rejections. First, \\(H_2\\) rejected adjusted significance level 0.5 * alpha. Second, \\(H_1\\) rejected adjusted significance level 0.75 * alpha, \\(H_2\\) rejected. Third, \\(H_4\\) rejected adjusted significance level 0.5 * alpha, \\(H_1\\) \\(H_2\\) rejected. Fourth finally, \\(H_3\\) rejected adjusted significance level alpha, \\(H_1\\), \\(H_2\\) \\(H_4\\) rejected. results can obtained specifying test_values = TRUE.","code":"test_results_test_values <- graph_test_shortcut(g, p = p_values, alpha = 0.025, test_values = TRUE) test_results_test_values$test_values$results #> Step Hypothesis p <= Weight * Alpha Inequality_holds #> H2 1 H2 0.012 <= 0.50 * 0.025 TRUE #> H1 2 H1 0.013 <= 0.75 * 0.025 TRUE #> H4 3 H4 0.005 <= 0.50 * 0.025 TRUE #> H3 4 H3 0.105 <= 1.00 * 0.025 FALSE"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/shortuct-testing.html","id":"power-calculation","dir":"Articles","previous_headings":"","what":"Power calculation","title":"Sequentially rejective graphical approaches based on Bonferroni tests","text":"Given graph, trial team often interested power trial. single null hypothesis, power probability reject null hypothesis significance level alpha alternative hypothesis true. multiple null hypotheses, multiple versions power. example, power reject least one hypothesis power reject hypotheses, given alternative hypotheses true. graphical multiple comparison procedures, also important understand power reject hypothesis, given multiplicity adjustment. Sometimes, team may want customize definitions power define success. Thus power calculation important aspect trial design.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/shortuct-testing.html","id":"input-marginal-power-for-primary-hypotheses","dir":"Articles","previous_headings":"Power calculation","what":"Input: Marginal power for primary hypotheses","title":"Sequentially rejective graphical approaches based on Bonferroni tests","text":"Assume primary endpoint occurrence unfavorable clinical event. evaluate treatment effect, proportion patients event calculated, lower proportion preferred. Assume proportions 0.181 low high doses, 0.3 control. Using equal randomization among three treatment groups, clinical trial team chooses total sample size 600 200 per group. leads marginal power 80% \\(H_1\\) \\(H_2\\), respectively, using two-sample test difference proportions unpooled variance one-sided significance level 0.025. calculation, use marginal power combine information treatment effect, nuisance parameter, sample sizes hypothesis. Note significance level used marginal power calculation must alpha, used power calculation significance level FWER control. addition, marginal power one--one relationship noncentrality parameter, illustrated .","code":"alpha <- 0.025 prop <- c(0.3, 0.181, 0.181) sample_size <- rep(200, 3) unpooled_variance <- prop[-1] * (1 - prop[-1]) / sample_size[-1] + prop[1] * (1 - prop[1]) / sample_size[1] noncentrality_parameter_primary <- -(prop[-1] - prop[1]) / sqrt(unpooled_variance) power_marginal_primary <- pnorm(qnorm(alpha, lower.tail = FALSE), noncentrality_parameter_primary, 1, lower.tail = FALSE ) names(power_marginal_primary) <- c(\"H1\", \"H2\") power_marginal_primary #> H1 H2 #> 0.8028315 0.8028315"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/shortuct-testing.html","id":"input-marginal-power-for-secondary-hypotheses","dir":"Articles","previous_headings":"Power calculation","what":"Input: Marginal power for secondary hypotheses","title":"Sequentially rejective graphical approaches based on Bonferroni tests","text":"Assume secondary endpoint change total medication score baseline, continuous outcome. evaluate treatment effect, mean change calculated, greater reduction preferred. Assume mean change baseline reduction 7.5 8.25, respectively low high doses, 5 control. assume known common standard deviation 10. Given sample size 200 per treatment group, marginal power 71% 90% \\(H_3\\) \\(H_4\\), respectively, using two-sample \\(z\\)-test difference means one-sided significance level 0.025.","code":"mean_change <- c(5, 7.5, 8.25) sd <- rep(10, 3) variance <- sd[-1]^2 / sample_size[-1] + sd[1]^2 / sample_size[1] noncentrality_parameter_secondary <- (mean_change[-1] - mean_change[1]) / sqrt(variance) power_marginal_secondary <- pnorm(qnorm(alpha, lower.tail = FALSE), noncentrality_parameter_secondary, 1, lower.tail = FALSE ) names(power_marginal_secondary) <- c(\"H3\", \"H4\") power_marginal_secondary #> H3 H4 #> 0.7054139 0.9014809"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/shortuct-testing.html","id":"input-correlation-structure-to-simulate-test-statistics","dir":"Articles","previous_headings":"Power calculation","what":"Input: Correlation structure to simulate test statistics","title":"Sequentially rejective graphical approaches based on Bonferroni tests","text":"addition marginal power, also need make assumptions joint distribution test statistics. example, assume follow multivariate normal distribution means defined noncentrality parameters correlation matrix \\(R\\). obtain correlations, helpful understand two types correlations example. correlation two dose-control comparisons endpoint correlation endpoints. former correlation can calculated function sample size. example, correlation test statistics \\(H_1\\) \\(H_2\\) \\(\\rho_{12}=\\left(\\frac{n_1}{n_1+n_0}\\right)^{1/2}\\left(\\frac{n_2}{n_3+n_0}\\right)^{1/2}\\). equal randomization, correlation 0.5. correlation test statistics \\(H_3\\) \\(H_4\\) . hand, correlation endpoints dose-control comparison often estimated based prior knowledge previous trials. Without information, assume \\(\\rho_{13}=\\rho_{24}=0.5\\). practice, one set correlation parameter try multiple values assess sensitivity assumption. Regarding correlation test statistics \\(H_1\\) \\(H_4\\) \\(H_2\\) \\(H_3\\), even difficult estimate. use simple product rule, means correlation product correlations two previously assumed correlations. example, \\(\\rho_{14}=\\rho_{12}*\\rho_{24}\\) \\(\\rho_{23}=\\rho_{12}*\\rho_{13}\\). practice, one may make assumptions instead using product rule.","code":"corr <- matrix(0, nrow = 4, ncol = 4) corr[1, 2] <- corr[3, 4] <- sqrt(sample_size[2] / sum(sample_size[1:2]) * sample_size[3] / sum(sample_size[c(1, 3)])) rho <- 0.5 corr[1, 3] <- corr[2, 4] <- rho corr[1, 4] <- corr[2, 3] <- corr[1, 2] * rho corr <- corr + t(corr) diag(corr) <- 1 colnames(corr) <- hyp_names rownames(corr) <- hyp_names corr #> H1 H2 H3 H4 #> H1 1.00 0.50 0.50 0.25 #> H2 0.50 1.00 0.25 0.50 #> H3 0.50 0.25 1.00 0.50 #> H4 0.25 0.50 0.50 1.00"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/shortuct-testing.html","id":"user-defined-success-criteria","dir":"Articles","previous_headings":"Power calculation","what":"User-defined success criteria","title":"Sequentially rejective graphical approaches based on Bonferroni tests","text":"mentioned earlier, multiple versions “power” multiple hypotheses. Commonly used “power” definitions include: Local power: probability hypothesis rejected (multiplicity adjustment) Expected . rejections: expected number rejections Power reject 1 : probability reject least one hypothesis Power reject : probability reject hypotheses default outputs graph_calculate_power function. addition, user can customize success criteria define versions “power”.","code":"# Probability to reject H1 H1 <- function(x) x[1] # Expected number of rejections `Expected no. of rejections` <- function(x) x[1] + x[2] + x[3] + x[4] # Probability to reject at least one hypothesis `AtLeast1` <- function(x) x[1] | x[2] | x[3] | x[4] # Probability to reject all hypotheses `All` <- function(x) x[1] & x[2] & x[3] & x[4] # Probability to reject both H1 and H2 `H1andH2` <- function(x) x[1] & x[2] # Probability to reject both hypotheses for the low dose or the high dose `(H1andH3)or(H2andH4)` <- function(x) (x[1] & x[3]) | (x[2] & x[4]) succ <- list( H1, `Expected no. of rejections`, `AtLeast1`, `All`, `H1andH2`, `(H1andH3)or(H2andH4)` ) succ <- setNames( succ, c( \"H1\", \"Expected no. of rejections\", \"AtLeast1\", \"All\", \"H1andH2\", \"(H1andH3)or(H2andH4)\" ) )"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/articles/shortuct-testing.html","id":"output-calculate-power","dir":"Articles","previous_headings":"Power calculation","what":"Output: Calculate power","title":"Sequentially rejective graphical approaches based on Bonferroni tests","text":"Given inputs, can calculate power via simulation graphical multiple comparison procedure one-sided significance level alpha=0.025 using sim_n = 1e5 simulations seed sim_seed = 1234. local power 0.758, 0.765, 0.689, 0.570, respectively \\(H_1, \\ldots, H_4\\). Note local power lower marginal power former adjusted multiplicity. power reject least one hypothesis 0.856 power reject hypotheses 0.512. expected number rejections 2.782. last two user-defined success criteria, probability reject \\(H_1\\) \\(H_2\\) 0.667, probability reject least one pair \\((H_1\\) \\(H_3)\\) \\((H_2\\) \\(H_4)\\) 0.747. see detailed outputs simulated p-values rejection decisions hypotheses, specify verbose = TRUE. produce lot outputs. allow flexible printing functions, user can change following: indented space default setting indent = 2 precision numeric values (.e., number significant digits) default setting precision = 4","code":"output <- graph_calculate_power(g, alpha = .025, sim_corr = corr, sim_n = 1e5, power_marginal = c(power_marginal_primary, power_marginal_secondary), sim_success = succ, sim_seed = 1234 ) output #> #> Test parameters ($inputs) ------------------------------------------------------ #> Initial graph #> #> --- Hypothesis weights --- #> H1: 0.5 #> H2: 0.5 #> H3: 0.0 #> H4: 0.0 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 0.0 0.5 0.5 0.0 #> H2 0.5 0.0 0.0 0.5 #> H3 0.0 1.0 0.0 0.0 #> H4 1.0 0.0 0.0 0.0 #> #> Alpha = 0.025 #> #> Test types #> bonferroni: (H1, H2, H3, H4) #> #> Simulation parameters ($inputs) ------------------------------------------------ #> Testing 100,000 simulations - random seed 1234 & multivariate normal params: #> #> H1 H2 H3 H4 #> Marginal power: 0.8028 0.8028 0.7054 0.9015 #> #> Correlation: H1 H2 H3 H4 #> H1 1.00 0.50 0.50 0.25 #> H2 0.50 1.00 0.25 0.50 #> H3 0.50 0.25 1.00 0.50 #> H4 0.25 0.50 0.50 1.00 #> #> Power calculation ($power) ----------------------------------------------------- #> H1 H2 H3 H4 #> Local power: 0.7640 0.7589 0.5677 0.6913 #> #> Expected no. of rejections: 2.782 #> Power to reject 1 or more: 0.8556 #> Power to reject all: 0.5121 #> #> Power to reject: H1 Expected no. of rejections AtLeast1 #> 0.7640 2.7818 0.8556 #> All H1andH2 (H1andH3)or(H2andH4) #> 0.5121 0.6673 0.7470 verbose_output <- graph_calculate_power(g, alpha = .025, sim_corr = corr, sim_n = 1e5, power_marginal = c(power_marginal_primary, power_marginal_secondary), sim_success = succ, sim_seed = 1234, verbose = TRUE ) print(verbose_output) #> #> Test parameters ($inputs) ------------------------------------------------------ #> Initial graph #> #> --- Hypothesis weights --- #> H1: 0.5 #> H2: 0.5 #> H3: 0.0 #> H4: 0.0 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 0.0 0.5 0.5 0.0 #> H2 0.5 0.0 0.0 0.5 #> H3 0.0 1.0 0.0 0.0 #> H4 1.0 0.0 0.0 0.0 #> #> Alpha = 0.025 #> #> Test types #> bonferroni: (H1, H2, H3, H4) #> #> Simulation parameters ($inputs) ------------------------------------------------ #> Testing 100,000 simulations - random seed 1234 & multivariate normal params: #> #> H1 H2 H3 H4 #> Marginal power: 0.8028 0.8028 0.7054 0.9015 #> #> Correlation: H1 H2 H3 H4 #> H1 1.00 0.50 0.50 0.25 #> H2 0.50 1.00 0.25 0.50 #> H3 0.50 0.25 1.00 0.50 #> H4 0.25 0.50 0.50 1.00 #> #> Power calculation ($power) ----------------------------------------------------- #> H1 H2 H3 H4 #> Local power: 0.7640 0.7589 0.5677 0.6913 #> #> Expected no. of rejections: 2.782 #> Power to reject 1 or more: 0.8556 #> Power to reject all: 0.5121 #> #> Power to reject: H1 Expected no. of rejections AtLeast1 #> 0.7640 2.7818 0.8556 #> All H1andH2 (H1andH3)or(H2andH4) #> 0.5121 0.6673 0.7470 #> #> Simulation details ($details) -------------------------------------------------- #> p_sim_H1 p_sim_H2 p_sim_H3 p_sim_H4 rej_H1 rej_H2 rej_H3 rej_H4 #> 3.082e-02 1.207e-02 4.119e-03 9.324e-02 FALSE TRUE FALSE FALSE #> 7.934e-04 6.499e-04 2.452e-02 2.966e-03 TRUE TRUE TRUE TRUE #> 3.030e-02 5.954e-02 5.431e-02 2.626e-02 FALSE FALSE FALSE FALSE #> 9.743e-03 3.319e-03 7.417e-04 4.025e-04 TRUE TRUE TRUE TRUE #> 1.971e-02 8.616e-03 1.642e-02 2.418e-07 TRUE TRUE TRUE TRUE #> 3.121e-03 6.702e-03 1.374e-02 2.752e-04 TRUE TRUE TRUE TRUE #> 3.022e-02 1.424e-01 6.038e-03 2.117e-02 FALSE FALSE FALSE FALSE #> 2.498e-03 2.940e-02 4.143e-04 2.208e-03 TRUE FALSE TRUE FALSE #> 6.190e-02 3.873e-02 3.166e-01 5.700e-02 FALSE FALSE FALSE FALSE #> 3.678e-01 1.896e-01 7.023e-02 1.190e-02 FALSE FALSE FALSE FALSE #> ... (Use `print(x, rows = )` for more) print(verbose_output, indent = 4, precision = 6) #> #> Test parameters ($inputs) ------------------------------------------------------ #> Initial graph #> #> --- Hypothesis weights --- #> H1: 0.5 #> H2: 0.5 #> H3: 0.0 #> H4: 0.0 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 0.0 0.5 0.5 0.0 #> H2 0.5 0.0 0.0 0.5 #> H3 0.0 1.0 0.0 0.0 #> H4 1.0 0.0 0.0 0.0 #> #> Alpha = 0.025 #> #> Test types #> bonferroni: (H1, H2, H3, H4) #> #> Simulation parameters ($inputs) ------------------------------------------------ #> Testing 100,000 simulations - random seed 1234 & multivariate normal params: #> #> H1 H2 H3 H4 #> Marginal power: 0.802831 0.802831 0.705414 0.901481 #> #> Correlation: H1 H2 H3 H4 #> H1 1.00 0.50 0.50 0.25 #> H2 0.50 1.00 0.25 0.50 #> H3 0.50 0.25 1.00 0.50 #> H4 0.25 0.50 0.50 1.00 #> #> Power calculation ($power) ----------------------------------------------------- #> H1 H2 H3 H4 #> Local power: 0.76396 0.75887 0.56767 0.69133 #> #> Expected no. of rejections: 2.78183 #> Power to reject 1 or more: 0.85557 #> Power to reject all: 0.51205 #> #> Power to reject: H1 Expected no. of rejections #> 0.76396 2.78183 #> AtLeast1 All H1andH2 (H1andH3)or(H2andH4) #> 0.85557 0.51205 0.66726 0.74695 #> #> Simulation details ($details) -------------------------------------------------- #> p_sim_H1 p_sim_H2 p_sim_H3 p_sim_H4 rej_H1 rej_H2 rej_H3 rej_H4 #> 3.08204e-02 1.20654e-02 4.11858e-03 9.32434e-02 FALSE TRUE FALSE FALSE #> 7.93372e-04 6.49905e-04 2.45178e-02 2.96560e-03 TRUE TRUE TRUE TRUE #> 3.02992e-02 5.95396e-02 5.43083e-02 2.62583e-02 FALSE FALSE FALSE FALSE #> 9.74332e-03 3.31857e-03 7.41721e-04 4.02469e-04 TRUE TRUE TRUE TRUE #> 1.97135e-02 8.61618e-03 1.64183e-02 2.41833e-07 TRUE TRUE TRUE TRUE #> 3.12066e-03 6.70231e-03 1.37441e-02 2.75170e-04 TRUE TRUE TRUE TRUE #> 3.02208e-02 1.42376e-01 6.03828e-03 2.11740e-02 FALSE FALSE FALSE FALSE #> 2.49757e-03 2.94026e-02 4.14273e-04 2.20779e-03 TRUE FALSE TRUE FALSE #> 6.18994e-02 3.87257e-02 3.16613e-01 5.69979e-02 FALSE FALSE FALSE FALSE #> 3.67792e-01 1.89598e-01 7.02265e-02 1.18965e-02 FALSE FALSE FALSE FALSE #> ... (Use `print(x, rows = )` for more)"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Dong Xi. Author, maintainer. Ethan Brockmann. Author. Gilead Biostatistics. Copyright holder, funder. Atorus Research LLC. Copyright holder.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Xi, D.; Brockmann, E. (2023). graphicalMCP: Graph-based multiple comparison procedures. version 0.1.0. Gilead Sciences, Inc. Foster City, California. https://github.com/Gilead-BioStats/graphicalMCP Frank Bretz, Martin Posch, Ekkehard Glimm, Florian Klinglmueller, Willi Maurer, Kornelius Rohmeyer (2011), Graphical approaches multiple comparison procedures using weighted Bonferroni, Simes parametric tests. Biometrical Journal 53 (6), pages 894--913, Wiley.","code":"@Manual{, title = {{graphicalMCP}: Graph-based multiple comparison procedures.}, author = {Dong Xi and Ethan Brockmann}, organization = {Gilead Sciences, Inc}, note = {version 0.1.0}, year = {2023}, url = {https://github.com/Gilead-BioStats/graphicalMCP}, } @Article{, title = {Graphical approaches for multiple comparison procedures using weighted Bonferroni, Simes or parametric tests}, author = {Frank Bretz and Martin Posch and Ekkehard Glimm and Florian Klinglmueller and Willi Maurer and Kornelius Rohmeyer}, journal = {Biometrical Journal}, year = {2011}, publisher = {Wiley}, volume = {53}, number = {6}, pages = {894--913}, url = {http://onlinelibrary.wiley.com/doi/10.1002/bimj.201000239/full}, }"},{"path":[]},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/index.html","id":"introduction","dir":"","previous_headings":"","what":"Introduction","title":"Graphical Approach for Multiple Comparison Procedures","text":"multiple comparison procedure (MCP) statistical analysis method allows assessing efficacy multiple endpoints, dependent , single clinical trial. Endpoints can different doses, treatment different conditions, combined superiority & non-inferiority testing, many others. key feature MCPs strongly control type-error rate level alpha. Bretz et al (2011), graphical method MCPs described, separates weighting clinical endpoints particular statistical test used assess endpoint. graphical approach can also helpful communicating study design clinical teams. package low-dependency implementation methods.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Graphical Approach for Multiple Comparison Procedures","text":"graphicalMCP CRAN, install GitHub ","code":"# install.packages(\"pak\") pak::pak(\"Gilead-BioStats/graphicalMCP@dev\")"},{"path":[]},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/index.html","id":"initial-graph","dir":"","previous_headings":"Basic usage","what":"Initial graph","title":"Graphical Approach for Multiple Comparison Procedures","text":"base object graphicalMCP initial_graph, weighted, directed graph represented matrix transition (edge) weights, vector hypothesis (vertex) weights.","code":"library(graphicalMCP) # A graphical multiple comparison procedure with two primary hypotheses (H1 # and H2) and two secondary hypotheses (H3 and H4) # See Figure 1 in Bretz, F., Posch, M., Glimm, E., Klinglmueller, F., Maurer, # W., & Rohmeyer, K. (2011). Graphical approaches for multiple comparison # procedures using weighted Bonferroni, Simes, or parametric tests. Biometrical # Journal, 53(6), 894-913. hypotheses <- c(0.5, 0.5, 0, 0) transitions <- rbind( c(0, 0, 1, 0), c(0, 0, 0, 1), c(0, 1, 0, 0), c(1, 0, 0, 0) ) hyp_names <- c(\"H1\", \"H2\", \"H3\", \"H4\") example_graph <- graph_create(hypotheses, transitions, hyp_names) plot(example_graph, layout = \"grid\")"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/index.html","id":"update-graph","dir":"","previous_headings":"Basic usage","what":"Update graph","title":"Graphical Approach for Multiple Comparison Procedures","text":"Hypotheses can deleted MCP using graph_update(). Updated weights transitions calculated according weighting strategy Algorithm 1 Bretz et al (2011). distinguish deleting rejecting glossary.","code":"graph_update(example_graph, delete = c(FALSE, TRUE, TRUE, FALSE))"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/index.html","id":"generate-weights","dir":"","previous_headings":"Basic usage","what":"Generate weights","title":"Graphical Approach for Multiple Comparison Procedures","text":"weights sub-graphs can calculated graph_generate_weights(). uses efficient code hood graph_update() order performant larger graphs. information closure can found [Link closure vignette].","code":"graph_generate_weights(example_graph)"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/index.html","id":"test-hypotheses","dir":"","previous_headings":"Basic usage","what":"Test hypotheses","title":"Graphical Approach for Multiple Comparison Procedures","text":"Bonferroni testing via shortcut method supported graphicalMCP. test can performed graph_test_shortcut(), generates report showing graph & test results. See insight hypothesis rejected setting verbose test_values flags. details shortcut testing can found [link shortcut vignette]. graph can also tested using Simes- parametric-based testing using closure test. types tests added time, combination tests can used groups hypotheses. Additional details closure testing can found [link closed test vignette].","code":"graph_test_shortcut(example_graph, p = c(.01, .03, .02, .01), alpha = .025) graph_test_closure( example_graph, p = c(.01, .03, .02, .01), alpha = .025, test_types = \"bonferroni\", test_groups = list(1:4) )"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/index.html","id":"power-simulations","dir":"","previous_headings":"Basic usage","what":"Power simulations","title":"Graphical Approach for Multiple Comparison Procedures","text":"’s always obvious graph structure easy difficult reject hypothesis. One way understand better run power simulation, many p-values simulated, graph tested . valid test types & hypothesis groupings valid power simulations well. Power simulations discussed [shortcut testing vignette] [closure testing vignette].","code":"graph_calculate_power( example_graph, sim_n = 1e5, power_marginal = c(.9, .9, .8, .8) )"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/index.html","id":"related-work","dir":"","previous_headings":"","what":"Related work","title":"Graphical Approach for Multiple Comparison Procedures","text":"methods originally implemented gMCP package, still available CRAN today. also lighter version gMCP implemented gMCPmini successor, gMCPLite. two contain subset original functionality, remove rJava dependency add plotting functionality based ggplot2. However, development ceased original package, hope re-implement methods general testing framework; fewer dependencies, particular shedding Java dependency; simpler, transparent S3 classes; improvements accuracy parametric Simes test methods. portion Simes testing also implemented lrstat package.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/index.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Graphical Approach for Multiple Comparison Procedures","text":"","code":"citation(\"graphicalMCP\") #> To cite graphicalMCP in publications use: #> #> Xi, D.; Brockmann, E. (2023). graphicalMCP: Graph-based multiple #> comparison procedures. version 0.1.0. Gilead Sciences, Inc. Foster #> City, California. https://github.com/Gilead-BioStats/graphicalMCP #> #> Frank Bretz, Martin Posch, Ekkehard Glimm, Florian Klinglmueller, #> Willi Maurer, Kornelius Rohmeyer (2011), Graphical approaches for #> multiple comparison procedures using weighted Bonferroni, Simes or #> parametric tests. Biometrical Journal 53 (6), pages 894--913, Wiley. #> #> To see these entries in BibTeX format, use 'print(, #> bibtex=TRUE)', 'toBibtex(.)', or set #> 'options(citation.bibtex.max=999)'."},{"path":[]},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/index.html","id":"glossary-of-terms","dir":"","previous_headings":"","what":"Glossary of terms","title":"Graphical Approach for Multiple Comparison Procedures","text":"package seeks accurate performant, course. beyond , much thought put readability code. Whether read user validating methods, developer extending package new uses, contributor helping enhance core functionality, hope code contained can serve educational document grow people’s understanding graphical approach multiple comparison procedures. end, several entities encountered world graphical MCPs define . used internal code package, inputs output one exported functions. believe definitions clarified improved, please contact package authors submit issue GitHub repository. set weights, adjusted according testing algorithm: Bonferroni: change Simes: Sum weights hypotheses smaller p-values Parametric: Multiply weights c-value, based joint distribution power reject null hypothesis full alpha. Closely related non-centrality parameter, mean null hypothesis underlying multivariate normal distribution: ncp = qnorm(1 - alpha) - qnorm(1 - marginal_power)","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/adjust_p.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate adjusted p-values — adjust_p_bonferroni","title":"Calculate adjusted p-values — adjust_p_bonferroni","text":"Calculate adjusted p-values","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/adjust_p.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate adjusted p-values — adjust_p_bonferroni","text":"","code":"adjust_p_bonferroni(p, hypotheses) adjust_p_parametric(p, hypotheses, test_corr = NULL) adjust_p_simes(p, hypotheses)"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/adjust_p.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate adjusted p-values — adjust_p_bonferroni","text":"p numeric vector p-values hypotheses numeric vector hypothesis weights test_corr (Optional) numeric matrix correlations hypotheses' test statistics","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/adjust_p.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate adjusted p-values — adjust_p_bonferroni","text":"single adjusted p-value given group","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/adjust_p.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Calculate adjusted p-values — adjust_p_bonferroni","text":"Bretz, F., Maurer, W., Brannath, W., Posch, M. (2009). graphical approach sequentially rejective multiple test procedures. Statistics Medicine, 28(4), 586–604. https://doi.org/10.1002/sim.3495 Bretz, F., Maurer, W., Hommel, G. (2011). Test power considerations multiple endpoint analyses using sequentially rejective graphical procedures. Statistics Medicine, 30(13), 1489–1501. https://doi.org/10.1002/sim.3988 Bretz, F., Posch, M., Glimm, E., Klinglmueller, F., Maurer, W., Rohmeyer, K. (2011). Graphical approaches multiple comparison procedures using weighted Bonferroni, Simes, parametric tests. Biometrical Journal, 53(6), 894–913. https://doi.org/10.1002/bimj.201000239 Lu, K. (2016). Graphical approaches using Bonferroni mixture weighted Simes tests. Statistics Medicine, 35(22), 4041–4055. https://doi.org/10.1002/sim.6985 Xi, D., Glimm, E., Maurer, W., Bretz, F. (2017). unified framework weighted parametric multiple test procedures. Biometrical Journal, 59(5), 918–931. https://doi.org/10.1002/bimj.201600233 Xi, D., Bretz, F. (2019). Symmetric graphs equally weighted tests, application Hochberg procedure. Statistics Medicine, 38(27), 5268–5282. https://doi.org/10.1002/sim.8375 Rohmeyer K, Klinglmueller F (2020). gMCP: Graph Based Multiple Test Procedures. R package version 0.8-15, https://cran.r-project.org/package=gMCP.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/adjust_p.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculate adjusted p-values — adjust_p_bonferroni","text":"","code":"set.seed(22723) w <- c(\"H1\" = .75, \"H2\" = .25, \"H3\" = 0) p <- c(\"H1\" = .019, \"H2\" = .025, \"H3\" = .05) graphicalMCP:::adjust_p_bonferroni(p, w) #> [1] 0.02533333 graphicalMCP:::adjust_p_simes(p, w) #> [1] 0.025 corr1 <- diag(3) corr2 <- corr1 corr2[lower.tri(corr2)] <- corr2[upper.tri(corr2)] <- runif(3, -1, 1) # No correlation graphicalMCP:::adjust_p_parametric(p, w, corr1) #> [1] 0.025213 # Uniform random pairwise correlations graphicalMCP:::adjust_p_parametric(p, w, corr2) #> [1] 0.02196006"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/adjusted-weights.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate updated hypothesis weights for the closure of a graph — adjust_weights_parametric","title":"Calculate updated hypothesis weights for the closure of a graph — adjust_weights_parametric","text":"weights created graph_generate_weights() work immediately Bonferroni testing, parametric Simes testing require additional calculations. adjust_weights_*() functions apply parametric Simes weight increases get updated weights testing. also subset weights columns appropriate groups","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/adjusted-weights.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate updated hypothesis weights for the closure of a graph — adjust_weights_parametric","text":"","code":"adjust_weights_parametric( matrix_weights, matrix_intersections, test_corr, alpha, test_groups ) adjust_weights_simes(matrix_weights, p, groups) c_value_function(x, hypotheses, test_corr, alpha) solve_c_parametric(hypotheses, test_corr, alpha)"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/adjusted-weights.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate updated hypothesis weights for the closure of a graph — adjust_weights_parametric","text":"matrix_weights second half columns graph_generate_weights() output, indicating weights intersection matrix_intersections first half columns graph_generate_weights() output, indicating hypotheses contained intersection test_corr numeric matrix correlations hypotheses' test statistics alpha numeric scalar specifying global significance level testing test_groups list numeric vectors specifying hypotheses test together p numeric vector p-values x root solve stats::uniroot() hypotheses numeric vector hypothesis weights","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/adjusted-weights.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate updated hypothesis weights for the closure of a graph — adjust_weights_parametric","text":"Outputs: adjust_weights_*(), matrix shape weighting_strategy, weights adjusted according specified adjustment method c_value_function(), \\(c_{J_h}\\) value given group, according Formula 6 Xi et al. (2017).","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/adjusted-weights.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Calculate updated hypothesis weights for the closure of a graph — adjust_weights_parametric","text":"Bretz, F., Maurer, W., Brannath, W., Posch, M. (2009). graphical approach sequentially rejective multiple test procedures. Statistics Medicine, 28(4), 586–604. https://doi.org/10.1002/sim.3495 Bretz, F., Maurer, W., Hommel, G. (2011). Test power considerations multiple endpoint analyses using sequentially rejective graphical procedures. Statistics Medicine, 30(13), 1489–1501. https://doi.org/10.1002/sim.3988 Bretz, F., Posch, M., Glimm, E., Klinglmueller, F., Maurer, W., Rohmeyer, K. (2011). Graphical approaches multiple comparison procedures using weighted Bonferroni, Simes, parametric tests. Biometrical Journal, 53(6), 894–913. https://doi.org/10.1002/bimj.201000239 Lu, K. (2016). Graphical approaches using Bonferroni mixture weighted Simes tests. Statistics Medicine, 35(22), 4041–4055. https://doi.org/10.1002/sim.6985 Xi, D., Glimm, E., Maurer, W., Bretz, F. (2017). unified framework weighted parametric multiple test procedures. Biometrical Journal, 59(5), 918–931. https://doi.org/10.1002/bimj.201600233 Xi, D., Bretz, F. (2019). Symmetric graphs equally weighted tests, application Hochberg procedure. Statistics Medicine, 38(27), 5268–5282. https://doi.org/10.1002/sim.8375 Rohmeyer K, Klinglmueller F (2020). gMCP: Graph Based Multiple Test Procedures. R package version 0.8-15, https://cran.r-project.org/package=gMCP.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/adjusted-weights.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculate updated hypothesis weights for the closure of a graph — adjust_weights_parametric","text":"","code":"p <- 1:6 / 200 g <- bonferroni_holm(6) gw_large <- graph_generate_weights(g) gw_0 <- gw_large[, 7:12] gw <- ifelse(gw_large[, 1:6], gw_0, NA) graphicalMCP:::adjust_weights_parametric( gw_0, gw_large[, 1:6], diag(6), .05, list(1:3) ) #> H1 H2 H3 #> 1 0.1680752 0.1680752 0.1680752 #> 2 0.2020340 0.2020340 0.2020340 #> 3 0.2020340 0.2020340 0.2020340 #> 4 0.2531918 0.2531918 0.2531918 #> 5 0.2020340 0.2020340 0.2020340 #> 6 0.2531918 0.2531918 0.2531918 #> 7 0.2531918 0.2531918 0.2531918 #> 8 0.3390485 0.3390485 0.3390485 #> 9 0.2010082 0.2010082 0.0000000 #> 10 0.2515823 0.2515823 0.0000000 #> 11 0.2515823 0.2515823 0.0000000 #> 12 0.3361584 0.3361584 0.0000000 #> 13 0.2515823 0.2515823 0.0000000 #> 14 0.3361584 0.3361584 0.0000000 #> 15 0.3361584 0.3361584 0.0000000 #> 16 0.5064113 0.5064113 0.0000000 #> 17 0.2010082 0.0000000 0.2010082 #> 18 0.2515823 0.0000000 0.2515823 #> 19 0.2515823 0.0000000 0.2515823 #> 20 0.3361584 0.0000000 0.3361584 #> 21 0.2515823 0.0000000 0.2515823 #> 22 0.3361584 0.0000000 0.3361584 #> 23 0.3361584 0.0000000 0.3361584 #> 24 0.5064113 0.0000000 0.5064113 #> 25 0.2500000 0.0000000 0.0000000 #> 26 0.3333333 0.0000000 0.0000000 #> 27 0.3333333 0.0000000 0.0000000 #> 28 0.5000000 0.0000000 0.0000000 #> 29 0.3333333 0.0000000 0.0000000 #> 30 0.5000000 0.0000000 0.0000000 #> 31 0.5000000 0.0000000 0.0000000 #> 32 1.0000000 0.0000000 0.0000000 #> 33 0.0000000 0.2010082 0.2010082 #> 34 0.0000000 0.2515823 0.2515823 #> 35 0.0000000 0.2515823 0.2515823 #> 36 0.0000000 0.3361584 0.3361584 #> 37 0.0000000 0.2515823 0.2515823 #> 38 0.0000000 0.3361584 0.3361584 #> 39 0.0000000 0.3361584 0.3361584 #> 40 0.0000000 0.5064113 0.5064113 #> 41 0.0000000 0.2500000 0.0000000 #> 42 0.0000000 0.3333333 0.0000000 #> 43 0.0000000 0.3333333 0.0000000 #> 44 0.0000000 0.5000000 0.0000000 #> 45 0.0000000 0.3333333 0.0000000 #> 46 0.0000000 0.5000000 0.0000000 #> 47 0.0000000 0.5000000 0.0000000 #> 48 0.0000000 1.0000000 0.0000000 #> 49 0.0000000 0.0000000 0.2500000 #> 50 0.0000000 0.0000000 0.3333333 #> 51 0.0000000 0.0000000 0.3333333 #> 52 0.0000000 0.0000000 0.5000000 #> 53 0.0000000 0.0000000 0.3333333 #> 54 0.0000000 0.0000000 0.5000000 #> 55 0.0000000 0.0000000 0.5000000 #> 56 0.0000000 0.0000000 1.0000000 #> 57 0.0000000 0.0000000 0.0000000 #> 58 0.0000000 0.0000000 0.0000000 #> 59 0.0000000 0.0000000 0.0000000 #> 60 0.0000000 0.0000000 0.0000000 #> 61 0.0000000 0.0000000 0.0000000 #> 62 0.0000000 0.0000000 0.0000000 #> 63 0.0000000 0.0000000 0.0000000 graphicalMCP:::adjust_weights_simes(gw_0, p, list(4:6)) #> H4 H5 H6 #> 1 0.1666667 0.3333333 0.5000000 #> 2 0.2000000 0.4000000 0.4000000 #> 3 0.2000000 0.2000000 0.4000000 #> 4 0.2500000 0.2500000 0.2500000 #> 5 0.0000000 0.2000000 0.4000000 #> 6 0.0000000 0.2500000 0.2500000 #> 7 0.0000000 0.0000000 0.2500000 #> 8 0.0000000 0.0000000 0.0000000 #> 9 0.2000000 0.4000000 0.6000000 #> 10 0.2500000 0.5000000 0.5000000 #> 11 0.2500000 0.2500000 0.5000000 #> 12 0.3333333 0.3333333 0.3333333 #> 13 0.0000000 0.2500000 0.5000000 #> 14 0.0000000 0.3333333 0.3333333 #> 15 0.0000000 0.0000000 0.3333333 #> 16 0.0000000 0.0000000 0.0000000 #> 17 0.2000000 0.4000000 0.6000000 #> 18 0.2500000 0.5000000 0.5000000 #> 19 0.2500000 0.2500000 0.5000000 #> 20 0.3333333 0.3333333 0.3333333 #> 21 0.0000000 0.2500000 0.5000000 #> 22 0.0000000 0.3333333 0.3333333 #> 23 0.0000000 0.0000000 0.3333333 #> 24 0.0000000 0.0000000 0.0000000 #> 25 0.2500000 0.5000000 0.7500000 #> 26 0.3333333 0.6666667 0.6666667 #> 27 0.3333333 0.3333333 0.6666667 #> 28 0.5000000 0.5000000 0.5000000 #> 29 0.0000000 0.3333333 0.6666667 #> 30 0.0000000 0.5000000 0.5000000 #> 31 0.0000000 0.0000000 0.5000000 #> 32 0.0000000 0.0000000 0.0000000 #> 33 0.2000000 0.4000000 0.6000000 #> 34 0.2500000 0.5000000 0.5000000 #> 35 0.2500000 0.2500000 0.5000000 #> 36 0.3333333 0.3333333 0.3333333 #> 37 0.0000000 0.2500000 0.5000000 #> 38 0.0000000 0.3333333 0.3333333 #> 39 0.0000000 0.0000000 0.3333333 #> 40 0.0000000 0.0000000 0.0000000 #> 41 0.2500000 0.5000000 0.7500000 #> 42 0.3333333 0.6666667 0.6666667 #> 43 0.3333333 0.3333333 0.6666667 #> 44 0.5000000 0.5000000 0.5000000 #> 45 0.0000000 0.3333333 0.6666667 #> 46 0.0000000 0.5000000 0.5000000 #> 47 0.0000000 0.0000000 0.5000000 #> 48 0.0000000 0.0000000 0.0000000 #> 49 0.2500000 0.5000000 0.7500000 #> 50 0.3333333 0.6666667 0.6666667 #> 51 0.3333333 0.3333333 0.6666667 #> 52 0.5000000 0.5000000 0.5000000 #> 53 0.0000000 0.3333333 0.6666667 #> 54 0.0000000 0.5000000 0.5000000 #> 55 0.0000000 0.0000000 0.5000000 #> 56 0.0000000 0.0000000 0.0000000 #> 57 0.3333333 0.6666667 1.0000000 #> 58 0.5000000 1.0000000 1.0000000 #> 59 0.5000000 0.5000000 1.0000000 #> 60 1.0000000 1.0000000 1.0000000 #> 61 0.0000000 0.5000000 1.0000000 #> 62 0.0000000 1.0000000 1.0000000 #> 63 0.0000000 0.0000000 1.0000000"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/as-graph.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert between gMCP and graphicalMCP graph classes — as_initial_graph","title":"Convert between gMCP and graphicalMCP graph classes — as_initial_graph","text":"Convert gMCP graphicalMCP graph classes","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/as-graph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert between gMCP and graphicalMCP graph classes — as_initial_graph","text":"","code":"as_initial_graph(graph) # S3 method for graphMCP as_initial_graph(graph) # S3 method for igraph as_initial_graph(graph) as_graphMCP(graph) # S3 method for initial_graph as_graphMCP(graph) as_igraph(graph) # S3 method for initial_graph as_igraph(graph)"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/as-graph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert between gMCP and graphicalMCP graph classes — as_initial_graph","text":"graph initial_graph object graphicalMCP, graphMCP object gMCP, igraph object igraph, depending direction converting","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/as-graph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert between gMCP and graphicalMCP graph classes — as_initial_graph","text":"as_graphMCP(), gMCP graph object, as_igraph(), igraph object, as_initial_graph(), graphicalMCP graph object","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/as-graph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert between gMCP and graphicalMCP graph classes — as_initial_graph","text":"","code":"g1 <- random_graph(5) if (requireNamespace(\"gMCP\", quietly = TRUE)) { g2 <- as_graphMCP(g1) all.equal(g1, as_initial_graph(g2)) } #> [1] TRUE if (requireNamespace(\"igraph\", quietly = TRUE)) { g3 <- as_igraph(g1) all.equal(g1, as_initial_graph(g3)) } #> igraph method #> [1] \"names for target but not for current\" #> [2] \"Attributes: < Component “class”: 1 string mismatch >\" #> [3] \"Length mismatch: comparison on first 2 components\" #> [4] \"Component 1: names for target but not for current\" #> [5] \"Component 1: Numeric: lengths (5, 1) differ\" #> [6] \"Component 2: Modes: numeric, logical\" #> [7] \"Component 2: Lengths: 25, 1\" #> [8] \"Component 2: Attributes: < Modes: list, NULL >\" #> [9] \"Component 2: Attributes: < Lengths: 2, 0 >\" #> [10] \"Component 2: Attributes: < names for target but not for current >\" #> [11] \"Component 2: Attributes: < current is not list-like >\" #> [12] \"Component 2: target is matrix, current is logical\""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/calc-test_values.html","id":null,"dir":"Reference","previous_headings":"","what":"Test hypotheses with the adjusted significance method — test_values_bonferroni","title":"Test hypotheses with the adjusted significance method — test_values_bonferroni","text":"Test hypotheses adjusted significance method","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/calc-test_values.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test hypotheses with the adjusted significance method — test_values_bonferroni","text":"","code":"test_values_bonferroni(p, hypotheses, alpha, intersection = NA) test_values_parametric(p, hypotheses, alpha, intersection = NA, test_corr) test_values_simes(p, hypotheses, alpha, intersection = NA)"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/calc-test_values.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test hypotheses with the adjusted significance method — test_values_bonferroni","text":"p numeric vector p-values hypotheses numeric vector hypothesis hypotheses alpha numeric scalar specifying global significance level testing intersection numeric scalar used track intersection test values test_corr numeric matrix correlations hypotheses' test statistics","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/calc-test_values.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test hypotheses with the adjusted significance method — test_values_bonferroni","text":"data frame columns specifying values used calculate hypothesis test","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/calc-test_values.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Test hypotheses with the adjusted significance method — test_values_bonferroni","text":"Bretz, F., Maurer, W., Brannath, W., Posch, M. (2009). graphical approach sequentially rejective multiple test procedures. Statistics Medicine, 28(4), 586–604. https://doi.org/10.1002/sim.3495 Bretz, F., Maurer, W., Hommel, G. (2011). Test power considerations multiple endpoint analyses using sequentially rejective graphical procedures. Statistics Medicine, 30(13), 1489–1501. https://doi.org/10.1002/sim.3988 Bretz, F., Posch, M., Glimm, E., Klinglmueller, F., Maurer, W., Rohmeyer, K. (2011). Graphical approaches multiple comparison procedures using weighted Bonferroni, Simes, parametric tests. Biometrical Journal, 53(6), 894–913. https://doi.org/10.1002/bimj.201000239 Lu, K. (2016). Graphical approaches using Bonferroni mixture weighted Simes tests. Statistics Medicine, 35(22), 4041–4055. https://doi.org/10.1002/sim.6985 Xi, D., Glimm, E., Maurer, W., Bretz, F. (2017). unified framework weighted parametric multiple test procedures. Biometrical Journal, 59(5), 918–931. https://doi.org/10.1002/bimj.201600233 Xi, D., Bretz, F. (2019). Symmetric graphs equally weighted tests, application Hochberg procedure. Statistics Medicine, 38(27), 5268–5282. https://doi.org/10.1002/sim.8375 Rohmeyer K, Klinglmueller F (2020). gMCP: Graph Based Multiple Test Procedures. R package version 0.8-15, https://cran.r-project.org/package=gMCP.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/calc-test_values.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test hypotheses with the adjusted significance method — test_values_bonferroni","text":"","code":"w <- c(H1 = .5, H2 = .5, H3 = 0, H4 = 0) p <- c(.024, .01, .026, .027) graphicalMCP:::test_values_bonferroni(p, w, .05) #> Intersection Hypothesis Test p <= c_value * Weight * Alpha #> H1 NA H1 bonferroni 0.024 <= 0.5 * 0.05 #> H2 NA H2 bonferroni 0.010 <= 0.5 * 0.05 #> H3 NA H3 bonferroni 0.026 <= 0.0 * 0.05 #> H4 NA H4 bonferroni 0.027 <= 0.0 * 0.05 #> Inequality_holds #> H1 TRUE #> H2 TRUE #> H3 FALSE #> H4 FALSE graphicalMCP:::test_values_parametric(p, w, .05, test_corr = diag(4)) #> Intersection Hypothesis Test p <= c_value * Weight * Alpha #> H1 NA H1 parametric 0.024 <= 1.012823 * 0.5 * 0.05 #> H2 NA H2 parametric 0.010 <= 1.012823 * 0.5 * 0.05 #> H3 NA H3 parametric 0.026 <= 1.012823 * 0.0 * 0.05 #> H4 NA H4 parametric 0.027 <= 1.012823 * 0.0 * 0.05 #> Inequality_holds #> H1 TRUE #> H2 TRUE #> H3 FALSE #> H4 FALSE graphicalMCP:::test_values_simes(p, w, .05) #> Intersection Hypothesis Test p <= c_value * Weight * Alpha #> 1 NA H1 simes 0.024 <= 1.0 * 0.05 #> 2 NA H2 simes 0.010 <= 0.5 * 0.05 #> 3 NA H3 simes 0.026 <= 1.0 * 0.05 #> 4 NA H4 simes 0.027 <= 1.0 * 0.05 #> Inequality_holds #> 1 TRUE #> 2 TRUE #> 3 TRUE #> 4 TRUE"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/example-graphs.html","id":null,"dir":"Reference","previous_headings":"","what":"Example graphs from a selection of papers — bonferroni_holm","title":"Example graphs from a selection of papers — bonferroni_holm","text":"Example graphs selection papers","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/example-graphs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Example graphs from a selection of papers — bonferroni_holm","text":"","code":"bonferroni_holm(num_hyps, hyp_names = NULL) huque_alosh_bhore_2011(hyp_names = NULL) wiens_dmitrienko_2005(hyp_names = NULL) fixed_sequence(num_hyps = 3, hyp_names = NULL) fallback(hypotheses = c(1, 0, 0), hyp_names = NULL) simple_successive_1(hyp_names = NULL) simple_successive_2(hyp_names = NULL) random_graph(num_hyps, hyp_names = NULL) complex_example_1(hyp_names = NULL) complex_example_2(hyp_names = NULL) complex_example_2(hyp_names = NULL)"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/example-graphs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Example graphs from a selection of papers — bonferroni_holm","text":"num_hyps Number vertices graph hyp_names (Optional) character vector hypothesis names. names specified, hypotheses named sequentially H1, H2, ... hypotheses Hypothesis weights fallback procedure","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/example-graphs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Example graphs from a selection of papers — bonferroni_holm","text":"S3 object returned graph_create()","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/example-graphs.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Example graphs from a selection of papers — bonferroni_holm","text":"Bretz, F., Maurer, W., Brannath, W., Posch, M. (2009). graphical approach sequentially rejective multiple test procedures. Statistics Medicine, 28(4), 586–604. https://doi.org/10.1002/sim.3495 Bretz, F., Maurer, W., Hommel, G. (2011). Test power considerations multiple endpoint analyses using sequentially rejective graphical procedures. Statistics Medicine, 30(13), 1489–1501. https://doi.org/10.1002/sim.3988 Bretz, F., Posch, M., Glimm, E., Klinglmueller, F., Maurer, W., Rohmeyer, K. (2011). Graphical approaches multiple comparison procedures using weighted Bonferroni, Simes, parametric tests. Biometrical Journal, 53(6), 894–913. https://doi.org/10.1002/bimj.201000239 Lu, K. (2016). Graphical approaches using Bonferroni mixture weighted Simes tests. Statistics Medicine, 35(22), 4041–4055. https://doi.org/10.1002/sim.6985 Xi, D., Glimm, E., Maurer, W., Bretz, F. (2017). unified framework weighted parametric multiple test procedures. Biometrical Journal, 59(5), 918–931. https://doi.org/10.1002/bimj.201600233 Xi, D., Bretz, F. (2019). Symmetric graphs equally weighted tests, application Hochberg procedure. Statistics Medicine, 38(27), 5268–5282. https://doi.org/10.1002/sim.8375 Rohmeyer K, Klinglmueller F (2020). gMCP: Graph Based Multiple Test Procedures. R package version 0.8-15, https://cran.r-project.org/package=gMCP.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/example-graphs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Example graphs from a selection of papers — bonferroni_holm","text":"","code":"bonferroni_holm(3, hyp_names = paste(\"dose\", letters[1:3])) #> Initial graph #> #> --- Hypothesis weights --- #> dose a: 0.3333 #> dose b: 0.3333 #> dose c: 0.3333 #> #> --- Transition weights --- #> dose a dose b dose c #> dose a 0.0 0.5 0.5 #> dose b 0.5 0.0 0.5 #> dose c 0.5 0.5 0.0"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_calculate_power.html","id":null,"dir":"Reference","previous_headings":"","what":"Obtain hypothesis rejection probabilities — graph_calculate_power","title":"Obtain hypothesis rejection probabilities — graph_calculate_power","text":"often difficult tell likely given hypothesis rejected. power simulations useful. set distribution parameters, many p-values generated, graph tested one. testing strategy can used. probabilities calculated hypothesis rejected, well additional probabilities expected rejections probability rejecting hypothesis","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_calculate_power.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Obtain hypothesis rejection probabilities — graph_calculate_power","text":"","code":"graph_calculate_power( graph, alpha = 0.025, power_marginal = rep(alpha, length(graph$hypotheses)), test_groups = list(seq_along(graph$hypotheses)), test_types = c(\"bonferroni\"), test_corr = rep(list(NA), length(test_types)), sim_n = 100, sim_corr = diag(length(graph$hypotheses)), sim_success = NULL, sim_seed = NULL, force_closure = FALSE, verbose = FALSE )"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_calculate_power.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Obtain hypothesis rejection probabilities — graph_calculate_power","text":"graph initial graph returned graph_create() alpha numeric scalar specifying global significance level testing power_marginal numeric vector mean values use simulating p-values. Exactly one mean per hypothesis needed, p-values sampled multivariate normal distribution. See Details test_groups list numeric vectors specifying hypotheses test together test_types character vector tests apply given groups test_corr Optional test_types parametric. numeric matrix correlations hypotheses' test statistics sim_n integer scalar specifying many simulations run sim_corr numeric matrix correlations hypotheses used sample multivariate normal distribution generate p-values sim_success list user-defined functions apply power results. Functions must take one simulation's logical vector results input, return length-one logical vector. instance, \"success\" means rejecting hypotheses 1 2, use sim_success = list(\"1 2\" = function(x) x[1] && x[2]). list named, function body used name. Lambda functions also work starting R 4.1, e.g. sim_success = list(\\(x) x[3] || x[4]) sim_seed (Optional) Random seed set simulating p-values. Set use consistent set p simulations across power calculations force_closure logical scalar used determine whether full closure test used Bonferroni testing. Ignored tests non-Bonferroni verbose logical scalar specifying whether full matrix simulations test results included output ","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_calculate_power.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Obtain hypothesis rejection probabilities — graph_calculate_power","text":"list five elements power_local - rejection proportion hypothesis individually power_expected - average number hypotheses rejected single simulation power_at_least_1 - proportion simulations reject hypothesis power_all - proportion simulations reject hypotheses power_success - proportion simulations reject hypotheses specified sim_success","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_calculate_power.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Obtain hypothesis rejection probabilities — graph_calculate_power","text":"parameters normal distribution set power_marginal (means) sim_corr (correlation test statistics). mean hypothesis set marginal power $$d_i=P_{\\xi_i}(p_i\\leq\\alpha)$$ \\(\\xi_i\\) non-centrality parameter. correlation test statistics induced study design.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_calculate_power.html","id":"success","dir":"Reference","previous_headings":"","what":"Success","title":"Obtain hypothesis rejection probabilities — graph_calculate_power","text":"Success mean something different trial, lot flexibility sim_success parameter. However, flexibility means little validation inputs. user make sure function(s) passed mean think. implementation perspective, function applied row-wise matrix test results simulation, resulting sim_n length vector. mean vector returned \"Probability success\"","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_calculate_power.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Obtain hypothesis rejection probabilities — graph_calculate_power","text":"Bretz, F., Maurer, W., Brannath, W., Posch, M. (2009). graphical approach sequentially rejective multiple test procedures. Statistics Medicine, 28(4), 586–604. https://doi.org/10.1002/sim.3495 Bretz, F., Maurer, W., Hommel, G. (2011). Test power considerations multiple endpoint analyses using sequentially rejective graphical procedures. Statistics Medicine, 30(13), 1489–1501. https://doi.org/10.1002/sim.3988 Bretz, F., Posch, M., Glimm, E., Klinglmueller, F., Maurer, W., Rohmeyer, K. (2011). Graphical approaches multiple comparison procedures using weighted Bonferroni, Simes, parametric tests. Biometrical Journal, 53(6), 894–913. https://doi.org/10.1002/bimj.201000239 Lu, K. (2016). Graphical approaches using Bonferroni mixture weighted Simes tests. Statistics Medicine, 35(22), 4041–4055. https://doi.org/10.1002/sim.6985 Xi, D., Glimm, E., Maurer, W., Bretz, F. (2017). unified framework weighted parametric multiple test procedures. Biometrical Journal, 59(5), 918–931. https://doi.org/10.1002/bimj.201600233 Xi, D., Bretz, F. (2019). Symmetric graphs equally weighted tests, application Hochberg procedure. Statistics Medicine, 38(27), 5268–5282. https://doi.org/10.1002/sim.8375 Rohmeyer K, Klinglmueller F (2020). gMCP: Graph Based Multiple Test Procedures. R package version 0.8-15, https://cran.r-project.org/package=gMCP.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_calculate_power.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Obtain hypothesis rejection probabilities — graph_calculate_power","text":"","code":"par_gate <- simple_successive_1() # The default is to test all hypotheses with: Bonferroni testing at alpha # level .025, 0 mean under the alternative, and 0 correlation between # hypotheses under the alternative # The default of 100 simulations will usually need to be increased graph_calculate_power(par_gate, sim_n = 1e5) #> #> Test parameters ($inputs) ------------------------------------------------------ #> Initial graph #> #> --- Hypothesis weights --- #> H1: 0.5 #> H2: 0.5 #> H3: 0.0 #> H4: 0.0 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 0 0 1 0 #> H2 0 0 0 1 #> H3 0 1 0 0 #> H4 1 0 0 0 #> #> Alpha = 0.025 #> #> Test types #> bonferroni: (H1, H2, H3, H4) #> #> Simulation parameters ($inputs) ------------------------------------------------ #> Testing 100,000 simulations with multivariate normal params: #> #> H1 H2 H3 H4 #> Marginal power: 0.025 0.025 0.025 0.025 #> #> Correlation: H1 H2 H3 H4 #> H1 1 0 0 0 #> H2 0 1 0 0 #> H3 0 0 1 0 #> H4 0 0 0 1 #> #> Power calculation ($power) ----------------------------------------------------- #> H1 H2 H3 H4 #> Local power: 0.01201 0.01166 0.00016 0.00019 #> #> Expected no. of rejections: 0.02402 #> Power to reject 1 or more: 0.02349 #> Power to reject all: 0 #> # But any test group/type combination that works for [graph_test_closure()] # can be used graph_calculate_power( par_gate, alpha = .025, test_groups = list(1:2, 3:4), test_types = c(\"s\", \"p\"), test_corr = list(NA, diag(2)), sim_n = 1e5, sim_success = list( function(.) .[1] || .[2], function(.) .[1] && .[2] ) ) #> #> Test parameters ($inputs) ------------------------------------------------------ #> Initial graph #> #> --- Hypothesis weights --- #> H1: 0.5 #> H2: 0.5 #> H3: 0.0 #> H4: 0.0 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 0 0 1 0 #> H2 0 0 0 1 #> H3 0 1 0 0 #> H4 1 0 0 0 #> #> Alpha = 0.025 #> #> Parametric testing correlation: H3 H4 #> H3 1 0 #> H4 0 1 #> #> Test types #> simes: (H1, H2) #> parametric: (H3, H4) #> #> Simulation parameters ($inputs) ------------------------------------------------ #> Testing 100,000 simulations with multivariate normal params: #> #> H1 H2 H3 H4 #> Marginal power: 0.025 0.025 0.025 0.025 #> #> Correlation: H1 H2 H3 H4 #> H1 1 0 0 0 #> H2 0 1 0 0 #> H3 0 0 1 0 #> H4 0 0 0 1 #> #> Power calculation ($power) ----------------------------------------------------- #> H1 H2 H3 H4 #> Local power: 0.01203 0.01215 0.00018 0.00021 #> #> Expected no. of rejections: 0.02457 #> Power to reject 1 or more: 0.02403 #> Power to reject all: 0 #> #> Power to reject: .[1] || .[2] .[1] && .[2] #> 0.02403 0.00015 #>"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_create.html","id":null,"dir":"Reference","previous_headings":"","what":"Define a graph representing a multiple comparison procedure — graph_create","title":"Define a graph representing a multiple comparison procedure — graph_create","text":"multiple comparison procedure graph can represented 1) vector initial hypothesis weights, 2) matrix initial transition weights. function creates initial graph object using vector matrix. also validates inputs make sure combine form valid graph.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_create.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Define a graph representing a multiple comparison procedure — graph_create","text":"","code":"graph_create(hypotheses, transitions, hyp_names = NULL)"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_create.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Define a graph representing a multiple comparison procedure — graph_create","text":"hypotheses numeric vector hypothesis weights initial graphical multiple comparison procedure. Must vector values 0 & 1 (inclusive). length match row column lengths transitions. sum hypothesis weights exceed 1 transitions numeric matrix transition weights hypotheses initial graphical multiple comparison procedure. Must square matrix values 0 & 1 (inclusive). row column lengths match length hypotheses. row (Transition weights leaving hypothesis) can sum 1. diagonal (Transition weights hypothesis ) must 0s hyp_names (Optional) character vector hypothesis names. provided, names hypotheses transitions used. names specified, hypotheses named sequentially H1, H2, ...","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_create.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Define a graph representing a multiple comparison procedure — graph_create","text":"S3 object class initial_graph. underlying structure list elements hypotheses transitions","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_create.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Define a graph representing a multiple comparison procedure — graph_create","text":"validations performed : Weights numeric Length hypotheses dimensions transitions Explicit hyp_names override names hypotheses transitions Hypothesis weights must non-negative sum 1 Transition weights matrix: Diagonal must 1 Rows must sum 1 Values must non-negative","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_create.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Define a graph representing a multiple comparison procedure — graph_create","text":"Bretz, F., Maurer, W., Brannath, W., Posch, M. (2009). graphical approach sequentially rejective multiple test procedures. Statistics Medicine, 28(4), 586–604. https://doi.org/10.1002/sim.3495 Bretz, F., Maurer, W., Hommel, G. (2011). Test power considerations multiple endpoint analyses using sequentially rejective graphical procedures. Statistics Medicine, 30(13), 1489–1501. https://doi.org/10.1002/sim.3988 Bretz, F., Posch, M., Glimm, E., Klinglmueller, F., Maurer, W., Rohmeyer, K. (2011). Graphical approaches multiple comparison procedures using weighted Bonferroni, Simes, parametric tests. Biometrical Journal, 53(6), 894–913. https://doi.org/10.1002/bimj.201000239 Lu, K. (2016). Graphical approaches using Bonferroni mixture weighted Simes tests. Statistics Medicine, 35(22), 4041–4055. https://doi.org/10.1002/sim.6985 Xi, D., Glimm, E., Maurer, W., Bretz, F. (2017). unified framework weighted parametric multiple test procedures. Biometrical Journal, 59(5), 918–931. https://doi.org/10.1002/bimj.201600233 Xi, D., Bretz, F. (2019). Symmetric graphs equally weighted tests, application Hochberg procedure. Statistics Medicine, 38(27), 5268–5282. https://doi.org/10.1002/sim.8375 Rohmeyer K, Klinglmueller F (2020). gMCP: Graph Based Multiple Test Procedures. R package version 0.8-15, https://cran.r-project.org/package=gMCP.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_create.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Define a graph representing a multiple comparison procedure — graph_create","text":"","code":"# A graphical multiple comparison procedure with two primary hypotheses (H1 # and H2) and two secondary hypotheses (H3 and H4) # See Figure 1 in Bretz, F., Posch, M., Glimm, E., Klinglmueller, F., Maurer, # W., & Rohmeyer, K. (2011). Graphical approaches for multiple comparison # procedures using weighted Bonferroni, Simes, or parametric tests. # Biometrical Journal, 53(6), 894-913. hypotheses <- c(0.5, 0.5, 0, 0) transitions <- rbind( c(0, 0, 1, 0), c(0, 0, 0, 1), c(0, 1, 0, 0), c(1, 0, 0, 0) ) hyp_names <- c(\"H1\", \"H2\", \"H3\", \"H4\") g <- graph_create(hypotheses, transitions, hyp_names) g #> Initial graph #> #> --- Hypothesis weights --- #> H1: 0.5 #> H2: 0.5 #> H3: 0.0 #> H4: 0.0 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 0 0 1 0 #> H2 0 0 0 1 #> H3 0 1 0 0 #> H4 1 0 0 0 # Explicit names override names in `hypotheses` (with a warning) hypotheses <- c(h1 = 0.5, h2 = 0.5, h3 = 0, h4 = 0) transitions <- rbind( c(0, 0, 1, 0), c(0, 0, 0, 1), c(0, 1, 0, 0), c(1, 0, 0, 0) ) g <- graph_create(hypotheses, transitions, hyp_names) #> Warning: Hypothesis names specified - overriding names in #> `hypotheses` and `transitions` g #> Initial graph #> #> --- Hypothesis weights --- #> H1: 0.5 #> H2: 0.5 #> H3: 0.0 #> H4: 0.0 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 0 0 1 0 #> H2 0 0 0 1 #> H3 0 1 0 0 #> H4 1 0 0 0 # Explicit names override names in `transitions` (with a warning) hypotheses <- c(0.5, 0.5, 0, 0) transitions <- rbind( h1 = c(0, 0, 1, 0), h2 = c(0, 0, 0, 1), h3 = c(0, 1, 0, 0), h4 = c(1, 0, 0, 0) ) g <- graph_create(hypotheses, transitions, hyp_names) #> Warning: Hypothesis names specified - overriding names in #> `hypotheses` and `transitions` g #> Initial graph #> #> --- Hypothesis weights --- #> H1: 0.5 #> H2: 0.5 #> H3: 0.0 #> H4: 0.0 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 0 0 1 0 #> H2 0 0 0 1 #> H3 0 1 0 0 #> H4 1 0 0 0 # Use names in `hypotheses` hypotheses <- c(H1 = 0.5, H2 = 0.5, H3 = 0, H4 = 0) transitions <- rbind( c(0, 0, 1, 0), c(0, 0, 0, 1), c(0, 1, 0, 0), c(1, 0, 0, 0) ) g <- graph_create(hypotheses, transitions) g #> Initial graph #> #> --- Hypothesis weights --- #> H1: 0.5 #> H2: 0.5 #> H3: 0.0 #> H4: 0.0 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 0 0 1 0 #> H2 0 0 0 1 #> H3 0 1 0 0 #> H4 1 0 0 0 # Use names in `transitions` hypotheses <- c(0.5, 0.5, 0, 0) transitions <- rbind( H1 = c(0, 0, 1, 0), H2 = c(0, 0, 0, 1), H3 = c(0, 1, 0, 0), H4 = c(1, 0, 0, 0) ) g <- graph_create(hypotheses, transitions) g #> Initial graph #> #> --- Hypothesis weights --- #> H1: 0.5 #> H2: 0.5 #> H3: 0.0 #> H4: 0.0 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 0 0 1 0 #> H2 0 0 0 1 #> H3 0 1 0 0 #> H4 1 0 0 0 # When names are not specified, hypotheses are numbered sequentially as # H1, H2, ... hypotheses <- c(0.5, 0.5, 0, 0) transitions <- rbind( c(0, 0, 1, 0), c(0, 0, 0, 1), c(0, 1, 0, 0), c(1, 0, 0, 0) ) g <- graph_create(hypotheses, transitions) g #> Initial graph #> #> --- Hypothesis weights --- #> H1: 0.5 #> H2: 0.5 #> H3: 0.0 #> H4: 0.0 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 0 0 1 0 #> H2 0 0 0 1 #> H3 0 1 0 0 #> H4 1 0 0 0"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_generate_weights.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate weights for the closure of a graph — graph_generate_weights","title":"Calculate weights for the closure of a graph — graph_generate_weights","text":"closure graph set sub-graphs, intersections hypotheses, graph. Weights sub-graph calculated using weighting strategy defined Bretz et al (2011).","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_generate_weights.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate weights for the closure of a graph — graph_generate_weights","text":"","code":"graph_generate_weights(graph)"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_generate_weights.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate weights for the closure of a graph — graph_generate_weights","text":"graph initial graph returned graph_create()","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_generate_weights.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate weights for the closure of a graph — graph_generate_weights","text":"numeric matrix intersection hypothesis weights. row corresponds single intersection hypothesis. first half columns indicate hypotheses included given intersection hypothesis, second half columns weights","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_generate_weights.html","id":"performance","dir":"Reference","previous_headings":"","what":"Performance","title":"Calculate weights for the closure of a graph — graph_generate_weights","text":"Much thought given performance code, memory time usage can grow quickly graph size grows. systems used testing, size 10 graph median run time 20-60 ms. Run time increases rate O(2 ^ n), e.g. size 5 graph takes approximately twice long run size 4 graph. See vignette(\"generate-weights-performance\") detailed analysis explanation","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_generate_weights.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Calculate weights for the closure of a graph — graph_generate_weights","text":"Bretz, F., Maurer, W., Brannath, W., Posch, M. (2009). graphical approach sequentially rejective multiple test procedures. Statistics Medicine, 28(4), 586–604. https://doi.org/10.1002/sim.3495 Bretz, F., Maurer, W., Hommel, G. (2011). Test power considerations multiple endpoint analyses using sequentially rejective graphical procedures. Statistics Medicine, 30(13), 1489–1501. https://doi.org/10.1002/sim.3988 Bretz, F., Posch, M., Glimm, E., Klinglmueller, F., Maurer, W., Rohmeyer, K. (2011). Graphical approaches multiple comparison procedures using weighted Bonferroni, Simes, parametric tests. Biometrical Journal, 53(6), 894–913. https://doi.org/10.1002/bimj.201000239 Lu, K. (2016). Graphical approaches using Bonferroni mixture weighted Simes tests. Statistics Medicine, 35(22), 4041–4055. https://doi.org/10.1002/sim.6985 Xi, D., Glimm, E., Maurer, W., Bretz, F. (2017). unified framework weighted parametric multiple test procedures. Biometrical Journal, 59(5), 918–931. https://doi.org/10.1002/bimj.201600233 Xi, D., Bretz, F. (2019). Symmetric graphs equally weighted tests, application Hochberg procedure. Statistics Medicine, 38(27), 5268–5282. https://doi.org/10.1002/sim.8375 Rohmeyer K, Klinglmueller F (2020). gMCP: Graph Based Multiple Test Procedures. R package version 0.8-15, https://cran.r-project.org/package=gMCP.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_generate_weights.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculate weights for the closure of a graph — graph_generate_weights","text":"","code":"par_gate <- graph_create( hypotheses = c(.5, .5, 0, 0), transitions = rbind( c(0, 0, 1, 0), c(0, 0, 0, 1), c(0, 1, 0, 0), c(1, 0, 0, 0) ) ) graph_generate_weights(par_gate) #> H1 H2 H3 H4 H1 H2 H3 H4 #> 1 1 1 1 1 0.5 0.5 0.0 0.0 #> 2 1 1 1 0 0.5 0.5 0.0 0.0 #> 3 1 1 0 1 0.5 0.5 0.0 0.0 #> 4 1 1 0 0 0.5 0.5 0.0 0.0 #> 5 1 0 1 1 0.5 0.0 0.0 0.5 #> 6 1 0 1 0 1.0 0.0 0.0 0.0 #> 7 1 0 0 1 0.5 0.0 0.0 0.5 #> 8 1 0 0 0 1.0 0.0 0.0 0.0 #> 9 0 1 1 1 0.0 0.5 0.5 0.0 #> 10 0 1 1 0 0.0 0.5 0.5 0.0 #> 11 0 1 0 1 0.0 1.0 0.0 0.0 #> 12 0 1 0 0 0.0 1.0 0.0 0.0 #> 13 0 0 1 1 0.0 0.0 0.5 0.5 #> 14 0 0 1 0 0.0 0.0 1.0 0.0 #> 15 0 0 0 1 0.0 0.0 0.0 1.0"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_rejection_orderings.html","id":null,"dir":"Reference","previous_headings":"","what":"Find alternate rejection orderings for shortcut testing — graph_rejection_orderings","title":"Find alternate rejection orderings for shortcut testing — graph_rejection_orderings","text":"using graph_test_shortcut(), may multiple hypotheses can rejected step. specific hypothesis chosen decided based minimum adjusted p-value. function shows every order deletes hypotheses, hypothesis still valid deletion step chosen.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_rejection_orderings.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find alternate rejection orderings for shortcut testing — graph_rejection_orderings","text":"","code":"graph_rejection_orderings(shortcut_test_result)"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_rejection_orderings.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find alternate rejection orderings for shortcut testing — graph_rejection_orderings","text":"shortcut_test_result graph_report object returned graph_test_shortcut()","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_rejection_orderings.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find alternate rejection orderings for shortcut testing — graph_rejection_orderings","text":"modified graph_report object containing valid orderings deleting significant hypotheses","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_rejection_orderings.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find alternate rejection orderings for shortcut testing — graph_rejection_orderings","text":"","code":"graph <- simple_successive_2() short_res <- graph_test_shortcut(graph, c(.018, .01, .03, .004)) # Reject H1, H2, and H4 short_res$outputs$rejected #> H1 H2 H3 H4 #> TRUE TRUE FALSE TRUE # But these cannot be rejected in any order - For instance, H4 has 0 weight # in the initial graph and cannot be rejected first graph_rejection_orderings(short_res) #> #> Test parameters ($inputs) ------------------------------------------------------ #> Initial graph #> #> --- Hypothesis weights --- #> H1: 0.5 #> H2: 0.5 #> H3: 0.0 #> H4: 0.0 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 0.0 0.5 0.5 0.0 #> H2 0.5 0.0 0.0 0.5 #> H3 0.0 1.0 0.0 0.0 #> H4 1.0 0.0 0.0 0.0 #> #> Alpha = 0.025 #> #> H1 H2 H3 H4 #> Unadjusted p-values: 0.018 0.010 0.030 0.004 #> #> Test types #> bonferroni: (H1, H2, H3, H4) #> #> Test summary ($outputs) -------------------------------------------------------- #> Hypothesis Adj. P-value Reject #> H1 0.02 TRUE #> H2 0.02 TRUE #> H3 0.03 FALSE #> H4 0.02 TRUE #> #> Final updated graph after removing rejected hypotheses #> #> --- Hypothesis weights --- #> H1: NA #> H2: NA #> H3: 1 #> H4: NA #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 NA NA NA NA #> H2 NA NA NA NA #> H3 NA NA 0 NA #> H4 NA NA NA NA #> #> Alternate rejection orderings ($valid_rejection_orderings) --------------------- #> H2 H4 H1 #> 2 4 1 #> #> H2 H1 H4 #> 2 1 4 #> # Finally, intermediate graphs can be obtained by putting one of the # orderings outputs into `graph_update()` graph_update(graph, delete = c(2, 1, 4)) #> Initial graph #> #> --- Hypothesis weights --- #> H1: 0.5 #> H2: 0.5 #> H3: 0.0 #> H4: 0.0 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 0.0 0.5 0.5 0.0 #> H2 0.5 0.0 0.0 0.5 #> H3 0.0 1.0 0.0 0.0 #> H4 1.0 0.0 0.0 0.0 #> #> Updated graph after deleting hypotheses 2, 1, 4 #> #> --- Hypothesis weights --- #> H1: NA #> H2: NA #> H3: 1 #> H4: NA #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 NA NA NA NA #> H2 NA NA NA NA #> H3 NA NA 0 NA #> H4 NA NA NA NA #> #> Deletion sequence ($intermediate_graphs) --------------------------------------- #> #> Initial graph #> #> --- Hypothesis weights --- #> H1: 0.5 #> H2: 0.5 #> H3: 0.0 #> H4: 0.0 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 0.0 0.5 0.5 0.0 #> H2 0.5 0.0 0.0 0.5 #> H3 0.0 1.0 0.0 0.0 #> H4 1.0 0.0 0.0 0.0 #> #> Step 1: Updated graph after removing hypothesis 2 #> #> --- Hypothesis weights --- #> H1: 0.75 #> H2: NA #> H3: 0.00 #> H4: 0.25 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 0.000000 NA 0.666667 0.333333 #> H2 NA NA NA NA #> H3 0.500000 NA 0.000000 0.500000 #> H4 1.000000 NA 0.000000 0.000000 #> #> Step 2: Updated graph after removing hypotheses 2, 1 #> #> --- Hypothesis weights --- #> H1: NA #> H2: NA #> H3: 0.5 #> H4: 0.5 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 NA NA NA NA #> H2 NA NA NA NA #> H3 NA NA 0 1 #> H4 NA NA 1 0 #> #> Step 3: Updated graph after removing hypotheses 2, 1, 4 #> #> --- Hypothesis weights --- #> H1: NA #> H2: NA #> H3: 1 #> H4: NA #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 NA NA NA NA #> H2 NA NA NA NA #> H3 NA NA 0 NA #> H4 NA NA NA NA #> #> Final updated graph after removing deleted hypotheses #> #> --- Hypothesis weights --- #> H1: NA #> H2: NA #> H3: 1 #> H4: NA #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 NA NA NA NA #> H2 NA NA NA NA #> H3 NA NA 0 NA #> H4 NA NA NA NA #>"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_update.html","id":null,"dir":"Reference","previous_headings":"","what":"Delete hypotheses from a graph — graph_update","title":"Delete hypotheses from a graph — graph_update","text":"always obvious graph's weights look like deleting one hypotheses. graph_generate_weights() calculates sub-graphs' hypothesis weights, graph_update() gives detailed view single set deletions, including transition weights well.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_update.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Delete hypotheses from a graph — graph_update","text":"","code":"graph_update(graph, delete)"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_update.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Delete hypotheses from a graph — graph_update","text":"graph initial graph returned graph_create() delete logical integer vector, denoting hypotheses keep/delete. logical vector must match size graph, one entry per hypothesis, results \"unordered mode,\" selected hypotheses deleted sequential order. integer vector can length, must contain valid hypothesis numbers (greater 0, less equal size graph). trigger \"ordered mode,\" selected hypotheses deleted order appear delete","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_update.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Delete hypotheses from a graph — graph_update","text":"object class updated_graph 3 elements initial graph object Boolean vector indicating hypotheses kept/deleted updated graph object specific hypotheses deleted","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_update.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Delete hypotheses from a graph — graph_update","text":"Bretz, F., Maurer, W., Brannath, W., Posch, M. (2009). graphical approach sequentially rejective multiple test procedures. Statistics Medicine, 28(4), 586–604. https://doi.org/10.1002/sim.3495 Bretz, F., Maurer, W., Hommel, G. (2011). Test power considerations multiple endpoint analyses using sequentially rejective graphical procedures. Statistics Medicine, 30(13), 1489–1501. https://doi.org/10.1002/sim.3988 Bretz, F., Posch, M., Glimm, E., Klinglmueller, F., Maurer, W., Rohmeyer, K. (2011). Graphical approaches multiple comparison procedures using weighted Bonferroni, Simes, parametric tests. Biometrical Journal, 53(6), 894–913. https://doi.org/10.1002/bimj.201000239 Lu, K. (2016). Graphical approaches using Bonferroni mixture weighted Simes tests. Statistics Medicine, 35(22), 4041–4055. https://doi.org/10.1002/sim.6985 Xi, D., Glimm, E., Maurer, W., Bretz, F. (2017). unified framework weighted parametric multiple test procedures. Biometrical Journal, 59(5), 918–931. https://doi.org/10.1002/bimj.201600233 Xi, D., Bretz, F. (2019). Symmetric graphs equally weighted tests, application Hochberg procedure. Statistics Medicine, 38(27), 5268–5282. https://doi.org/10.1002/sim.8375 Rohmeyer K, Klinglmueller F (2020). gMCP: Graph Based Multiple Test Procedures. R package version 0.8-15, https://cran.r-project.org/package=gMCP.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graph_update.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Delete hypotheses from a graph — graph_update","text":"","code":"hypotheses <- c(0.5, 0.5, 0, 0) transitions <- rbind( c(0, 0, 1, 0), c(0, 0, 0, 1), c(0, 1, 0, 0), c(1, 0, 0, 0) ) g <- graph_create(hypotheses, transitions) # Delete the second hypothesis graph_update(g, c(TRUE, FALSE, TRUE, TRUE)) #> Initial graph #> #> --- Hypothesis weights --- #> H1: 0.5 #> H2: 0.5 #> H3: 0.0 #> H4: 0.0 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 0 0 1 0 #> H2 0 0 0 1 #> H3 0 1 0 0 #> H4 1 0 0 0 #> #> Updated graph after deleting hypotheses 1, 3, 4 #> #> --- Hypothesis weights --- #> H1: NA #> H2: 1 #> H3: NA #> H4: NA #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 NA NA NA NA #> H2 NA 0 NA NA #> H3 NA NA NA NA #> H4 NA NA NA NA # Equivalent # graph_update(g, 2)"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graphicalMCP-package.html","id":null,"dir":"Reference","previous_headings":"","what":"graphicalMCP: Graphical Approach for Multiple Comparison Procedures — graphicalMCP-package","title":"graphicalMCP: Graphical Approach for Multiple Comparison Procedures — graphicalMCP-package","text":"multiple comparison procedure (multiple test procedure) statistical analysis method determining efficacy multiple drugs, multiple doses drug, single clinical trial. (Bretz et al., 2011) laid graph-based approach multiple comparison procedures, weights vertices edges graph determined independently particular statistical test used assess results. low-dependency implementation methods described subsequent papers.","code":""},{"path":[]},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/graphicalMCP-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"graphicalMCP: Graphical Approach for Multiple Comparison Procedures — graphicalMCP-package","text":"Maintainer: Dong Xi dong.xi@gilead.com Authors: Ethan Brockmann ethan.brockmann@atorusresearch.com contributors: Gilead Biostatistics [copyright holder, funder] Atorus Research LLC [copyright holder]","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/plot.initial_graph.html","id":null,"dir":"Reference","previous_headings":"","what":"S3 plot method for the class initial_graph — plot.initial_graph","title":"S3 plot method for the class initial_graph — plot.initial_graph","text":"S3 plot method class initial_graph","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/plot.initial_graph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"S3 plot method for the class initial_graph — plot.initial_graph","text":"","code":"# S3 method for initial_graph plot( x, ..., layout = \"grid\", nrow = NULL, ncol = NULL, edge_curves = NULL, precision = 4, eps = NULL, background_color = \"white\", margins = c(0, 0, 0, 0) )"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/plot.initial_graph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"S3 plot method for the class initial_graph — plot.initial_graph","text":"x initial graph returned graph_create() ... arguments passed igraph::plot.igraph() layout igraph layout specification (See ?igraph.plotting), \"grid\", lays hypotheses left--right, top--bottom nrow rows ncol columns. nrow integer scalar specifying number rows vertex grid. row columns counts specified, vertices laid close square possible. ncol integer scalar specifying number columns vertex grid. row columns counts specified, vertices laid close square possible. edge_curves named numeric vector specifying curvature edges. Edge pairs (two vertices share edge possible direction) detected automatically get 0.25 curvature. Adjust edges adding entry name \"vertex1|vertex2. Adjust default edge pairs curvature adding entry name \"pairs\". precision integer scalar specifying many decimal places displayed weights eps numeric scalar. Edge weights 0 eps displayed \\(\\epsilon\\), edge weights 1 - eps 1 displayed \\(1 - \\epsilon\\) background_color character scalar specifying background color whole plotting area. Passed directly graphics::par() (bg) margins length 4 numeric vector specifying margins plot. Defaults 0, since igraph plots tend large margins. passed directly graphics::par() (mar)","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/plot.initial_graph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"S3 plot method for the class initial_graph — plot.initial_graph","text":"NULL, plotting graph","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/plot.initial_graph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"S3 plot method for the class initial_graph — plot.initial_graph","text":"","code":"plot(simple_successive_2(), layout = \"grid\")"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/plot.updated_graph.html","id":null,"dir":"Reference","previous_headings":"","what":"S3 plot method for the class updated_graph — plot.updated_graph","title":"S3 plot method for the class updated_graph — plot.updated_graph","text":"S3 plot method class updated_graph","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/plot.updated_graph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"S3 plot method for the class updated_graph — plot.updated_graph","text":"","code":"# S3 method for updated_graph plot(x, ...)"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/plot.updated_graph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"S3 plot method for the class updated_graph — plot.updated_graph","text":"x updated_graph object returned graph_update() ... Arguments passed plot.initial_graph layout igraph layout specification (See ?igraph.plotting), \"grid\", lays hypotheses left--right, top--bottom nrow rows ncol columns. nrow integer scalar specifying number rows vertex grid. row columns counts specified, vertices laid close square possible. ncol integer scalar specifying number columns vertex grid. row columns counts specified, vertices laid close square possible. edge_curves named numeric vector specifying curvature edges. Edge pairs (two vertices share edge possible direction) detected automatically get 0.25 curvature. Adjust edges adding entry name \"vertex1|vertex2. Adjust default edge pairs curvature adding entry name \"pairs\". precision integer scalar specifying many decimal places displayed weights eps numeric scalar. Edge weights 0 eps displayed \\(\\epsilon\\), edge weights 1 - eps 1 displayed \\(1 - \\epsilon\\) background_color character scalar specifying background color whole plotting area. Passed directly graphics::par() (bg) margins length 4 numeric vector specifying margins plot. Defaults 0, since igraph plots tend large margins. passed directly graphics::par() (mar)","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/plot.updated_graph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"S3 plot method for the class updated_graph — plot.updated_graph","text":"NULL, plotting graph","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/plot.updated_graph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"S3 plot method for the class updated_graph — plot.updated_graph","text":"","code":"plot( graph_update( simple_successive_2(), c(TRUE, FALSE, TRUE, TRUE) ), layout = \"grid\" )"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/print.graph_report.html","id":null,"dir":"Reference","previous_headings":"","what":"S3 print method for class graph_report — print.graph_report","title":"S3 print method for class graph_report — print.graph_report","text":"graph report displays initial graph tested, p-values & alpha used tests, hypotheses can rejected, Detailed test results matrix, including results graph_generate_weights() & test results intersection hypothesis","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/print.graph_report.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"S3 print method for class graph_report — print.graph_report","text":"","code":"# S3 method for graph_report print(x, ..., precision = 4, indent = 2, rows = 10)"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/print.graph_report.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"S3 print method for class graph_report — print.graph_report","text":"x object class graph_report print ... values passed methods (currently unused) precision integer scalar indicating maximum number decimals include numeric values indent integer scalar indicating many spaces indent results rows integer scalar indicating many rows verbose test values output print","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/print.initial_graph.html","id":null,"dir":"Reference","previous_headings":"","what":"S3 print method for the class initial_graph — print.initial_graph","title":"S3 print method for the class initial_graph — print.initial_graph","text":"printed initial_graph displays header stating object , hypothesis weights, transition weights.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/print.initial_graph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"S3 print method for the class initial_graph — print.initial_graph","text":"","code":"# S3 method for initial_graph print(x, ..., precision = 4, indent = 0, title = \"Initial graph\")"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/print.initial_graph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"S3 print method for the class initial_graph — print.initial_graph","text":"x object class initial_graph print ... values passed methods (currently unused) precision integer scalar indicating maximum number decimals include numeric values indent integer scalar indicating many spaces indent results title First line printing, used internally distinguish initial graphs updated graphs","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/print.power_report.html","id":null,"dir":"Reference","previous_headings":"","what":"S3 print method for class power_report — print.power_report","title":"S3 print method for class power_report — print.power_report","text":"power report displays initial graph tested, Testing simulation options, Final power calculations, (Partial) Detailed p-values test results - underlying object contains full tables","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/print.power_report.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"S3 print method for class power_report — print.power_report","text":"","code":"# S3 method for power_report print(x, ..., precision = 4, indent = 2, rows = 10)"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/print.power_report.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"S3 print method for class power_report — print.power_report","text":"x object class power_report print ... values passed methods (currently unused) precision integer scalar indicating maximum number decimals include numeric values indent integer scalar indicating many spaces indent results rows integer scalar indicating many rows verbose output print","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/print.updated_graph.html","id":null,"dir":"Reference","previous_headings":"","what":"S3 print method for class updated_graph — print.updated_graph","title":"S3 print method for class updated_graph — print.updated_graph","text":"printed updated_graph displays initial graph, vector keep/delete hypotheses, updated graph","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/print.updated_graph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"S3 print method for class updated_graph — print.updated_graph","text":"","code":"# S3 method for updated_graph print(x, ..., precision = 6, indent = 2)"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/print.updated_graph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"S3 print method for class updated_graph — print.updated_graph","text":"x object class updated_graph print ... values passed methods (currently unused) precision integer scalar indicating maximum number decimals include numeric values indent integer scalar indicating many spaces indent results","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/testing-fast.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate hypothesis rejection results efficiently — graph_test_closure_fast","title":"Calculate hypothesis rejection results efficiently — graph_test_closure_fast","text":"insight nice reporting, prefer graph_test_closure() graph_test_shortcut() options. reasonably fast interactive use. However order minimize power run time, efficient testing functions available. power simulation can segmented certain parts, like generating weights calculating adjusted weights, can done single time. closure testing function stripped just vectorized lines efficiency. separate optimized function available testing graph Bonferroni sequential shortcut.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/testing-fast.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate hypothesis rejection results efficiently — graph_test_closure_fast","text":"","code":"graph_test_closure_fast(p, alpha, adjusted_weights, matrix_intersections) graph_test_shortcut_fast(p, alpha, adjusted_weights)"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/testing-fast.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate hypothesis rejection results efficiently — graph_test_closure_fast","text":"p numeric vector p-values alpha numeric scalar specifying global significance level testing adjusted_weights weights (second half columns) graph_generate_weights() output, adjusted appropriate testing algorithm (Bonferroni, Simes, parametric) graph initial graph returned graph_create() intersections first half columns graph_generate_weights() output, indicating hypotheses contained intersection","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/testing-fast.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate hypothesis rejection results efficiently — graph_test_closure_fast","text":"logical integer vector results indicating whether hypothesis can accepted rejected globally.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/testing-fast.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Calculate hypothesis rejection results efficiently — graph_test_closure_fast","text":"Bretz, F., Maurer, W., Brannath, W., Posch, M. (2009). graphical approach sequentially rejective multiple test procedures. Statistics Medicine, 28(4), 586–604. https://doi.org/10.1002/sim.3495 Bretz, F., Maurer, W., Hommel, G. (2011). Test power considerations multiple endpoint analyses using sequentially rejective graphical procedures. Statistics Medicine, 30(13), 1489–1501. https://doi.org/10.1002/sim.3988 Bretz, F., Posch, M., Glimm, E., Klinglmueller, F., Maurer, W., Rohmeyer, K. (2011). Graphical approaches multiple comparison procedures using weighted Bonferroni, Simes, parametric tests. Biometrical Journal, 53(6), 894–913. https://doi.org/10.1002/bimj.201000239 Lu, K. (2016). Graphical approaches using Bonferroni mixture weighted Simes tests. Statistics Medicine, 35(22), 4041–4055. https://doi.org/10.1002/sim.6985 Xi, D., Glimm, E., Maurer, W., Bretz, F. (2017). unified framework weighted parametric multiple test procedures. Biometrical Journal, 59(5), 918–931. https://doi.org/10.1002/bimj.201600233 Xi, D., Bretz, F. (2019). Symmetric graphs equally weighted tests, application Hochberg procedure. Statistics Medicine, 38(27), 5268–5282. https://doi.org/10.1002/sim.8375 Rohmeyer K, Klinglmueller F (2020). gMCP: Graph Based Multiple Test Procedures. R package version 0.8-15, https://cran.r-project.org/package=gMCP.","code":""},{"path":[]},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/testing-fast.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculate hypothesis rejection results efficiently — graph_test_closure_fast","text":"","code":"par_gate <- simple_successive_1() num_hyps <- length(par_gate$hypotheses) p <- c(.001, .02, .002, .03) weighting_strategy <- graph_generate_weights(par_gate) intersections <- weighting_strategy[, seq_len(num_hyps), drop = FALSE] adjusted_weights <- weighting_strategy[, seq_len(num_hyps) + num_hyps, drop = FALSE] graphicalMCP:::graph_test_closure_fast( p, .025, adjusted_weights, intersections ) #> H1 H2 H3 H4 #> TRUE TRUE TRUE FALSE graphicalMCP:::graph_test_shortcut_fast( p, .025, adjusted_weights ) #> H1 H2 H3 H4 #> TRUE TRUE TRUE FALSE"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/testing.html","id":null,"dir":"Reference","previous_headings":"","what":"Report details of hypothesis rejections — graph_test_closure","title":"Report details of hypothesis rejections — graph_test_closure","text":"slower graph testing functions design choices made favor ease interpreting results speed. Results include hypothesis rejection decisions, also test values led final result. functions include options reporting details using adjusted p-value method adjusted weight method.","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/testing.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Report details of hypothesis rejections — graph_test_closure","text":"","code":"graph_test_closure( graph, p, alpha = 0.025, test_groups = list(seq_along(graph$hypotheses)), test_types = c(\"bonferroni\"), test_corr = rep(list(NA), length(test_types)), verbose = FALSE, test_values = FALSE ) graph_test_shortcut( graph, p, alpha = 0.025, verbose = FALSE, test_values = FALSE )"},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/testing.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Report details of hypothesis rejections — graph_test_closure","text":"graph initial graph returned graph_create() p numeric vector p-values alpha numeric scalar specifying global significance level testing test_groups list numeric vectors specifying hypotheses test together test_types character vector tests apply given groups test_corr (Optional) numeric matrix correlations hypotheses' test statistics verbose logical scalar specifying whether results intersection hypothesis included test_values logical scalar specifying whether hypothesis-level detail included results, including calculating adjusted weights parametric tests","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/testing.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Report details of hypothesis rejections — graph_test_closure","text":"graph_report object, list 4 elements: inputs, outputs, details, test_values Inputs - list input parameters used run test Outputs - list global test results Details - matrix detailed adjusted p-value results (graph deletion sequence shortcut testing) Test values - data frame hypothesis-level test details intersection (step shortcut testing)","code":""},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/testing.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Report details of hypothesis rejections — graph_test_closure","text":"Bretz, F., Maurer, W., Brannath, W., Posch, M. (2009). graphical approach sequentially rejective multiple test procedures. Statistics Medicine, 28(4), 586–604. https://doi.org/10.1002/sim.3495 Bretz, F., Maurer, W., Hommel, G. (2011). Test power considerations multiple endpoint analyses using sequentially rejective graphical procedures. Statistics Medicine, 30(13), 1489–1501. https://doi.org/10.1002/sim.3988 Bretz, F., Posch, M., Glimm, E., Klinglmueller, F., Maurer, W., Rohmeyer, K. (2011). Graphical approaches multiple comparison procedures using weighted Bonferroni, Simes, parametric tests. Biometrical Journal, 53(6), 894–913. https://doi.org/10.1002/bimj.201000239 Lu, K. (2016). Graphical approaches using Bonferroni mixture weighted Simes tests. Statistics Medicine, 35(22), 4041–4055. https://doi.org/10.1002/sim.6985 Xi, D., Glimm, E., Maurer, W., Bretz, F. (2017). unified framework weighted parametric multiple test procedures. Biometrical Journal, 59(5), 918–931. https://doi.org/10.1002/bimj.201600233 Xi, D., Bretz, F. (2019). Symmetric graphs equally weighted tests, application Hochberg procedure. Statistics Medicine, 38(27), 5268–5282. https://doi.org/10.1002/sim.8375 Rohmeyer K, Klinglmueller F (2020). gMCP: Graph Based Multiple Test Procedures. R package version 0.8-15, https://cran.r-project.org/package=gMCP.","code":""},{"path":[]},{"path":"https://urban-sniffle-p11zlpj.pages.github.io/reference/testing.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Report details of hypothesis rejections — graph_test_closure","text":"","code":"hypotheses <- c(0.5, 0.5, 0, 0) transitions <- rbind( c(0, 0, 1, 0), c(0, 0, 0, 1), c(0, 1, 0, 0), c(1, 0, 0, 0) ) g <- graph_create(hypotheses, transitions) p <- c(.01, .005, .015, .022) test_corr <- list(NA, matrix(c(1, .5, .5, 1), nrow = 2, byrow = TRUE)) # The default is all Bonferroni with alpha = .025 graph_test_closure(g, p) #> #> Test parameters ($inputs) ------------------------------------------------------ #> Initial graph #> #> --- Hypothesis weights --- #> H1: 0.5 #> H2: 0.5 #> H3: 0.0 #> H4: 0.0 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 0 0 1 0 #> H2 0 0 0 1 #> H3 0 1 0 0 #> H4 1 0 0 0 #> #> Alpha = 0.025 #> #> H1 H2 H3 H4 #> Unadjusted p-values: 0.010 0.005 0.015 0.022 #> #> Test types #> bonferroni: (H1, H2, H3, H4) #> #> Test summary ($outputs) -------------------------------------------------------- #> Hypothesis Adj. P-value Reject #> H1 0.02 TRUE #> H2 0.01 TRUE #> H3 0.03 FALSE #> H4 0.03 FALSE #> #> Final updated graph after removing rejected hypotheses #> #> --- Hypothesis weights --- #> H1: NA #> H2: NA #> H3: 0.5 #> H4: 0.5 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 NA NA NA NA #> H2 NA NA NA NA #> H3 NA NA 0 1 #> H4 NA NA 1 0 #> # But tests can be specified at the hypothesis-level graph_test_closure( graph = g, p = p, alpha = .025, test_groups = list(1:2, 3:4), test_types = c(\"bonferroni\", \"parametric\"), test_corr = test_corr ) #> #> Test parameters ($inputs) ------------------------------------------------------ #> Initial graph #> #> --- Hypothesis weights --- #> H1: 0.5 #> H2: 0.5 #> H3: 0.0 #> H4: 0.0 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 0 0 1 0 #> H2 0 0 0 1 #> H3 0 1 0 0 #> H4 1 0 0 0 #> #> Alpha = 0.025 #> #> H1 H2 H3 H4 #> Unadjusted p-values: 0.010 0.005 0.015 0.022 #> #> Correlation matrix: H3 H4 #> H3 1.0 0.5 #> H4 0.5 1.0 #> #> Test types #> bonferroni: (H1, H2) #> parametric: (H3, H4) #> #> Test summary ($outputs) -------------------------------------------------------- #> Hypothesis Adj. P-value Reject #> H1 0.02000 TRUE #> H2 0.01000 TRUE #> H3 0.02773 FALSE #> H4 0.02773 FALSE #> #> Final updated graph after removing rejected hypotheses #> #> --- Hypothesis weights --- #> H1: NA #> H2: NA #> H3: 0.5 #> H4: 0.5 #> #> --- Transition weights --- #> H1 H2 H3 H4 #> H1 NA NA NA NA #> H2 NA NA NA NA #> H3 NA NA 0 1 #> H4 NA NA 1 0 #>"}]