Update app.py
Browse files
app.py
CHANGED
@@ -12,15 +12,23 @@ def Phi(z):
|
|
12 |
def phi(z):
|
13 |
return norm.pdf(z)
|
14 |
|
15 |
-
|
16 |
-
def F_BCNOLLN(y1, y2,
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
|
25 |
def f_BCNOLLN(y1, y2, mu1, sigma1, alpha1, beta1, mu2, sigma2, alpha2, beta2, lambd):
|
26 |
z1 = (y1 - mu1) / sigma1
|
|
|
12 |
def phi(z):
|
13 |
return norm.pdf(z)
|
14 |
|
15 |
+
# Define the BCNOLLN CDF based on the provided formula
|
16 |
+
def F_BCNOLLN(y1, y2, mu1, sigma1, alpha1, beta1, mu2, sigma2, alpha2, beta2, lambd):
|
17 |
+
# Convert y1, y2 to z-scores
|
18 |
+
z1 = (y1 - mu1) / sigma1
|
19 |
+
z2 = (y2 - mu2) / sigma2
|
20 |
+
|
21 |
+
# Compute H functions
|
22 |
+
H1_z1 = Phi(z1)**alpha1 + (1 - Phi(z1))**beta1
|
23 |
+
H2_z2 = Phi(z2)**alpha2 + (1 - Phi(z2))**beta2
|
24 |
+
|
25 |
+
# Compute the BCNOLLN CDF
|
26 |
+
term1 = (Phi(z1)*alpha1 / H1_z1)**(-lambd)
|
27 |
+
term2 = (Phi(z2)*alpha2 / H2_z2)**(-lambd)
|
28 |
+
term = term1 + term2 - 1
|
29 |
+
cdf = term**(-1/lambd)
|
30 |
+
|
31 |
+
return cdf
|
32 |
|
33 |
def f_BCNOLLN(y1, y2, mu1, sigma1, alpha1, beta1, mu2, sigma2, alpha2, beta2, lambd):
|
34 |
z1 = (y1 - mu1) / sigma1
|