Result Classes

These classes wrap the numerical arrays returned by estimation methods and provide human-readable output via __repr__ and summary().

ConfintResult

Returned by SW2023Model.confint_asymptotic().

class sw2023.ConfintResult(phi_hat_ci, r1_ci, r3_ci, se_phi, se_r1, se_r3, alpha)[source]

Bases: object

Asymptotic confidence intervals from SW2023Model.confint_asymptotic().

phi_hat_ci

Lower and upper confidence bounds for the frontier phi_hat(z).

Type:

ndarray, shape (n, 2)

r1_ci

CI for the first conditional moment r_1(z).

Type:

ndarray, shape (n, 2)

r3_ci

CI for the third conditional moment r_3(z).

Type:

ndarray, shape (n, 2)

se_phi

Standard errors for phi_hat(z).

Type:

ndarray, shape (n,)

se_r1

Standard errors for r_1(z).

Type:

ndarray, shape (n,)

se_r3

Standard errors for r_3(z).

Type:

ndarray, shape (n,)

alpha

Significance level used (1 - alpha is the confidence level).

Type:

float

__repr__()[source]

Return repr(self).

summary()[source]

Print a formatted summary of the asymptotic confidence intervals.

BootstrapResult

Returned by SW2023Model.bootstrap() and bootstrap_sw().

class sw2023.BootstrapResult(phi_hat_point, phi_hat_ci, eff_mean_point, eff_mean_ci, eff_individual_point, eff_individual_ci, sigma_eta_point, sigma_eta_ci, B, alpha, n_fail=0)[source]

Bases: object

Bootstrap confidence intervals from SW2023Model.bootstrap() or bootstrap_sw() / bootstrap_panel().

phi_hat_point

Point estimates of the frontier phi_hat(z).

Type:

ndarray, shape (n,)

phi_hat_ci

Bootstrap CI for phi_hat(z).

Type:

ndarray, shape (n, 2)

eff_mean_point

Point estimate of the mean efficiency.

Type:

float

eff_mean_ci

Bootstrap CI for the mean efficiency.

Type:

ndarray, shape (2,)

eff_individual_point

Point estimates of individual efficiency scores.

Type:

ndarray, shape (n,)

eff_individual_ci

Bootstrap CI for individual efficiency scores.

Type:

ndarray, shape (n, 2)

sigma_eta_point

Point estimates of sigma_eta(z).

Type:

ndarray, shape (n,)

sigma_eta_ci

Bootstrap CI for sigma_eta(z).

Type:

ndarray, shape (n, 2)

B

Number of bootstrap draws used.

Type:

int

alpha

Significance level (1 - alpha is the confidence level).

Type:

float

n_fail

Number of bootstrap iterations that failed (should be 0).

Type:

int

__repr__()[source]

Return repr(self).

summary()[source]

Print a formatted summary of bootstrap confidence intervals.

SignificanceTestResult

Returned by test_r3_significance().

class sw2023.SignificanceTestResult(statistic, p_value, r3_hat, T_boot, B)[source]

Bases: object

Wild bootstrap significance test result from test_r3_significance().

Tests H0: E(epsilon^3 | Z) = const (spatially uniform inefficiency) against H1: E(epsilon^3 | Z) != const (heterogeneous inefficiency).

statistic

Observed test statistic T (variance of r_hat_3 relative to Var(eps^3)).

Type:

float

p_value

Bootstrap p-value. Small values (< 0.05) indicate heterogeneous inefficiency; large values indicate the null is not rejected.

Type:

float

r3_hat

Estimated third conditional moment r_hat_3(Z) from the original sample.

Type:

ndarray, shape (n,)

T_boot

Bootstrap distribution of the test statistic.

Type:

ndarray, shape (B,)

B

Number of bootstrap draws used.

Type:

int

__repr__()[source]

Return repr(self).

summary()[source]

Print a formatted summary of the significance test.