diff --git a/src/gdfit_binomial.c b/src/gdfit_binomial.c index 0fbcb95..173a055 100644 --- a/src/gdfit_binomial.c +++ b/src/gdfit_binomial.c @@ -28,7 +28,7 @@ void gd_binomial(double *b, double *x, double *r, double *eta, int g, int *K1, i if (strcmp(penalty, "grLasso")==0) len = S(v * z_norm, lam1) / (v * (1 + lam2)); if (strcmp(penalty, "grMCP")==0) len = F(v * z_norm, lam1, lam2, gamma) / v; if (strcmp(penalty, "grSCAD")==0) len = Fs(v * z_norm, lam1, lam2, gamma) / v; - if (len != 0 | a[K1[g]] != 0) { + if (len != 0 || a[K1[g]] != 0) { // If necessary, update b and r for (int j=K1[g]; j gmax | nv > dfmax | tot_iter == max_iter) { + if (ng > gmax || nv > dfmax || tot_iter == max_iter) { for (int ll=l; ll gmax | nv > dfmax | tot_iter == max_iter) { + if (ng > gmax || nv > dfmax || tot_iter == max_iter) { for (int ll=l; ll gmax | nv > dfmax | tot_iter == max_iter) { + if (ng > gmax || nv > dfmax || tot_iter == max_iter) { for (int ll=l; ll gmax | nv > dfmax | tot_iter == max_iter) { + if (ng > gmax || nv > dfmax || tot_iter == max_iter) { for (int ll=l; ll gmax | nv > dfmax | tot_iter == max_iter) { + if (ng > gmax || nv > dfmax || tot_iter == max_iter) { for (int ll=l; ll gmax | nv > dfmax | tot_iter == max_iter) { + if (ng > gmax || nv > dfmax || tot_iter == max_iter) { for (int ll=l; ll gmax | nv > dfmax | tot_iter == max_iter) { + if (ng > gmax || nv > dfmax || tot_iter == max_iter) { for (int ll=l; ll gmax | nv > dfmax | tot_iter == max_iter) { + if (ng > gmax || nv > dfmax || tot_iter == max_iter) { for (int ll=l; ll