Lolistic regression (logit) : isoprobability contours

#1
Hello everyone,

I have tried to reproduce the isoprability countours (line) of a given dataset (see article link below) but I cannot manage to obtain the same results (using Matlab).
I am getting a bit desperate...


Here are the steps I have done:

0- Plot data
HR : Y-axis data
Q : X-axis data
Color of symbols on plot indicate if stable (1) or unstable (0)

1- Calculate Betas
B0 (intercept) = -0.612
B1 (Q) = 1.104 plots on X-axis
B2 (HR) = -0.422 plots on Y-axis

2- This allows to obtain equation:
z = B0 + B1x + B2y
z = -0.612 + 1.104Q - 0.422HR

3- Knowing that:
logit(p) = ln(p / 1-p) = B0+B1y+B2x = z [LOGIT function]
ln(p / 1-p) = z
[LOGIT function]
p / (1-p) = exp(z) [ANTILOG of LOGIT function]
p = exp(z) (1-p)
p = exp(z) – exp(z)p
p + exp(z)p = exp(z)
p [1+exp(z)] = exp(z)
p = exo(z) / [1+exp(z)]
The latest can be used to calculate the probability of making a successful prediction.

4- However, because we are interested in determining the isoprobability curve for various Q (B1) values, we need to isolate HR (B2) and include p in the equation.
From equations (0) & (3) :
(09) ln(p / 1-p) = B0+B1x+B2y
(10) ln(p / 1-p) – B0 – B1x = B2y
(11) [ln(p / 1-p) – B0 – B1x]/B2 = y

5- For a given p, generate y outputs (HR) for various x values (Q) ranging from a to b.


The following two images are my curves (p = 5, 20, 40, 60, 80, 90, 95%) VS article's curves. Can't figure out why we don't end up with the same ? My 5 and 20% curves are very funky too!!

Did I miss something (well probably!!) ?
Thanks!!!
My_Isoprobability.jpg
Article_Isoprobability.jpg
Article_Isoprobability.jpg

Click here for article
 

Attachments