error - after fitting a type 4 interaction model

603 views
Skip to first unread message

Subramanian Swaminathan

unread,
Nov 21, 2023, 12:28:04 PM11/21/23
to R-inla discussion group
Dear all,

I have fitted a type 4 interaction model with covariates with nbinomial likelihood. INLA after successfully completing the model fit showed the following error. 

"rsession-arm64(12604) MallocStackLogging: can't turn off malloc stack logging because it was not enabled"

What does it mean? whether the r-inal stopped prematurely? how to turn on "malloc stock logging".

Further, checking the model summary output shows that the Deviance Information Criterion (DIC, saturated) .is "NA" (please see below):

Why "DIC saturated" results in "NA". is it Ian ndication of over fitting. Please clarify.

Thanks and regards
S. Subramanian


>summary(models$bym2.rw1.t4)

Call:
   c("inla.core(formula = formula, family = family, contrasts = contrasts, ", " data = data,
   quantiles = quantiles, E = E, offset = offset, ", " scale = scale, weights = weights,
   Ntrials = Ntrials, strata = strata, ", " lp.scale = lp.scale, link.covariates =
   link.covariates, verbose = verbose, ", " lincomb = lincomb, selection = selection,
   control.compute = control.compute, ", " control.predictor = control.predictor,
   control.family = control.family, ", " control.inla = control.inla, control.fixed =
   control.fixed, ", " control.mode = control.mode, control.expert = control.expert, ", "
   control.hazard = control.hazard, control.lincomb = control.lincomb, ", " control.update =
   control.update, control.lp.scale = control.lp.scale, ", " control.pardiso =
   control.pardiso, only.hyperparam = only.hyperparam, ", " inla.call = inla.call, inla.arg
   = inla.arg, num.threads = num.threads, ", " keep = keep, working.directory =
   working.directory, silent = silent, ", " inla.mode = inla.mode, safe = FALSE, debug =
   debug, .parent.frame = .parent.frame)" )
Time used:
    Pre = 4.79, Running = 30372, Post = 5.22, Total = 30382
Fixed effects:
              mean    sd 0.025quant 0.5quant 0.975quant   mode kld
(Intercept) -1.637 0.351     -2.326   -1.637     -0.949 -1.637   0
X1          -0.274 0.355     -0.969   -0.274      0.420 -0.274   0
X2          -0.079 0.073     -0.221   -0.079      0.063 -0.079   0
X3           0.038 0.026     -0.014    0.038      0.089  0.038   0
X4           0.321 0.191     -0.053    0.321      0.695  0.321   0
X5           0.067 0.254     -0.431    0.067      0.565  0.067   0
X6          -0.048 0.028     -0.102   -0.048      0.006 -0.048   0
X7          -0.236 0.055     -0.344   -0.236     -0.129 -0.236   0
X8          -0.002 0.010     -0.022   -0.002      0.017 -0.002   0
X9          -0.041 0.020     -0.081   -0.041     -0.001 -0.041   0

Random effects:
  Name      Model
    ID.area BYM2 model
   ID.month RW1 model
   ID.area.month Generic0 model

Model hyperparameters:
                                                         mean    sd 0.025quant 0.5quant 0.975quant
size for the nbinomial observations (1/overdispersion)  7.809 0.433      7.008    7.792      8.712
Precision for ID.area                                   0.387 0.034      0.322    0.386      0.456
Phi for ID.area                                         0.981 0.014      0.948    0.984      0.998
Precision for ID.month                                  1.642 0.430      0.979    1.582      2.662
Precision for ID.area.month                            13.287 0.821     11.644   13.296     14.866
                                                         mode
size for the nbinomial observations (1/overdispersion)  7.744
Precision for ID.area                                   0.387
Phi for ID.area                                         0.993
Precision for ID.month                                  1.458
Precision for ID.area.month                            13.404

Deviance Information Criterion (DIC) ...............: 75182.30
Deviance Information Criterion (DIC, saturated) ....: NA
Effective number of parameters .....................: 2213.43

Watanabe-Akaike information criterion (WAIC) ...: 75270.70
Effective number of parameters .................: 2102.74

Marginal log-Likelihood:  -89703.16
, GCPO is computed
Posterior summaries for the linear predictor and the fitted values are computed
(Posterior marginals needs also 'control.compute=list(return.marginals.predictor=TRUE)')

I am not clear, what does this error means. Is there I 

Håvard Rue

unread,
Nov 24, 2023, 2:23:51 AM11/24/23
to Subramanian Swaminathan, R-inla discussion group

I guess you're running out of memory or are close to. you can add

control.compute=list(save.memory=TRUE)

to save some, but its unclear.
> --
> You received this message because you are subscribed to the Google
> Groups "R-inla discussion group" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to r-inla-discussion...@googlegroups.com.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/r-inla-discussion-group/a9bc5507-0ebc-457d-94af-014305939f79n%40googlegroups.com
> .

--
Håvard Rue
hr...@r-inla.org

Subramanian

unread,
Nov 24, 2023, 2:32:41 AM11/24/23
to Håvard Rue, R-inla discussion group
Dear Prof Havard,

Thanks for your reply. Yes, the model run well after i restarted the machine and also after inserting your suggestion.

Best regards
S. Subramanian

Sent from my iPhone

> On 24-Nov-2023, at 12:53, Håvard Rue <hr...@r-inla.org> wrote:
>
> 
Reply all
Reply to author
Forward
0 new messages