コード例 #1
0
ファイル: status.py プロジェクト: lostmachine18/Status
            st.success("Classic ANOVA results")
        else:

            anova = df.anova(dv=x_var, between=[y_var, y_var2])
            st.success("Two-way ANOVA results")

        st.write(anova.round(3))

        if y_var2 == "None":
            st.success("Tukey HSD multiple comparisons")
            tukey_mult = df.pairwise_tukey(dv=x_var, between=y_var).round(3)
            st.write(tukey_mult)

        if y_var2 != "None":
            st.success("Tukey HSD multiple comparisons")
            res = stat()
            st.subheader("Multiple comparisons of the 1st grouping variable")
            res.tukey_hsd(
                df=df,
                res_var=x_var,
                xfac_var=y_var,
                anova_model=
                f"{x_var}~C({y_var})+C({y_var2})+C({y_var}):C({y_var2})")
            st.write(res.tukey_summary)
            st.subheader("Multiple comparisons of the 2nd grouping variable")
            res.tukey_hsd(
                df=df,
                res_var=x_var,
                xfac_var=y_var2,
                anova_model=
                f"{x_var}~C({y_var})+C({y_var2})+C({y_var}):C({y_var2})")
コード例 #2
0
def signi(df):
    res = stat()
    res.ttest(df=df, res=['diff', 'poll'], test_type=3)
    # output
    print(res.summary)