Hessian eigenvalue warnings with Student-t model

540 views
Skip to first unread message

Gregor Gorjanc

unread,
Nov 18, 2017, 3:04:06 PM11/18/17
to R-inla discussion group
Hi,

I have developed a model assuming Gaussian likelihood. I wanted to test this assumption by using Student-t model. However, I am receiving warnings about negative Hessian eigenvalues (printout shown below). I have centred and scaled the modelled variable as well as covariates and the Gaussian model fits ok (I believe) Is there any guidance what I should do/test/check etc.?

Many thanks!

Regards, Gregor

> source(file="Data.R")
> Fit = inla(data=Data,
+            formula=TimeS ~ Gender +
+                            DistanceS +
+                            ClimbPerDistanceS +
+                            f(RaceF, model="iid") +
+                            f(DateYearMonthI, model="ar1", values=DateYearMonthsI, replicate=RunnerI))
> summary(Fit)
Call:
"inla(formula = ..1, data = data, control.compute = control.compute)"
  
Time used:
 Pre-processing    Running inla Post-processing           Total
         1.8929         15.4059          1.1940         18.4928
  
Fixed effects:
                     mean     sd 0.025quant 0.5quant 0.975quant    mode kld
(Intercept)        0.2279 0.0432     0.1431   0.2279     0.3130  0.2277   0
GenderM           -0.1463 0.0384    -0.2215  -0.1464    -0.0706 -0.1466   0
DistanceS          1.0083 0.0288     0.9517   1.0083     1.0649  1.0083   0
ClimbPerDistanceS  0.2070 0.0278     0.1520   0.2070     0.2616  0.2071   0
  
Random effects:
Name      Model
 RaceF   IID model
DateYearMonthI   AR1 model
  
Model hyperparameters:
                                           mean    sd 0.025quant 0.5quant 0.975quant   mode
Precision for the Gaussian observations 35.4040 1.426     32.627  35.4011    38.2218 35.432
Precision for RaceF                     12.3002 2.019      8.892  12.1009    16.8185 11.686
Precision for DateYearMonthI            45.7837 8.247     31.611  45.0933    63.9827 43.772
Rho for DateYearMonthI                   0.9975 0.001      0.995   0.9977     0.9989  0.998
  
Expected number of effective parameters(std dev): 189.46(10.82)
Number of equivalent replicates : 7.922
  
Deviance Information Criterion (DIC) ...............: -897.57
Deviance Information Criterion (DIC, saturated) ....: 1701.54
Effective number of parameters .....................: 192.02
  
Watanabe-Akaike information criterion (WAIC) ...: -859.73
Effective number of parameters .................: 197.96
  
Marginal log-Likelihood:  247.99
Posterior marginals for linear predictor and fitted values computed

> Fit = inla(data=Data,
+            formula=TimeS ~ Gender +
+                            DistanceS +
+                            ClimbPerDistanceS +
+                            f(RaceF, model="iid") +
+                            f(DateYearMonthI, model="ar1", values=DateYearMonthsI, replicate=RunnerI),
+            family="T")
summary(Fit)
  
  
        *** WARNING *** Eigenvalue 1 of the Hessian is -794.583 < 0
        *** WARNING *** Set this eigenvalue to 11.957
        *** WARNING *** This have consequence for the accurancy of
        *** WARNING *** the approximations; please check!!!
        *** WARNING *** R-inla: Use option inla(..., control.inla = list(h = h.value), ...)
        *** WARNING *** R-inla: to chose a different  `h.value'.
  
  
        *** WARNING *** Eigenvalue 4 of the Hessian is -37.1948 < 0
        *** WARNING *** Set this eigenvalue to 11.957
        *** WARNING *** This have consequence for the accurancy of
        *** WARNING *** the approximations; please check!!!
        *** WARNING *** R-inla: Use option inla(..., control.inla = list(h = h.value), ...)
        *** WARNING *** R-inla: to chose a different  `h.value'.
  
> summary(Fit)
  
Call:
"inla(formula = ..1, family = \"T\", data = data, control.compute = control.compute)"

Time used:
 Pre-processing    Running inla Post-processing           Total
         1.0208        283.0098          1.7501        285.7807
  
Fixed effects:
                     mean     sd 0.025quant 0.5quant 0.975quant    mode kld
(Intercept)        0.1812 0.0337     0.1150   0.1812     0.2473  0.1812   0
GenderM           -0.1447 0.0369    -0.2171  -0.1447    -0.0723 -0.1447   0
DistanceS          0.9791 0.0172     0.9452   0.9791     1.0128  0.9792   0
ClimbPerDistanceS  0.2011 0.0164     0.1690   0.2011     0.2333  0.2011   0
  
Random effects:
Name      Model
 RaceF   IID model
DateYearMonthI   AR1 model
  
Model hyperparameters:
                                            mean      sd 0.025quant 0.5quant 0.975quant    mode
precision for the student-t observations 16.4962  1.6281    14.4113  16.1411    20.5230 14.9767
degrees of freedom for student-t         14.4602  1.8518    10.4502  14.6746    17.3813 15.7504
Precision for RaceF                      58.0571 16.7488    31.9985  55.7801    97.3127 51.5082
Precision for DateYearMonthI             54.4213  5.6391    44.1914  54.1278    66.3475 53.5454
Rho for DateYearMonthI                    0.9984  0.0005     0.9973   0.9984     0.9991  0.9986
  
Expected number of effective parameters(std dev): 140.21(0.00)
Number of equivalent replicates : 10.71
  
Deviance Information Criterion (DIC) ...............: -1183.49
Deviance Information Criterion (DIC, saturated) ....: 252.53
Effective number of parameters .....................: -229.21
  
Watanabe-Akaike information criterion (WAIC) ...: -862.19
Effective number of parameters .................: 85.55
  
Marginal log-Likelihood:  88.35
Posterior marginals for linear predictor and fitted values computed

Helpdesk

unread,
Nov 18, 2017, 11:27:19 PM11/18/17
to Gregor Gorjanc, R-inla discussion group
Hi

yes, the problem is deep. the issue is that student-t is not log-
concave, and the question is what to do if the local hessian for the
log student-t (like for one observation) has the wrong sign. its like
getting variance < 0, so the contribution for the student-t observation
will locally inflate the variance, not reducing it.

its possible to truncate this at 0, meaning that if the hessian has the
wrong sign, set it to zero. you can do this using

control.inla = list(cmin = 0)

where the default value is -Inf which means do nothing. its unclear
what is the better thing to do, beyond the obvious, which comes with a
higher cost.

to be honest, I do not like the student-t anymore ;-)

H
> --
> 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 post to this group, send email to r-inla-discussion-group@googlegr
> oups.com.
> Visit this group at https://groups.google.com/group/r-inla-discussion
> -group.
> For more options, visit https://groups.google.com/d/optout.

--
Håvard Rue
Helpdesk
he...@r-inla.org

Haakon Bakka

unread,
Nov 19, 2017, 1:10:39 AM11/19/17
to INLA help, Gregor Gorjanc, R-inla discussion group
You can add informative priors to all the model components. This often helps. Check out
>> inla.doc("pc.prec")
and
>> inla.doc("pccor1")

PS. You can of course do a scenario analysis of the T parameter: Fix it, run the model, compare results across fixed T parameters.

Kind regards,
Haakon Bakka




> .
> To post to this group, send email to r-inla-discussion-group@googlegr
> oups.com.
> Visit this group at https://groups.google.com/group/r-inla-discussion
> -group.
> For more options, visit https://groups.google.com/d/optout.

--
Håvard Rue
Helpdesk
he...@r-inla.org
--
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-group+unsub...@googlegroups.com.
To post to this group, send an email to r-inla-discussion-group@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages