RR = berechne_RR(four_x_four)
CI = berechne_95_CI(four_x_four)
four_x_four_half = FourByFourTable(6, 144, 10, 90)
RR_half = berechne_RR(four_x_four_half)
CI_half = berechne_95_CI(four_x_four_half)
four_x_four_10 = FourByFourTable(120, 2880, 200, 1800)
RR_10 = berechne_RR(four_x_four_10)
CI_10 = berechne_95_CI(four_x_four_10)
fig = go.Figure()
y_axis = ["n=2500", "n=500", "n=250"]
fig.add_trace(
go.Scatter(
x=[RR_10, RR, RR_half],
y=y_axis,
mode="markers",
marker=dict(size=10, symbol="square"),
error_x=dict(
type="data",
symmetric=False,
array=[CI_10[1] - RR_10, CI[1] - RR, CI_half[1] - RR_half],
arrayminus=[RR_10 - CI_10[0], RR - CI[0], RR_half - CI_half[0]],
),
)
)
fig.add_vline(x=1)
fig.add_vline(x=0.7, line_dash="dash")
fig.add_vline(x=1.5, line_dash="dash")
fig.update_layout(xaxis=dict(range=[0, 2]), height=150)
fig.show()