chjackson / ecoreg

1 stars 1 forks source link

Loglik.eco bug #3

Closed sophi890 closed 3 years ago

sophi890 commented 3 years ago

I think line 298 (within the function loglik.eco) should be

beta <- if (mod$nnorm > 0) pars[(2+mod$nctx+mod$nbineffs):(1+mod$nctx+mod$nbineffs+mod$nnorm)] else NULL # individual-level normal covariate effects

instead of

beta <- if (mod$nnorm > 0) pars[(2+mod$nctx+mod$nbin):(1+mod$nctx+mod$nbin+mod$nnorm)] else NULL # individual-level normal covariate effects.

(Otherwise the normal argument is faulty and results in a "Hessian is singular" warning)

chjackson commented 3 years ago

Fixed in https://github.com/chjackson/ecoreg/commit/ef0589710e96b3f5fc3473bf13a428161a8a996d