logit regression using Newton-Raphson algorithm