We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I would like to be able to run a non inferiority power analysis, Ho: B - A ≤ -Δ H1: B - A > -Δ
From what I understand, it's the same as the superiority test, but with the addition of a non inferiority margin (delta).
So I am thinking of achieving it by:
alpha = 0.05 power = 0.8 delta = -3 pw_normal = NormalPowerAnalysis.from_dict( { "splitter": "clustered", "analysis": "clustered_ols", "cluster_cols": ["customer_id"], "n_simulations": 5, "hypothesis": "greater", "seed": 3, "time_col": "margin_date", "target_col": "revenue_value" } ) z_alpha = norm.ppf(1 - alpha) z_beta = norm.ppf(power) generator_se = pw_normal.run_average_standard_error( df=df, experiment_length=range(1,31), ) mde_results = [] for se, days in generator_se: mde = se * (z_alpha + z_beta) + delta mde_results.append((days, se, mde)) mde_df = pd.DataFrame(mde_results, columns=["days", "standard_error", "mde"])
I am not sure if this should be implemented as a new capability of the NormalPowerAnalysis, or it we create a new NonInferiorityNormalPowerAnalysis
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I would like to be able to run a non inferiority power analysis,
Ho: B - A ≤ -Δ
H1: B - A > -Δ
From what I understand, it's the same as the superiority test, but with the addition of a non inferiority margin (delta).
So I am thinking of achieving it by:
I am not sure if this should be implemented as a new capability of the NormalPowerAnalysis, or it we create a new NonInferiorityNormalPowerAnalysis
The text was updated successfully, but these errors were encountered: