-
Notifications
You must be signed in to change notification settings - Fork 0
5. Example usage
AHdezS edited this page Jan 23, 2026
·
2 revisions
from sarlib import SAR, OLS, SampleSizeAnalysis, show_scatter
import numpy as np
x = np.random.randn(100, 3) # predictors
y = np.random.randn(100) # response
show_scatter(x, y)
model_sar = SAR(n_realiz=100, norm='epsins', alpha=0.05)
stats_sar = model_sar.fit(x, y, verbose=True)
model_ols = OLS(n_realiz=100, alpha=0.05)
stats_ols = model_ols.fit(x, y, verbose=True)
analysis = SampleSizeAnalysis(model_sar, x, y, steps=7)
analysis.plot_loss()
analysis.plot_pvalue()
analysis.plot_coef()