From 988b96578348bcc6de4fa65478f9910ccad993dd Mon Sep 17 00:00:00 2001 From: Merlise Clyde Date: Thu, 30 Nov 2023 21:54:10 -0500 Subject: [PATCH] initialize dispersion --- src/family.c | 12 ++++++------ src/glm_fit.c | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/family.c b/src/family.c index f0500859..d48d0811 100644 --- a/src/family.c +++ b/src/family.c @@ -124,11 +124,11 @@ double poisson_dispersion(double *resid, double *weights, int n, int rank) { /* Gamma */ double gamma_loglik(double *Y, double*mu, double *wts, double devb, int n) { - int i; + int i=0; double ll = 0.0; - double disp, ntemp = 0.0; + double disp= 0.0, ntemp = 0.0; + - for (i = 0; i < n; i++) { ntemp += wts[i]; } @@ -144,7 +144,7 @@ double gamma_loglik(double *Y, double*mu, double *wts, double devb, int n) { void gamma_variance(double *mu, double *var, int n) { - int i; + int i=0; for (i = 0; i