2

I am running a Bayesian model with INLA. Few months ago it was running fine. Today I run again with this error: Error in validObject(.Object) : invalid class “dsparseModelMatrix” object: superclass "Mnumeric" not defined in the environment of the object's class

My code is:

formula = casesp ~ 
  f(ID.area, model="bym",
    graph=g, 
    adjust.for.con.comp=TRUE) +
  f(ID.area1, 
    ID.time, 
    model="iid",
    constr=TRUE) +
  ID.time
res0  =  inla(formula, family="poisson", data=datos1, E=NULL,
              control.predictor=list(compute=TRUE), 
              control.compute=list(dic=TRUE), 
              quantiles=c(0.025,0.975), verbose = FALSE)

str of the data is:

'data.frame':   4024 obs. of  34 variables:
 $ DPA_PARROQ          : chr  "020150" "020150" "020150" "020150" ...
 $ populationa         : num  13768 14382 13987 16095 7 ...
 $ casesa              : num  3 6 0 0 0 0 0 0 0 0 ...
 $ populationp         : num  4608 4140 3933 3968 4 ...
 $ ID.time1            : int  1 2 3 4 1 2 3 4 1 2 ...

Running on x86_64-pc-linux-gnu,
arch x86_64
os linux-gnu

R version 3.6.3
year 2020

‘INLA’ version 21.02.23

Any help!

Alfredo
  • 31
  • 3
  • 1
    The problem was related with the package matrix, the update version gave the error. I solved installing the stable version 1.3-2 : ````remove.packages("Matrix") packageurl <- "https://cran.r-project.org/src/contrib/Archive/Matrix/Matrix_1.3-2.tar.gz" install.packages(packageurl, repos=NULL, type="source")```` – Alfredo Sep 22 '21 at 12:01
  • Please trim your code to make it easier to find your problem. Follow these guidelines to create a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example). – Community Sep 24 '21 at 09:07

0 Answers0