
#[
#import "@preview/tablex:0.0.8": tablex, cellx, hlinex

#tablex(
    columns: 6,
    auto-vlines: false,
    auto-hlines: false,
    column-gutter: 0.25em,
    hlinex(y: 0, stroke: 1pt),
    cellx(colspan: 4, x: 2, y: 0, align: center + top)[*y*],
    hlinex(y: 1, start: 2, end: 6, stroke: 0.75pt),
    cellx(colspan: 1, x: 2, y: 1, align: center + top)[A],
    cellx(colspan: 2, x: 3, y: 1, align: center + top)[B],
    cellx(colspan: 1, x: 5, y: 1, align: center + top)[A],
    cellx(colspan: 1, x: 2, y: 2, align: center + top)[*z*],
    hlinex(y: 3, start: 2, end: 3, stroke: 0.75pt),
    cellx(colspan: 2, x: 3, y: 2, align: center + top)[*z*],
    hlinex(y: 3, start: 3, end: 5, stroke: 0.75pt),
    cellx(colspan: 1, x: 5, y: 2, align: center + top)[*z*],
    hlinex(y: 3, start: 5, end: 6, stroke: 0.75pt),
    cellx(colspan: 1, x: 1, y: 3, align: center + top)[*Overall*],
    cellx(colspan: 1, x: 2, y: 3, align: center + top)[C],
    cellx(colspan: 1, x: 3, y: 3, align: center + top)[C],
    cellx(colspan: 1, x: 4, y: 3, align: center + top)[D],
    cellx(colspan: 1, x: 5, y: 3, align: center + top)[D],
    hlinex(y: 4, stroke: 0.75pt),
    cellx(colspan: 1, x: 0, y: 4, align: left + top)[*x*],
    cellx(colspan: 1, x: 0, y: 5, align: left + top)[#h(12.0pt)Mean (SD)],
    cellx(colspan: 1, x: 1, y: 5, align: center + top)[3.5 (1.87)],
    cellx(colspan: 1, x: 2, y: 5, align: center + top)[1.5 (0.707)],
    cellx(colspan: 1, x: 3, y: 5, align: center + top)[3 (NaN)],
    cellx(colspan: 1, x: 4, y: 5, align: center + top)[4.5 (0.707)],
    cellx(colspan: 1, x: 5, y: 5, align: center + top)[6 (NaN)],
    cellx(colspan: 1, x: 0, y: 6, align: left + top)[#h(12.0pt)Median [Min, Max]],
    cellx(colspan: 1, x: 1, y: 6, align: center + top)[3.5 [1, 6]],
    cellx(colspan: 1, x: 2, y: 6, align: center + top)[1.5 [1, 2]],
    cellx(colspan: 1, x: 3, y: 6, align: center + top)[3 [3, 3]],
    cellx(colspan: 1, x: 4, y: 6, align: center + top)[4.5 [4, 5]],
    cellx(colspan: 1, x: 5, y: 6, align: center + top)[6 [6, 6]],
    hlinex(y: 7, stroke: 1pt),

)
]
