spatio-temporal model with replicate and group

123 views
Skip to first unread message

Joe Lewis

unread,
Oct 2, 2025, 11:46:30 AMOct 2
to R-inla discussion group
Dear all,

I'm trying to fit a multinomial model (using the Poisson trick) that varies spatio-temporally. With this model, I am trying to predict the probability of a data point being a particular 'authority' (think region/country) given its location and covariates. From this, I will e.g. predict the probability of a particular location being an authority given all other authorities (i.e. normalise across the predicted rates to get a probability).

For each data point I've replicated the rows across the number of alternative Authorities that the data point could be attributed to. A new column (obs) is created that is either 1 or 0, with 1 denoting which of the replicated rows is the observed authority. All other replicated rows within that 'strata' are given a value of 0.

Each observed data point has an associated count - the greater the count, the more confident that this location is assigned to a particular authority. So ideally, I want to weight the likelihood to take this into account. Currently, I have this count logged and included as an offset but I'm not sure if this is the correct approach?

Spatially, the data points denoted to a specific 'authority' are concentrated within a particular part of Britain. For example, one authority is concentrated in the south-west; one in the north-east, etc. Data points with different authorities might overlap, e.g. where two data points are similar spatially but have different authorities, but they will be concentrated largely separately (i.e. there will be a 'buffer' between authorities with a decay from each authority centre). 

Temporally, authorities can 'appear' and 'disappear'. For example, one authority might be present between two dates. Then it will no longer be present. Another will be present/not present at different times. I presume that when multiple authorities are present they will 'compete' with one another, i.e. they won't be independent, with a 'buffer' appearing between authorities.

I have been able to model this spatially, but not when including the temporal element (the model fitting fails):

fit_data <- readRDS("M_data_sample.rds")
mesh <- readRDS("M_mesh.rds")
spde <- readRDS("M_spde.rds")

components <- ~
  Authority(Authority_new, model = "factor_full") +
  Elevation(elevation_km, model = "linear") +
  River(rivers_1_dist2_km, model = "linear") +
  field(geometry, model = spde, replicate= Authority_new) +
  unique_id(location_id, model="iid", fixed = T)

# field, replicate is expected to fit a surface to each Authority_new, assuming that they have different spatial fields. to take into account that they are 'present' in different locations of the country.

fit_poi <- bru(
  components = components,
  formula = obs ~ -1 + unique_id + field + Authority + Elevation + River + offset(log_count),
  family = "poisson",
  data = fit_data,
  options = list(control.compute = list(dic = FALSE, waic = FALSE, cpo = FALSE)))

# include offset(log_count) to take into account the count associated with each data point. I'm unsure if this is correct, though?

For the spatio-temporal model, I do:

fit_data <- readRDS("M_data_sample.rds")
mesh <- readRDS("M_mesh.rds")
spde <- readRDS("M_spde.rds")

unique_times <- seq(-125.5, 37.5, by = 0.5) # do this so i can then predict authority extents at unobserved time stamps.
time_map <- setNames(seq_along(unique_times), unique_times)
fit_data$time_idx <- time_map[as.character(fit_data$Mid.Date)]

components <- ~
  Authority(Authority_new, model = "iid") +
  Elevation(elevation_km, model = "linear") +
  River(rivers_1_dist2_km, model = "linear") + 
  field(geometry,
        model = spde,
        replicate = Authority_new,
        group = time_idx,
        control.group = list(model = "ar1"), hyper = prec.prior) +
  unique_id(location_id, model = "iid", fixed = TRUE)

# for spde, allow it to be grouped by time_idx using an ar1 model, replicated across each Authority.
prec.prior <- list(prec = list(param = c(0.001, 0.001)))

fit_poi5 <- bru(
  components = components,
  formula = obs ~ -1 + unique_id + field + Authority + Elevation + River + offset(log_count),
  family = "poisson",
  data = fit_data,
  options = list(control.compute = list(dic = FALSE, waic = FALSE, cpo = FALSE), verbose = TRUE))

A summary of my data/full dataset (mesh, spde etc) is attached.

Any help would be greatly appreciated.

Thank you.

Joe
summary.PNG
M_data_sample.rds
M_mesh.rds
M_spde.rds

Joe Lewis

unread,
Oct 2, 2025, 12:33:57 PMOct 2
to R-inla discussion group
Dear all,

The returned error from:

fit_data <- readRDS("M_data_sample.rds")
mesh <- readRDS("M_mesh.rds")
spde <- readRDS("M_spde.rds")

unique_times <- seq(-125.5, 37.5, by = 0.5)
time_map <- setNames(seq_along(unique_times), unique_times)
fit_data$time_idx <- time_map[as.character(fit_data$Mid.Date)]

components <- ~
  Authority(Authority_new, model = "iid") +
  Elevation(elevation_km, model = "linear") +
  River(rivers_1_dist2_km, model = "linear") +
  field(geometry,
        model = spde,
        replicate = Authority_new,
        group = time_idx,
        control.group = list(model = "ar1"), hyper = prec.prior) +
  unique_id(location_id, model = "iid", fixed = TRUE)

prec.prior <- list(prec = list(param = c(0.001, 0.001)))

fit_poi5 <- bru(
  components = components,
  formula = obs ~ -1 + unique_id + field + Authority + Elevation + River + offset(log_count),
  family = "poisson",
  data = fit_data,
  options = list(control.compute = list(dic = FALSE, waic = FALSE, cpo = FALSE), verbose = TRUE))

Compute initial values...
        Iter[0] RMS(err) = 1.000, update with step-size = 0.301
        Iter[1] RMS(err) = 0.452, update with step-size = 0.453
        Iter[2] RMS(err) = 0.510, update with step-size = 0.325
        Iter[3] RMS(err) = 0.577, update with step-size = 0.487
        Iter[4] RMS(err) = 0.598, update with step-size = 0.333
        Iter[5] RMS(err) = 0.617, update with step-size = 0.494
        Initial values computed in 0.1304 seconds
                x[0] = 0.1932
                x[1] = 0.2002
                x[2] = 0.2007
                x[3] = 0.2004
                x[4] = 0.1998
                x[1382359] = 0.2991
                x[1382360] = 0.1902
                x[1382361] = -0.7424
                x[1382362] = 0.1750
                x[1382363] = 0.0077

Optimise using DEFAULT METHOD
Segmentation fault (core dumped)
Warning in bru_log_warn(paste0("iinla: Problem in inla:\n", result)) :
  iinla: Problem in inla:
Error in inla.core.safe(formula = formula, family = family, contrasts = contrasts,  :
  The inla-program exited with an error. Unless you interupted it yourself, please rerun with verbose=TRUE and check the output carefully.
  If this does not help, please contact the developers at <he...@r-inla.org>.
The inla program failed and the maximum number of tries has been reached.
iinla: Problem in inla:
1: bru(components = components, formula = obs ~ -1 + unique_id + field + Auth [...]
2: iinla(model = info[["model"]], lhoods = info[["lhoods"]], inputs = info[[" [...]
3: fm_try_callstack(...)
4: do.call(INLA::inla, inla.options.merged, envir = environment(model$effects))
5: (function (formula = NULL, family = "gaussian", contrasts = NULL, data = N [...]
6: inla.core.safe(formula = formula, family = family, contrasts = contrasts,  [...]
7: stop(paste0(r$message, "\n", "The inla program failed and the maximum numb [...]
iinla: Giving up and returning last successfully obtained result for diagnostic purposes.

hopefully this might help/give some guidance to the issue?

Thank you.

Kind regards,
Joe

INLA help

unread,
Oct 2, 2025, 2:03:21 PMOct 2
to Joe Lewis, R-inla discussion group
Please retry with the new testing version of today 

Haavard Rue
--
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, visit https://groups.google.com/d/msgid/r-inla-discussion-group/e26ee3d2-0e3e-449b-ac73-e526ca542c40n%40googlegroups.com.

Joe Lewis

unread,
Oct 2, 2025, 6:35:28 PMOct 2
to R-inla discussion group
Dear Haavard,

Thank you for the reply.

I updated to the test version of INLA using 'inla.upgrade(testing=TRUE)'

The new error message:
 *** inla.core.safe:  The inla program failed, but will rerun in case better initial values may help. try=1/1

Warning in bru_log_warn(paste0("iinla: Problem in inla:\n", result)) :
  iinla: Problem in inla:
Error in inla.core.safe(formula = formula, family = family, contrasts = contrasts,  :
  Unknown keyword in `hyper' ` prec '. Must be one of  theta theta1 theta2 theta3 theta4 theta5 theta6 theta7 theta8 theta9 theta10 theta11 theta12 theta13 theta14 theta15 theta16 theta17 theta18 theta19 theta20 theta21 theta22 theta23 theta24 theta25 theta26 theta27 theta28 theta29 theta30 theta31 theta32 theta33 theta34 theta35 theta36 theta37 theta38 theta39 theta40 theta41 theta42 theta43 theta44 theta45 theta46 theta47 theta48 theta49 theta50 theta51 theta52 theta53 theta54 theta55 theta56 theta57 theta58 theta59 theta60 theta61 theta62 theta63 theta64 theta65 theta66 theta67 theta68 theta69 theta70 theta71 theta72 theta73 theta74 theta75 theta76 theta77 theta78 theta79 theta80 theta81 theta82 theta83 theta84 theta85 theta86 theta87 theta88 theta89 theta90 theta91 theta92 theta93 theta94 theta95 theta96 theta97 theta98 theta99 theta100 t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t [... truncated]

iinla: Giving up and returning last successfully obtained result for diagnostic purposes.


I assume this is related to:
components <- ~
  Authority(Authority_new, model = "iid") +
  Elevation(elevation_km, model = "linear") +
  River(rivers_1_dist2_km, model = "linear") +
  field(geometry,
        model = spde,
        replicate = Authority_new,
        group = time_idx,
        control.group = list(model = "ar1"), hyper = prec.prior) +
  unique_id(location_id, model = "iid", fixed = TRUE)

prec.prior <- list(prec = list(param = c(0.001, 0.001)))


So I ran it without the prec.prior

-library/4.4/INLA/bin/linux/64bit/libreadline.so.8)
/home/jl2094/R/x86_64-pc-linux-gnu-library/4.4/INLA/bin/linux/64bit/inla.mkl: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by /home/jl2094/R/x86_64-pc-linux-gnu-library/4.4/INLA/bin/linux/64bit/libtirpc.so.3)
/home/jl2094/R/x86_64-pc-linux-gnu-library/4.4/INLA/bin/linux/64bit/inla.mkl: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by /home/jl2094/R/x86_64-pc-linux-gnu-library/4.4/INLA/bin/linux/64bit/libgomp.so.1)
/home/jl2094/R/x86_64-pc-linux-gnu-library/4.4/INLA/bin/linux/64bit/inla.mkl: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by /home/jl2094/R/x86_64-pc-linux-gnu-library/4.4/INLA/bin/linux/64bit/libgssapi_krb5.so.2)
/home/jl2094/R/x86_64-pc-linux-gnu-library/4.4/INLA/bin/linux/64bit/inla.mkl: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by /home/jl2094/R/x86_64-pc-linux-gnu-library/4.4/INLA/bin/linux/64bit/libkrb5.so.3)
/home/jl2094/R/x86_64-pc-linux-gnu-library/4.4/INLA/bin/linux/64bit/inla.mkl: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by /home/jl2094/R/x86_64-pc-linux-gnu-library/4.4/INLA/bin/linux/64bit/libk5crypto.so.3)
/home/jl2094/R/x86_64-pc-linux-gnu-library/4.4/INLA/bin/linux/64bit/inla.mkl: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by /home/jl2094/R/x86_64-pc-linux-gnu-library/4.4/INLA/bin/linux/64bit/libcom_err.so.2)
/home/jl2094/R/x86_64-pc-linux-gnu-library/4.4/INLA/bin/linux/64bit/inla.mkl: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by /home/jl2094/R/x86_64-pc-linux-gnu-library/4.4/INLA/bin/linux/64bit/libkrb5support.so.0)
/home/jl2094/R/x86_64-pc-linux-gnu-library/4.4/INLA/bin/linux/64bit/inla.mkl: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.36' not found (required by /home/jl2094/R/x86_64-pc-linux-gnu-library/4.4/INLA/bin/linux/64bit/libresolv.so.2)
/home/jl2094/R/x86_64-pc-linux-gnu-library/4.4/INLA/bin/linux/64bit/inla.mkl: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_ABI_DT_RELR' not found (required by /home/jl2094/R/x86_64-pc-linux-gnu-library/4.4/INLA/bin/linux/64bit/libresolv.so.2)

Warning in bru_log_warn(paste0("iinla: Problem in inla:\n", result)) :
  iinla: Problem in inla:
Error in inla.core.safe(formula = formula, family = family, contrasts = contrasts,  :
  The inla-program exited with an error. Unless you interupted it yourself, please rerun with verbose=TRUE and check the output carefully.
  If this does not help, please contact the developers at <he...@r-inla.org>.
The inla program failed and the maximum number of tries has been reached.
iinla: Problem in inla:
1: bru(components = components, formula = obs ~ -1 + unique_id + field + Auth [...]
2: iinla(model = info[["model"]], lhoods = info[["lhoods"]], inputs = info[[" [...]
3: fm_try_callstack(...)
4: do.call(INLA::inla, inla.options.merged, envir = environment(model$effects))
5: (function (formula = NULL, family = "gaussian", contrasts = NULL, data = N [...]
6: inla.core.safe(formula = formula, family = family, contrasts = contrasts,  [...]
7: stop(paste0(r$message, "\n", "The inla program failed and the maximum numb [...]
iinla: Giving up and returning last successfully obtained result for diagnostic purposes.

I'm running it on a Linux HPC if that helps? do I need to e.g. do: 

> inla.binary.install()
* Looking for Version_25.10.01 and os='<choose interactively>'
  Available alternatives:
         Alternative 1  is  ./CentOS Linux-7 (Core)/Version_25.10.01/64bit.tgz
         Alternative 2  is  ./Fedora Linux-43 (Workstation Edition Prerelease)/Version_25.10.01/64bit.tgz
         Alternative 3  is  ./Rocky Linux-10.0 (Red Quartz)/Version_25.10.01/64bit.tgz
         Alternative 4  is  ./Rocky Linux-8.10 (Green Obsidian)/Version_25.10.01/64bit.tgz
         Alternative 5  is  ./Rocky Linux-9.6 (Blue Onyx)/Version_25.10.01/64bit.tgz
         Alternative 6  is  ./Ubuntu-22.04.5 LTS (Jammy Jellyfish)/Version_25.10.01/64bit.tgz
         Alternative 7  is  ./Ubuntu-25.04 (Plucky Puffin)/Version_25.10.01/64bit.tgz
  Chose alternative [1:7]
        1: 1.

I'm  running the model currently after installing Alternative 1. I will let you know how I get on.

Thank you .

Kind regards,
Joe

INLA help

unread,
Oct 2, 2025, 6:47:40 PMOct 2
to Joe Lewis, R-inla discussion group
I see you’re using  R-4.4.  Please upgrade to 4.5 

Haavard Rue

Finn Lindgren

unread,
Oct 2, 2025, 6:53:49 PMOct 2
to R-inla discussion group
For the issue with setting the prior (unrelated to the R version issue etc), the issue is most likely that the group ar1 model doesn't have a separate precision parameter;
The precision for the joint main+group+replicate model is set for the main model, i.e. the parameters of the "spde" model, from inla.spde2.pcmatern()

Finn



--
Finn Lindgren
email: finn.l...@gmail.com

Joe Lewis

unread,
Oct 5, 2025, 12:53:48 PMOct 5
to R-inla discussion group
Hi Haavard  and Finn,

Thank you for the advice.

I've updated R to 4.5.1 and have updated INLA via inla.upgrade()

I get the following error:

> components <- ~ + Authority(Authority_new, model = "iid") + + Elevation(elevation_km, model = "linear") + + River(rivers_1_dist2_km, model = "linear") + + field(geometry, + model = spde, + replicate = Authority_new, + group = time_idx, + control.group = list(model = "ar1")) + + unique_id(location_id, model = "iid", fixed = TRUE) > fit_poi5 <- bru( + components = components, + formula = obs ~ -1 + unique_id + field + Authority + Elevation + River + offset(log_count), + family = "poisson", + data = fit_data, + options = list(control.compute = list(dic = FALSE, waic = FALSE, cpo = FALSE), verbose = TRUE)) Read ntt 10 1 5 with max.threads 12 Continue with num.threads = 10:1:5 max_threads = 10 Version.......[Version_25.10.01] Build-time....[Oct 1 2025 19:57:56] MAX_THREADS...[10] Report issues/bugs to <he...@r-inla.org> cwd[C:\Users\jl2094\Documents\Projects\Iron_age_tribe_boundaries] Process file/directory[C:\Users\jl2094\AppData\Local\Temp\RtmpgHyDZF\file32cc306f294c/Model.ini] model[0/1/] threads[10] max.threads[12] blas_threads_force[0] nested[10:1] Run with model[C:\Users\jl2094\AppData\Local\Temp\RtmpgHyDZF\file32cc306f294c/Model.ini] inla_build... number of sections=[16] parse section=[15] name=[INLA.numa] type=[NUMA] inla_parse_numa... section[INLA.numa] enable[0] parse section=[13] name=[INLA.stiles] type=[STILES] inla_parse_stiles... section[INLA.stiles] verbose[0] tile.size[0] default tile.size[0] parse section=[0] name=[INLA.libR] type=[LIBR] inla_parse_libR... section[INLA.libR] R_HOME=[C:/PROGRA~1/R/R-45~1.1] parse section=[10] name=[INLA.Expert] type=[EXPERT] inla_parse_expert... section[INLA.Expert] disable.gaussian.check=[0] Measure dot.product.gain=[No] Optimise linear solve = [No] Optimise num.threads = [Yes] cpo.manual=[0] jp.file=[(null)] jp.model=[(null)] parse section=[1] name=[INLA.Model] type=[PROBLEM] inla_parse_problem... name=[INLA.Model] R-INLA version = [25.10.01] R-INLA build date = [20362] Build tag = [devel] System memory = [31 Gb] L3 cache = [0 Mb] Cores = (Physical= 12, Logical= 12) NUMA not available 'char' is signed 'short int' is 2 bytes 'int' is 4 bytes 'size_t' is 8 bytes 'long int' is 4 bytes 'long long' is 8 bytes 'float' is 4 bytes 'double' is 8 bytes 'long double' is 16 bytes BUFSIZ is 512 bytes CACHE_LINE_SIZE is 64 bytes MEM_ALIGN is 16 bytes GCC/Compiler version[15.2.1 20250808 (Fedora MinGW 15.2.1-2.fc43)] Compiler macro defined [__MMX_WITH_SSE__] Compiler macro defined [__SSE__] Compiler macro defined [__SSE2__] Compiler macro defined [__SSE2_MATH__] Compiler macro defined [__SSE_MATH__] Compiled with -DINLA_WITH_LIBR Compiled with -DINLA_WITH_MUPARSER openmp.strategy=[default] pardiso-library installed and working? = [no] smtp = [taucs] strategy = [default] store results in directory=[C:\Users\jl2094\AppData\Local\Temp\RtmpgHyDZF\file32cc306f294c/results.files-0000000000] output: gcpo=[0] type.cv=[single] num.level.sets=[-1] size.max=[32] strategy=[Posterior] correct.hyperpar=[1] epsilon=[0.005] prior.diagonal=[0.0001] keep=[] remove.fixed=[1] remove=[] cpo=[0] po=[0] dic=[0] kld=[1] mlik=[1] q=[0] graph=[0] hyperparameters=[1] config=[1] config.lite=[0] likelihood.info=[0] internal.opt=[1] save.memory=[0] summary=[1] return.marginals=[1] return.marginals.predictor=[0] nquantiles=[3] [ 0.025 0.5 0.975 ] ncdf=[0] [ ] parse section=[3] name=[Predictor] type=[PREDICTOR] inla_parse_predictor ... section=[Predictor] dir=[predictor] PRIOR->name=[loggamma] hyperid=[53001|Predictor] PRIOR->from_theta=[function (x) <<NEWLINE>>exp(x)] PRIOR->to_theta = [function (x) <<NEWLINE>>log(x)] PRIOR->PARAMETERS=[1, 1e-05] initialise log_precision[13.8155] fixed=[1] user.scale=[1] n=[309996] m=[53515] ndata=[53515] compute=[1] read offsets from file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc5a03f19] read n=[727022] entries from file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc5a03f19] file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc5a03f19] 0/363511 (idx,y) = (0, 0.94591) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc5a03f19] 1/363511 (idx,y) = (1, 0.94591) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc5a03f19] 2/363511 (idx,y) = (2, 0.94591) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc5a03f19] 3/363511 (idx,y) = (3, 0.94591) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc5a03f19] 4/363511 (idx,y) = (4, 0.94591) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc5a03f19] 5/363511 (idx,y) = (5, 0.94591) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc5a03f19] 6/363511 (idx,y) = (6, 0.94591) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc5a03f19] 7/363511 (idx,y) = (7, 0.94591) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc5a03f19] 8/363511 (idx,y) = (8, 0.94591) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc5a03f19] 9/363511 (idx,y) = (9, 0.94591) read link.fitted.values from file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc5414321f] read n=[727022] entries from file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc5414321f] file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc5414321f] 0/363511 (idx,y) = (0, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc5414321f] 1/363511 (idx,y) = (1, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc5414321f] 2/363511 (idx,y) = (2, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc5414321f] 3/363511 (idx,y) = (3, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc5414321f] 4/363511 (idx,y) = (4, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc5414321f] 5/363511 (idx,y) = (5, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc5414321f] 6/363511 (idx,y) = (6, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc5414321f] 7/363511 (idx,y) = (7, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc5414321f] 8/363511 (idx,y) = (8, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc5414321f] 9/363511 (idx,y) = (9, 0) A=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc5d7875ad] Aext=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc5e405121] AextPrecision=[3.269e+06] output: summary=[1] return.marginals=[1] return.marginals.predictor=[0] nquantiles=[3] [ 0.025 0.5 0.975 ] ncdf=[0] [ ] parse section=[2] name=[INLA.Data1] type=[DATA] inla_parse_data [section 1]... tag=[INLA.Data1] family=[POISSON] likelihood=[POISSON] file->name=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32ccc797f51] file->name=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc9e226e] file->name=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc4b562f80] file->name=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc72492f86] read n=[160545] entries from file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32ccc797f51] 0/53515 (idx,a,y,d) = (0, 1, 0, 1) 1/53515 (idx,a,y,d) = (1, 1, 1, 1) 2/53515 (idx,a,y,d) = (2, 1, 0, 1) 3/53515 (idx,a,y,d) = (3, 1, 0, 1) 4/53515 (idx,a,y,d) = (4, 1, 0, 1) 5/53515 (idx,a,y,d) = (5, 1, 0, 1) 6/53515 (idx,a,y,d) = (6, 1, 0, 1) 7/53515 (idx,a,y,d) = (7, 1, 0, 1) 8/53515 (idx,a,y,d) = (8, 1, 0, 1) 9/53515 (idx,a,y,d) = (9, 1, 0, 1) likelihood.variant=[0] Link model [LOG] Link order [-1] Link variant [-1] Link a [1] Link ntheta [0] mix.use[0] parse section=[4] name=[Authority] type=[FFIELD] inla_parse_ffield... section=[Authority] dir=[random.effect0000000001] model=[iid] PRIOR->name=[loggamma] hyperid=[1001|Authority] PRIOR->from_theta=[function (x) <<NEWLINE>>exp(x)] PRIOR->to_theta = [function (x) <<NEWLINE>>log(x)] PRIOR->PARAMETERS=[1, 5e-05] vb.correct n[1] -1 correct=[-1] constr=[0] diagonal=[0] id.names=<read> compute=[1] nrep=[1] ngroup=[1] Alocal=[no] read covariates from file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc6441196f] read n=[619992] entries from file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc6441196f] file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc6441196f] 0/309996 (idx,y) = (0, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc6441196f] 1/309996 (idx,y) = (1, 1) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc6441196f] 2/309996 (idx,y) = (2, 2) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc6441196f] 3/309996 (idx,y) = (3, 3) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc6441196f] 4/309996 (idx,y) = (4, 4) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc6441196f] 5/309996 (idx,y) = (5, 5) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc6441196f] 6/309996 (idx,y) = (6, 6) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc6441196f] 7/309996 (idx,y) = (7, 7) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc6441196f] 8/309996 (idx,y) = (8, 8) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc6441196f] 9/309996 (idx,y) = (9, 9) file for locations=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc722363df] nlocations=[11] locations[0]=[1] locations[1]=[2] locations[2]=[3] locations[3]=[4] locations[4]=[5] locations[5]=[6] locations[6]=[7] locations[7]=[8] locations[8]=[9] locations[9]=[10] cyclic=[0] initialise log_precision[4] fixed=[0] computed/guessed rank-deficiency = [0] output: summary=[1] return.marginals=[1] return.marginals.predictor=[0] nquantiles=[3] [ 0.025 0.5 0.975 ] ncdf=[0] [ ] parse section=[7] name=[field] type=[FFIELD] inla_parse_ffield... section=[field] dir=[random.effect0000000002] model=[spde2] PRIOR0->name=[pcmatern] hyperid=[23001|field] PRIOR0->from_theta=[function (x) <<NEWLINE>>x] PRIOR0->to_theta = [function (x) <<NEWLINE>>x] PRIOR0->PARAMETERS0[0]=[20794.4] PRIOR0->PARAMETERS0[1]=[4.60517] PRIOR0->PARAMETERS0[2]=[2] vb.correct n[1] -1 correct=[-1] constr=[0] diagonal=[0] id.names=<not present> compute=[1] nrep=[11] ngroup=[18] Alocal=[no] read covariates from file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc242b319f] read n=[619992] entries from file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc242b319f] file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc242b319f] 0/309996 (idx,y) = (0, -1) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc242b319f] 1/309996 (idx,y) = (1, -1) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc242b319f] 2/309996 (idx,y) = (2, -1) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc242b319f] 3/309996 (idx,y) = (3, -1) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc242b319f] 4/309996 (idx,y) = (4, -1) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc242b319f] 5/309996 (idx,y) = (5, -1) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc242b319f] 6/309996 (idx,y) = (6, -1) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc242b319f] 7/309996 (idx,y) = (7, -1) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc242b319f] 8/309996 (idx,y) = (8, -1) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc242b319f] 9/309996 (idx,y) = (9, -1) spde2.prefix = [C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc2f852e40/file32cc508b9df.] spde2.transform = [identity] ntheta (max) = [2] initialise theta[0]=[11.3089] fixed[0]=[0] initialise theta[1]=[-1] fixed[1]=[0] ntheta (used) = [2] computed/guessed rank-deficiency = [0] output: summary=[1] return.marginals=[1] return.marginals.predictor=[0] nquantiles=[3] [ 0.025 0.5 0.975 ] ncdf=[0] [ ] group.model = ar1 group.graph = <NONE> group.cyclic = False group.order = -1 initialise group_rho_intern[2] group.fixed=[0] GROUP.PRIOR->name=[normal] hyperid=[41001|field] GROUP.PRIOR->from_theta=[function (x) <<NEWLINE>>2 * exp(x)/(1 + exp(x)) - 1] GROUP.PRIOR->to_theta = [function (x) <<NEWLINE>>log((1 + x)/(1 - x))] GROUP.PRIOR->GROUP.PARAMETERS=[0, 0.15] parse section=[8] name=[unique_id] type=[FFIELD] inla_parse_ffield... section=[unique_id] dir=[random.effect0000000003] model=[iid] PRIOR->name=[loggamma] hyperid=[1001|unique_id] PRIOR->from_theta=[function (x) <<NEWLINE>>exp(x)] PRIOR->to_theta = [function (x) <<NEWLINE>>log(x)] PRIOR->PARAMETERS=[1, 5e-05] vb.correct n[1] -1 correct=[-1] constr=[0] diagonal=[0] id.names=<read> compute=[1] nrep=[1] ngroup=[1] Alocal=[no] read covariates from file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc37101b85] read n=[619992] entries from file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc37101b85] file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc37101b85] 0/309996 (idx,y) = (0, -1) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc37101b85] 1/309996 (idx,y) = (1, -1) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc37101b85] 2/309996 (idx,y) = (2, -1) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc37101b85] 3/309996 (idx,y) = (3, -1) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc37101b85] 4/309996 (idx,y) = (4, -1) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc37101b85] 5/309996 (idx,y) = (5, -1) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc37101b85] 6/309996 (idx,y) = (6, -1) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc37101b85] 7/309996 (idx,y) = (7, -1) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc37101b85] 8/309996 (idx,y) = (8, -1) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc37101b85] 9/309996 (idx,y) = (9, -1) file for locations=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc473a180] nlocations=[4865] locations[0]=[1] locations[1]=[2] locations[2]=[3] locations[3]=[4] locations[4]=[5] locations[5]=[6] locations[6]=[7] locations[7]=[8] locations[8]=[9] locations[9]=[10] cyclic=[0] initialise log_precision[4] fixed=[1] computed/guessed rank-deficiency = [0] output: summary=[1] return.marginals=[1] return.marginals.predictor=[0] nquantiles=[3] [ 0.025 0.5 0.975 ] ncdf=[0] [ ] section=[5] name=[Elevation] type=[LINEAR] inla_parse_linear... section[Elevation] dir=[fixed.effect0000000001] file for covariates=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc3ac113e8] read n=[619992] entries from file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc3ac113e8] file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc3ac113e8] 0/309996 (idx,y) = (0, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc3ac113e8] 1/309996 (idx,y) = (1, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc3ac113e8] 2/309996 (idx,y) = (2, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc3ac113e8] 3/309996 (idx,y) = (3, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc3ac113e8] 4/309996 (idx,y) = (4, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc3ac113e8] 5/309996 (idx,y) = (5, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc3ac113e8] 6/309996 (idx,y) = (6, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc3ac113e8] 7/309996 (idx,y) = (7, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc3ac113e8] 8/309996 (idx,y) = (8, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc3ac113e8] 9/309996 (idx,y) = (9, 0) prior mean=[0] prior precision=[0.001] compute=[1] output: summary=[1] return.marginals=[1] return.marginals.predictor=[0] nquantiles=[3] [ 0.025 0.5 0.975 ] ncdf=[0] [ ] section=[6] name=[River] type=[LINEAR] inla_parse_linear... section[River] dir=[fixed.effect0000000002] file for covariates=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc120f77f4] read n=[619992] entries from file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc120f77f4] file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc120f77f4] 0/309996 (idx,y) = (0, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc120f77f4] 1/309996 (idx,y) = (1, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc120f77f4] 2/309996 (idx,y) = (2, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc120f77f4] 3/309996 (idx,y) = (3, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc120f77f4] 4/309996 (idx,y) = (4, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc120f77f4] 5/309996 (idx,y) = (5, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc120f77f4] 6/309996 (idx,y) = (6, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc120f77f4] 7/309996 (idx,y) = (7, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc120f77f4] 8/309996 (idx,y) = (8, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.files/file32cc120f77f4] 9/309996 (idx,y) = (9, 0) prior mean=[0] prior precision=[0.001] compute=[1] output: summary=[1] return.marginals=[1] return.marginals.predictor=[0] nquantiles=[3] [ 0.025 0.5 0.975 ] ncdf=[0] [ ] parse section=[12] name=[INLA.pardiso] type=[PARDISO] inla_parse_pardiso... section[INLA.pardiso] verbose[0] debug[0] parallel.reordering[1] nrhs[-1] parse section=[14] name=[INLA.taucs] type=[TAUCS] inla_parse_taucs... section[INLA.taucs] block.size[40] parse section=[11] name=[INLA.lp.scale] type=[LP.SCALE] inla_parse_lp_scale... section[INLA.lp.scale] lp_scale variables in use = [ ] Index table: number of entries[7], total length[673507] tag start-index length APredictor 0 53515 Predictor 53515 309996 Authority 363511 11 field 363522 305118 unique_id *** inla.core.safe: The inla program failed, but will rerun in case better initial values may help. try=1/1 Read ntt 10 1 5 with max.threads 12 Continue with num.threads = 10:1:5 max_threads = 10 Version.......[Version_25.10.01] Build-time....[Oct 1 2025 19:57:56] MAX_THREADS...[10] Report issues/bugs to <he...@r-inla.org> cwd[C:\Users\jl2094\Documents\Projects\Iron_age_tribe_boundaries] Process file/directory[C:\Users\jl2094\AppData\Local\Temp\RtmpgHyDZF\file32cc5e904630/Model.ini] model[0/1/] threads[10] max.threads[12] blas_threads_force[0] nested[10:1] Run with model[C:\Users\jl2094\AppData\Local\Temp\RtmpgHyDZF\file32cc5e904630/Model.ini] inla_build... number of sections=[16] parse section=[15] name=[INLA.numa] type=[NUMA] inla_parse_numa... section[INLA.numa] enable[0] parse section=[13] name=[INLA.stiles] type=[STILES] inla_parse_stiles... section[INLA.stiles] verbose[0] tile.size[0] default tile.size[0] parse section=[0] name=[INLA.libR] type=[LIBR] inla_parse_libR... section[INLA.libR] R_HOME=[C:/PROGRA~1/R/R-45~1.1] parse section=[10] name=[INLA.Expert] type=[EXPERT] inla_parse_expert... section[INLA.Expert] disable.gaussian.check=[0] Measure dot.product.gain=[No] Optimise linear solve = [No] Optimise num.threads = [Yes] cpo.manual=[0] jp.file=[(null)] jp.model=[(null)] parse section=[1] name=[INLA.Model] type=[PROBLEM] inla_parse_problem... name=[INLA.Model] R-INLA version = [25.10.01] R-INLA build date = [20362] Build tag = [devel] System memory = [31 Gb] L3 cache = [0 Mb] Cores = (Physical= 12, Logical= 12) NUMA not available 'char' is signed 'short int' is 2 bytes 'int' is 4 bytes 'size_t' is 8 bytes 'long int' is 4 bytes 'long long' is 8 bytes 'float' is 4 bytes 'double' is 8 bytes 'long double' is 16 bytes BUFSIZ is 512 bytes CACHE_LINE_SIZE is 64 bytes MEM_ALIGN is 16 bytes GCC/Compiler version[15.2.1 20250808 (Fedora MinGW 15.2.1-2.fc43)] Compiler macro defined [__MMX_WITH_SSE__] Compiler macro defined [__SSE__] Compiler macro defined [__SSE2__] Compiler macro defined [__SSE2_MATH__] Compiler macro defined [__SSE_MATH__] Compiled with -DINLA_WITH_LIBR Compiled with -DINLA_WITH_MUPARSER openmp.strategy=[default] pardiso-library installed and working? = [no] smtp = [taucs] strategy = [default] store results in directory=[C:\Users\jl2094\AppData\Local\Temp\RtmpgHyDZF\file32cc5e904630/results.files-0000000000] output: gcpo=[0] type.cv=[single] num.level.sets=[-1] size.max=[32] strategy=[Posterior] correct.hyperpar=[1] epsilon=[0.005] prior.diagonal=[0.0001] keep=[] remove.fixed=[1] remove=[] cpo=[0] po=[0] dic=[0] kld=[1] mlik=[1] q=[0] graph=[0] hyperparameters=[1] config=[0] config.lite=[0] likelihood.info=[0] internal.opt=[1] save.memory=[0] summary=[1] return.marginals=[0] return.marginals.predictor=[0] nquantiles=[3] [ 0.025 0.5 0.975 ] ncdf=[0] [ ] parse section=[3] name=[Predictor] type=[PREDICTOR] inla_parse_predictor ... section=[Predictor] dir=[predictor] PRIOR->name=[loggamma] hyperid=[53001|Predictor] PRIOR->from_theta=[function (x) <<NEWLINE>>exp(x)] PRIOR->to_theta = [function (x) <<NEWLINE>>log(x)] PRIOR->PARAMETERS=[1, 1e-05] initialise log_precision[13.8155] fixed=[1] user.scale=[1] n=[309996] m=[53515] ndata=[53515] compute=[1] read offsets from file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc2dfb178e] read n=[727022] entries from file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc2dfb178e] file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc2dfb178e] 0/363511 (idx,y) = (0, 0.94591) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc2dfb178e] 1/363511 (idx,y) = (1, 0.94591) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc2dfb178e] 2/363511 (idx,y) = (2, 0.94591) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc2dfb178e] 3/363511 (idx,y) = (3, 0.94591) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc2dfb178e] 4/363511 (idx,y) = (4, 0.94591) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc2dfb178e] 5/363511 (idx,y) = (5, 0.94591) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc2dfb178e] 6/363511 (idx,y) = (6, 0.94591) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc2dfb178e] 7/363511 (idx,y) = (7, 0.94591) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc2dfb178e] 8/363511 (idx,y) = (8, 0.94591) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc2dfb178e] 9/363511 (idx,y) = (9, 0.94591) read link.fitted.values from file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc612026b7] read n=[727022] entries from file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc612026b7] file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc612026b7] 0/363511 (idx,y) = (0, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc612026b7] 1/363511 (idx,y) = (1, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc612026b7] 2/363511 (idx,y) = (2, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc612026b7] 3/363511 (idx,y) = (3, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc612026b7] 4/363511 (idx,y) = (4, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc612026b7] 5/363511 (idx,y) = (5, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc612026b7] 6/363511 (idx,y) = (6, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc612026b7] 7/363511 (idx,y) = (7, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc612026b7] 8/363511 (idx,y) = (8, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc612026b7] 9/363511 (idx,y) = (9, 0) A=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32ccf7a74a] Aext=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc2d826614] AextPrecision=[3.269e+06] output: summary=[1] return.marginals=[0] return.marginals.predictor=[0] nquantiles=[3] [ 0.025 0.5 0.975 ] ncdf=[0] [ ] parse section=[2] name=[INLA.Data1] type=[DATA] inla_parse_data [section 1]... tag=[INLA.Data1] family=[POISSON] likelihood=[POISSON] file->name=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc52f51b6e] file->name=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc8997481] file->name=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc39d32b8c] file->name=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc41016b87] read n=[160545] entries from file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc52f51b6e] 0/53515 (idx,a,y,d) = (0, 1, 0, 1) 1/53515 (idx,a,y,d) = (1, 1, 1, 1) 2/53515 (idx,a,y,d) = (2, 1, 0, 1) 3/53515 (idx,a,y,d) = (3, 1, 0, 1) 4/53515 (idx,a,y,d) = (4, 1, 0, 1) 5/53515 (idx,a,y,d) = (5, 1, 0, 1) 6/53515 (idx,a,y,d) = (6, 1, 0, 1) 7/53515 (idx,a,y,d) = (7, 1, 0, 1) 8/53515 (idx,a,y,d) = (8, 1, 0, 1) 9/53515 (idx,a,y,d) = (9, 1, 0, 1) likelihood.variant=[0] Link model [LOG] Link order [-1] Link variant [-1] Link a [1] Link ntheta [0] mix.use[0] parse section=[4] name=[Authority] type=[FFIELD] inla_parse_ffield... section=[Authority] dir=[random.effect0000000001] model=[iid] PRIOR->name=[loggamma] hyperid=[1001|Authority] PRIOR->from_theta=[function (x) <<NEWLINE>>exp(x)] PRIOR->to_theta = [function (x) <<NEWLINE>>log(x)] PRIOR->PARAMETERS=[1, 5e-05] vb.correct n[1] -1 correct=[-1] constr=[0] diagonal=[0] id.names=<read> compute=[1] nrep=[1] ngroup=[1] Alocal=[no] read covariates from file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc1c2b2aa2] read n=[619992] entries from file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc1c2b2aa2] file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc1c2b2aa2] 0/309996 (idx,y) = (0, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc1c2b2aa2] 1/309996 (idx,y) = (1, 1) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc1c2b2aa2] 2/309996 (idx,y) = (2, 2) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc1c2b2aa2] 3/309996 (idx,y) = (3, 3) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc1c2b2aa2] 4/309996 (idx,y) = (4, 4) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc1c2b2aa2] 5/309996 (idx,y) = (5, 5) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc1c2b2aa2] 6/309996 (idx,y) = (6, 6) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc1c2b2aa2] 7/309996 (idx,y) = (7, 7) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc1c2b2aa2] 8/309996 (idx,y) = (8, 8) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc1c2b2aa2] 9/309996 (idx,y) = (9, 9) file for locations=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc7e1f666a] nlocations=[11] locations[0]=[1] locations[1]=[2] locations[2]=[3] locations[3]=[4] locations[4]=[5] locations[5]=[6] locations[6]=[7] locations[7]=[8] locations[8]=[9] locations[9]=[10] cyclic=[0] initialise log_precision[4] fixed=[0] computed/guessed rank-deficiency = [0] output: summary=[1] return.marginals=[0] return.marginals.predictor=[0] nquantiles=[3] [ 0.025 0.5 0.975 ] ncdf=[0] [ ] parse section=[7] name=[field] type=[FFIELD] inla_parse_ffield... section=[field] dir=[random.effect0000000002] model=[spde2] PRIOR0->name=[pcmatern] hyperid=[23001|field] PRIOR0->from_theta=[function (x) <<NEWLINE>>x] PRIOR0->to_theta = [function (x) <<NEWLINE>>x] PRIOR0->PARAMETERS0[0]=[20794.4] PRIOR0->PARAMETERS0[1]=[4.60517] PRIOR0->PARAMETERS0[2]=[2] vb.correct n[1] -1 correct=[-1] constr=[0] diagonal=[0] id.names=<not present> compute=[1] nrep=[11] ngroup=[18] Alocal=[no] read covariates from file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc48c39ee] read n=[619992] entries from file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc48c39ee] file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc48c39ee] 0/309996 (idx,y) = (0, -1) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc48c39ee] 1/309996 (idx,y) = (1, -1) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc48c39ee] 2/309996 (idx,y) = (2, -1) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc48c39ee] 3/309996 (idx,y) = (3, -1) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc48c39ee] 4/309996 (idx,y) = (4, -1) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc48c39ee] 5/309996 (idx,y) = (5, -1) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc48c39ee] 6/309996 (idx,y) = (6, -1) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc48c39ee] 7/309996 (idx,y) = (7, -1) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc48c39ee] 8/309996 (idx,y) = (8, -1) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc48c39ee] 9/309996 (idx,y) = (9, -1) spde2.prefix = [C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc454d5fcd/file32cc6c3f6276.] spde2.transform = [identity] ntheta (max) = [2] initialise theta[0]=[11.3089] fixed[0]=[0] initialise theta[1]=[-1] fixed[1]=[0] ntheta (used) = [2] computed/guessed rank-deficiency = [0] output: summary=[1] return.marginals=[0] return.marginals.predictor=[0] nquantiles=[3] [ 0.025 0.5 0.975 ] ncdf=[0] [ ] group.model = ar1 group.graph = <NONE> group.cyclic = False group.order = -1 initialise group_rho_intern[2] group.fixed=[0] GROUP.PRIOR->name=[normal] hyperid=[41001|field] GROUP.PRIOR->from_theta=[function (x) <<NEWLINE>>2 * exp(x)/(1 + exp(x)) - 1] GROUP.PRIOR->to_theta = [function (x) <<NEWLINE>>log((1 + x)/(1 - x))] GROUP.PRIOR->GROUP.PARAMETERS=[0, 0.15] parse section=[8] name=[unique_id] type=[FFIELD] inla_parse_ffield... section=[unique_id] dir=[random.effect0000000003] model=[iid] PRIOR->name=[loggamma] hyperid=[1001|unique_id] PRIOR->from_theta=[function (x) <<NEWLINE>>exp(x)] PRIOR->to_theta = [function (x) <<NEWLINE>>log(x)] PRIOR->PARAMETERS=[1, 5e-05] vb.correct n[1] -1 correct=[-1] constr=[0] diagonal=[0] id.names=<read> compute=[1] nrep=[1] ngroup=[1] Alocal=[no] read covariates from file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc62d428d5] read n=[619992] entries from file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc62d428d5] file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc62d428d5] 0/309996 (idx,y) = (0, -1) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc62d428d5] 1/309996 (idx,y) = (1, -1) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc62d428d5] 2/309996 (idx,y) = (2, -1) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc62d428d5] 3/309996 (idx,y) = (3, -1) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc62d428d5] 4/309996 (idx,y) = (4, -1) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc62d428d5] 5/309996 (idx,y) = (5, -1) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc62d428d5] 6/309996 (idx,y) = (6, -1) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc62d428d5] 7/309996 (idx,y) = (7, -1) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc62d428d5] 8/309996 (idx,y) = (8, -1) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc62d428d5] 9/309996 (idx,y) = (9, -1) file for locations=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc5ce53889] nlocations=[4865] locations[0]=[1] locations[1]=[2] locations[2]=[3] locations[3]=[4] locations[4]=[5] locations[5]=[6] locations[6]=[7] locations[7]=[8] locations[8]=[9] locations[9]=[10] cyclic=[0] initialise log_precision[4] fixed=[1] computed/guessed rank-deficiency = [0] output: summary=[1] return.marginals=[0] return.marginals.predictor=[0] nquantiles=[3] [ 0.025 0.5 0.975 ] ncdf=[0] [ ] section=[5] name=[Elevation] type=[LINEAR] inla_parse_linear... section[Elevation] dir=[fixed.effect0000000001] file for covariates=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32ccf56649e] read n=[619992] entries from file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32ccf56649e] file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32ccf56649e] 0/309996 (idx,y) = (0, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32ccf56649e] 1/309996 (idx,y) = (1, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32ccf56649e] 2/309996 (idx,y) = (2, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32ccf56649e] 3/309996 (idx,y) = (3, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32ccf56649e] 4/309996 (idx,y) = (4, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32ccf56649e] 5/309996 (idx,y) = (5, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32ccf56649e] 6/309996 (idx,y) = (6, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32ccf56649e] 7/309996 (idx,y) = (7, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32ccf56649e] 8/309996 (idx,y) = (8, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32ccf56649e] 9/309996 (idx,y) = (9, 0) prior mean=[0] prior precision=[0.001] compute=[1] output: summary=[1] return.marginals=[0] return.marginals.predictor=[0] nquantiles=[3] [ 0.025 0.5 0.975 ] ncdf=[0] [ ] section=[6] name=[River] type=[LINEAR] inla_parse_linear... section[River] dir=[fixed.effect0000000002] file for covariates=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc7f892fb0] read n=[619992] entries from file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc7f892fb0] file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc7f892fb0] 0/309996 (idx,y) = (0, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc7f892fb0] 1/309996 (idx,y) = (1, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc7f892fb0] 2/309996 (idx,y) = (2, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc7f892fb0] 3/309996 (idx,y) = (3, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc7f892fb0] 4/309996 (idx,y) = (4, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc7f892fb0] 5/309996 (idx,y) = (5, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc7f892fb0] 6/309996 (idx,y) = (6, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc7f892fb0] 7/309996 (idx,y) = (7, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc7f892fb0] 8/309996 (idx,y) = (8, 0) file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/file32cc7f892fb0] 9/309996 (idx,y) = (9, 0) prior mean=[0] prior precision=[0.001] compute=[1] output: summary=[1] return.marginals=[0] return.marginals.predictor=[0] nquantiles=[3] [ 0.025 0.5 0.975 ] ncdf=[0] [ ] parse section=[12] name=[INLA.pardiso] type=[PARDISO] inla_parse_pardiso... section[INLA.pardiso] verbose[0] debug[0] parallel.reordering[1] nrhs[-1] parse section=[14] name=[INLA.taucs] type=[TAUCS] inla_parse_taucs... section[INLA.taucs] block.size[40] parse section=[11] name=[INLA.lp.scale] type=[LP.SCALE] inla_parse_lp_scale... section[INLA.lp.scale] lp_scale variables in use = [ ] Index table: number of entries[7], total length[673507] tag start-index length APredictor 0 53515 Predictor 53515 309996 Authority 363511 11 field 363522 305118 unique_id 668640 4865 Elevation 673505 1 River 673506 1 List of hyperparameters: theta[0] = [Log precision for Authority] theta[1] = [log(Range) for field] theta[2] = [log(Stdev) for field] theta[3] = [Group rho_intern for field] parse section=[9] name=[INLA.Parameters] type=[INLA] inla_parse_INLA... section[INLA.Parameters] lincomb.derived.correlation.matrix = [No] global_node.factor = 2.000 global_node.degree = 2147483647 reordering = -1 constr.marginal.diagonal = 1.49e-08 Contents of ai_param 000001E4953D2750 Optimiser: DEFAULT METHOD Option for GSL-BFGS2: tol = 0.1 Option for GSL-BFGS2: step_size = 1 Option for GSL-BFGS2: epsx = 0.002 Option for GSL-BFGS2: epsf = 0.004 Option for GSL-BFGS2: epsg = 0.01 Restart: 0 Optimise: try to be smart: No Optimise: use directions: Yes Mode restart: Yes Mode fixed: No Mode use_mode: No parallel linesearch [0] Gaussian approximation: tolerance_func = 0.004 tolerance_step = 5e-06 optpar_fp = 0 optpar_nr_step_factor = -0.1 Gaussian data: No Strategy: Use the Gaussian approximation Fast mode: On Use linear approximation to log(|Q +c|)? Yes Method: Compute the derivative exact Parameters for improved approximations Number of points evaluate: 9 Step length to compute derivatives numerically: 0.0001 Stencil to compute derivatives numerically: 5 Cutoff value to construct local neigborhood: 0.0001 Log calculations: On Log calculated marginal for the hyperparameters: On Integration strategy: Use only the modal configuration (EMPIRICAL_BAYES) f0 (CCD only): 1.100 dz (GRID only): 0.750 Adjust weights (GRID only): On Difference in log-density limit (GRID only): 6.000 Skip configurations with (presumed) small density (GRID only): On Gradient is computed using Central difference with step-length 0.005000 Hessian is computed using Central difference with step-length 0.070711 Hessian matrix is forced to be a diagonal matrix? [Yes] Compute effective number of parameters? [Yes] Perform a Monte Carlo error-test? [No] Interpolator [Auto] CPO required diff in log-density [3] Stupid search mode: Status [On] Max iter [1000] Factor [1.05] Numerical integration of hyperparameters: Maximum number of function evaluations [100000] Relative error ....................... [1e-05] Absolute error ....................... [1e-06] To stabilise the numerical optimisation: Minimum value of the -Hessian [inf] Strategy for the linear term [Keep] CPO manual calculation[No] VB-correction is [Disabled] Misc options: Hessian correct skewness only [1] inla_build: check for unused entries in[C:\Users\jl2094\AppData\Local\Temp\RtmpgHyDZF\file32cc5e904630/Model.ini] inla_INLA_preopt_experimental... Strategy = [DEFAULT] Mode....................... [Compact] Setup...................... [13.68s] Sparse-matrix library...... [taucs] OpenMP strategy............ [huge] num.threads................ [10:1] num.threads (adaptive)..... [5] blas.num.threads........... [adaptive] Density-strategy........... [Low] Size of graph.............. [309996] Number of constraints...... [0] Optimizing sort2_id........ [294] Optimizing sort2_dd........ [229] Optimizing Qx-strategy..... serial[0.488] parallel [0.512] choose[serial] Optimizing pred-strategy... plain [0.539] data-rich[0.461] choose[data-rich] Optimizing dot-products.... serial.opt[0.297] group.opt[0.346] group.prefetch[0.357] ==> optimal.mix.strategy[0.282] serial.opt[42.9] group.opt[16.3] group.prefetch[40.8] Found optimal reordering=[metis] nnz(L)=[0] and use_global_nodes(user)=[no] List of hyperparameters: theta[0] = [Log precision for Authority] theta[1] = [log(Range) for field] theta[2] = [log(Stdev) for field] theta[3] = [Group rho_intern for field] Compute initial values... Iter[0] RMS(err) = 1.000, update with step-size = 0.285 Iter[1] RMS(err) = 0.467, update with steWarning in bru_log_warn(paste0("iinla: Problem in inla:\n", result)) : iinla: Problem in inla: Error in inla.core.safe(formula = formula, family = family, contrasts = contrasts, : The inla-program exited with an error. Unless you interupted it yourself, please rerun with verbose=TRUE and check the output carefully. If this does not help, please contact the developers at <he...@r-inla.org>. The inla program failed and the maximum number of tries has been reached. iinla: Problem in inla: 1: bru(components = components, formula = obs ~ -1 + unique_id + field + Auth [...] 2: iinla(model = info[["model"]], lhoods = info[["lhoods"]], inputs = info[[" [...] 3: fm_try_callstack(...) 4: do.call(INLA::inla, inla.options.merged, envir = environment(model$effects)) 5: (function (formula = NULL, family = "gaussian", contrasts = NULL, data = N [...] 6: inla.core.safe(formula = formula, family = family, contrasts = contrasts, [...] 7: stop(paste0(r$message, "\n", "The inla program failed and the maximum numb [...] iinla: Giving up and returning last successfully obtained result for diagnostic purposes.
Kind regards,
Joe

Helpdesk (Haavard Rue)

unread,
Oct 5, 2025, 12:57:39 PMOct 5
to Joe Lewis, R-inla discussion group

You're in a RAM demanding situation that you could easily end up with to little
RAM, so I guess this is what happening.

depending on where this 'alloc denied' is happening, you may or may not get a
msg about it.

I can rerun it here to check, if you share data/code
> s/file32cc5414321f]
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc3
> s/file32cc242b319f]
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc3
> read n=[619992] entries from
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.file
> s/file32cc37101b85]
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc3
> 06f294c/data.files/file32cc37101b85] 0/309996 (idx,y) = (0, -1)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc3
> 06f294c/data.files/file32cc37101b85] 1/309996 (idx,y) = (1, -1)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc3
> 06f294c/data.files/file32cc37101b85] 2/309996 (idx,y) = (2, -1)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc3
> 06f294c/data.files/file32cc37101b85] 3/309996 (idx,y) = (3, -1)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc3
> 06f294c/data.files/file32cc37101b85] 4/309996 (idx,y) = (4, -1)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc3
> 06f294c/data.files/file32cc37101b85] 5/309996 (idx,y) = (5, -1)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc3
> 06f294c/data.files/file32cc37101b85] 6/309996 (idx,y) = (6, -1)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc3
> 06f294c/data.files/file32cc37101b85] 7/309996 (idx,y) = (7, -1)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc3
> 06f294c/data.files/file32cc37101b85] 8/309996 (idx,y) = (8, -1)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc3
> read n=[619992] entries from
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.file
> s/file32cc3ac113e8]
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc3
> 06f294c/data.files/file32cc3ac113e8] 0/309996 (idx,y) = (0, 0)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc3
> read n=[619992] entries from
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc306f294c/data.file
> s/file32cc120f77f4]
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc3
> 06f294c/data.files/file32cc120f77f4] 0/309996 (idx,y) = (0, 0)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc3
> 06f294c/data.files/file32cc120f77f4] 1/309996 (idx,y) = (1, 0)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc3
> 06f294c/data.files/file32cc120f77f4] 2/309996 (idx,y) = (2, 0)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc3
> 06f294c/data.files/file32cc120f77f4] 3/309996 (idx,y) = (3, 0)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc3
> 06f294c/data.files/file32cc120f77f4] 4/309996 (idx,y) = (4, 0)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc3
> 06f294c/data.files/file32cc120f77f4] 5/309996 (idx,y) = (5, 0)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc3
> 06f294c/data.files/file32cc120f77f4] 6/309996 (idx,y) = (6, 0)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc3
> 06f294c/data.files/file32cc120f77f4] 7/309996 (idx,y) = (7, 0)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc3
> 06f294c/data.files/file32cc120f77f4] 8/309996 (idx,y) = (8, 0)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc3
> Compiler macro defined [__MMX_WITH_SSE__]
> Compiler macro defined [__SSE__]
> Compiler macro defined [__SSE2__]
> Compiler macro defined [__SSE2_MATH__]
> Compiler macro defined [__SSE_MATH__]
> Compiled with -DINLA_WITH_LIBR
> Compiled with -DINLA_WITH_MUPARSER
> openmp.strategy=[default]
> pardiso-library installed and working? = [no]
> smtp = [taucs]
> strategy = [default]
> store results in
> directory=[C:\Users\jl2094\AppData\Local\Temp\RtmpgHyDZF\file32cc5e904630/resu
> read n=[727022] entries from
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.file
> s/file32cc2dfb178e]
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc2dfb178e] 0/363511 (idx,y) = (0, 0.94591)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc2dfb178e] 1/363511 (idx,y) = (1, 0.94591)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc2dfb178e] 2/363511 (idx,y) = (2, 0.94591)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc2dfb178e] 3/363511 (idx,y) = (3, 0.94591)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc2dfb178e] 4/363511 (idx,y) = (4, 0.94591)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc2dfb178e] 5/363511 (idx,y) = (5, 0.94591)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc2dfb178e] 6/363511 (idx,y) = (6, 0.94591)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc2dfb178e] 7/363511 (idx,y) = (7, 0.94591)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc2dfb178e] 8/363511 (idx,y) = (8, 0.94591)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc2dfb178e] 9/363511 (idx,y) = (9, 0.94591)
> read link.fitted.values from
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.file
> s/file32cc612026b7]
> read n=[727022] entries from
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.file
> s/file32cc612026b7]
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc612026b7] 0/363511 (idx,y) = (0, 0)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc612026b7] 1/363511 (idx,y) = (1, 0)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc612026b7] 2/363511 (idx,y) = (2, 0)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc612026b7] 3/363511 (idx,y) = (3, 0)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc612026b7] 4/363511 (idx,y) = (4, 0)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc612026b7] 5/363511 (idx,y) = (5, 0)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc612026b7] 6/363511 (idx,y) = (6, 0)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc612026b7] 7/363511 (idx,y) = (7, 0)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc612026b7] 8/363511 (idx,y) = (8, 0)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc612026b7] 9/363511 (idx,y) = (9, 0)
> A=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e90
> 4630/data.files/file32ccf7a74a]
> Aext=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> read n=[160545] entries from
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.file
> s/file32cc52f51b6e]
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.file
> s/file32cc1c2b2aa2]
> read n=[619992] entries from
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.file
> s/file32cc1c2b2aa2]
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc1c2b2aa2] 0/309996 (idx,y) = (0, 0)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc1c2b2aa2] 1/309996 (idx,y) = (1, 1)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc1c2b2aa2] 2/309996 (idx,y) = (2, 2)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc1c2b2aa2] 3/309996 (idx,y) = (3, 3)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc1c2b2aa2] 4/309996 (idx,y) = (4, 4)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc1c2b2aa2] 5/309996 (idx,y) = (5, 5)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc1c2b2aa2] 6/309996 (idx,y) = (6, 6)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc1c2b2aa2] 7/309996 (idx,y) = (7, 7)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc1c2b2aa2] 8/309996 (idx,y) = (8, 8)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc1c2b2aa2] 9/309996 (idx,y) = (9, 9)
> file for
> locations=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data
> read n=[619992] entries from
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.file
> s/file32cc48c39ee]
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc48c39ee] 0/309996 (idx,y) = (0, -1)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc48c39ee] 1/309996 (idx,y) = (1, -1)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc48c39ee] 2/309996 (idx,y) = (2, -1)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc48c39ee] 3/309996 (idx,y) = (3, -1)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc48c39ee] 4/309996 (idx,y) = (4, -1)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc48c39ee] 5/309996 (idx,y) = (5, -1)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc48c39ee] 6/309996 (idx,y) = (6, -1)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc48c39ee] 7/309996 (idx,y) = (7, -1)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc48c39ee] 8/309996 (idx,y) = (8, -1)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc48c39ee] 9/309996 (idx,y) = (9, -1)
> spde2.prefix =
> [C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.files/fil
> read n=[619992] entries from
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.file
> s/file32cc62d428d5]
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc62d428d5] 0/309996 (idx,y) = (0, -1)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc62d428d5] 1/309996 (idx,y) = (1, -1)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc62d428d5] 2/309996 (idx,y) = (2, -1)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc62d428d5] 3/309996 (idx,y) = (3, -1)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc62d428d5] 4/309996 (idx,y) = (4, -1)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc62d428d5] 5/309996 (idx,y) = (5, -1)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc62d428d5] 6/309996 (idx,y) = (6, -1)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc62d428d5] 7/309996 (idx,y) = (7, -1)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc62d428d5] 8/309996 (idx,y) = (8, -1)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc62d428d5] 9/309996 (idx,y) = (9, -1)
> file for
> locations=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data
> read n=[619992] entries from
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.file
> s/file32ccf56649e]
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32ccf56649e] 0/309996 (idx,y) = (0, 0)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32ccf56649e] 1/309996 (idx,y) = (1, 0)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32ccf56649e] 2/309996 (idx,y) = (2, 0)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32ccf56649e] 3/309996 (idx,y) = (3, 0)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32ccf56649e] 4/309996 (idx,y) = (4, 0)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32ccf56649e] 5/309996 (idx,y) = (5, 0)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32ccf56649e] 6/309996 (idx,y) = (6, 0)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32ccf56649e] 7/309996 (idx,y) = (7, 0)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32ccf56649e] 8/309996 (idx,y) = (8, 0)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32ccf56649e] 9/309996 (idx,y) = (9, 0)
> prior mean=[0]
> prior precision=[0.001]
> compute=[1]
> output:
> summary=[1]
> return.marginals=[0]
> return.marginals.predictor=[0]
> nquantiles=[3] [ 0.025 0.5 0.975 ]
> ncdf=[0] [ ]
> section=[6] name=[River] type=[LINEAR]
> inla_parse_linear...
> section[River]
> dir=[fixed.effect0000000002]
> file for
> covariates=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/dat
> a.files/file32cc7f892fb0]
> read n=[619992] entries from
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5e904630/data.file
> s/file32cc7f892fb0]
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc7f892fb0] 0/309996 (idx,y) = (0, 0)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc7f892fb0] 1/309996 (idx,y) = (1, 0)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc7f892fb0] 2/309996 (idx,y) = (2, 0)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc7f892fb0] 3/309996 (idx,y) = (3, 0)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc7f892fb0] 4/309996 (idx,y) = (4, 0)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc7f892fb0] 5/309996 (idx,y) = (5, 0)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc7f892fb0] 6/309996 (idx,y) = (6, 0)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc7f892fb0] 7/309996 (idx,y) = (7, 0)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> e904630/data.files/file32cc7f892fb0] 8/309996 (idx,y) = (8, 0)
> file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32cc5
> > > > library/4.4/INLA/bin/linux/64bit/libgomp.so.1)
> > > > /home/jl2094/R/x86_64-pc-linux-gnu-
> > > > library/4.4/INLA/bin/linux/64bit/inla.mkl: /lib/x86_64-linux-
> > > > gnu/libc.so.6: version `GLIBC_2.38' not found (required by
> > > > /home/jl2094/R/x86_64-pc-linux-gnu-
> > > > library/4.4/INLA/bin/linux/64bit/libgssapi_krb5.so.2)
> > > > /home/jl2094/R/x86_64-pc-linux-gnu-
> > > > library/4.4/INLA/bin/linux/64bit/inla.mkl: /lib/x86_64-linux-
> > > > gnu/libc.so.6: version `GLIBC_2.38' not found (required by
> > > > /home/jl2094/R/x86_64-pc-linux-gnu-
> > > > library/4.4/INLA/bin/linux/64bit/libkrb5.so.3)
> > > > /home/jl2094/R/x86_64-pc-linux-gnu-
> > > > library/4.4/INLA/bin/linux/64bit/inla.mkl: /lib/x86_64-linux-
> > > > gnu/libc.so.6: version `GLIBC_2.38' not found (required by
> > > > /home/jl2094/R/x86_64-pc-linux-gnu-
> > > > library/4.4/INLA/bin/linux/64bit/libk5crypto.so.3)
> > > > /home/jl2094/R/x86_64-pc-linux-gnu-
> > > > library/4.4/INLA/bin/linux/64bit/inla.mkl: /lib/x86_64-linux-
> > > > gnu/libc.so.6: version `GLIBC_2.38' not found (required by
> > > > /home/jl2094/R/x86_64-pc-linux-gnu-
> > > > library/4.4/INLA/bin/linux/64bit/libcom_err.so.2)
> > > > /home/jl2094/R/x86_64-pc-linux-gnu-
> > > > library/4.4/INLA/bin/linux/64bit/inla.mkl: /lib/x86_64-linux-
> > > > gnu/libc.so.6: version `GLIBC_2.38' not found (required by
> > > > /home/jl2094/R/x86_64-pc-linux-gnu-
> > > > library/4.4/INLA/bin/linux/64bit/libkrb5support.so.0)
> > > > /home/jl2094/R/x86_64-pc-linux-gnu-
> > > > library/4.4/INLA/bin/linux/64bit/inla.mkl: /lib/x86_64-linux-
> > > > https://groups.google.com/d/msgid/r-inla-discussion-group/9f9e5024-459c-41bd-9137-8bad84f1737fn%40googlegroups.com
> > > > .

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

Joe Lewis

unread,
Oct 5, 2025, 1:05:27 PMOct 5
to R-inla discussion group
Dear  Håvard,

Thank you for the quick reply. I am currently running locally with 16GB. Thank you for offering to run the model to see what might be happening.

Please see attached the mesh, spde, input data, components/model.

Hopefully this is what you need. Within the .zip is also the code.

Kind regards,
Joe
data_etc.zip

Helpdesk (Haavard Rue)

unread,
Oct 5, 2025, 1:12:37 PMOct 5
to Joe Lewis, R-inla discussion group

this is what I get

+ options = list(control.compute = list(dic = FALSE, waic = FALSE, cpo =
FALSE),
+ keep = TRUE, verbose = TRUE))
Error in handle_problems(e_input) :
The input evaluation 'Authority_new' for 'Authority' failed.
Perhaps the data object doesn't contain the needed variables?
> > > model[C:\Users\jl2094\AppData\Local\Temp\RtmpgHyDZF\file32cc5e904630/Model
> > > directory=[C:\Users\jl2094\AppData\Local\Temp\RtmpgHyDZF\file32cc5e904630/

Joe Lewis

unread,
Oct 5, 2025, 1:14:33 PMOct 5
to R-inla discussion group
Apologies,

corrected the code:

components <- ~
  Authority(Authority_new2, model = "iid") +

  Elevation(elevation_km, model = "linear") +
  River(rivers_1_dist2_km, model = "linear") +
  field(geometry,
        model = spde,
        replicate = Authority_new2,
        group = time_idx,
        control.group = list(model = "ar1")) +

  unique_id(location_id, model = "iid", fixed = TRUE)

fit_poi <- bru(
  components = components,
  formula = obs ~ -1 + unique_id + field + Authority + Elevation + River + offset(log_count),
  family = "poisson",
  data = fit_data,
  options = list(control.compute = list(dic = FALSE, waic = FALSE, cpo = FALSE), verbose = TRUE))

Finn Lindgren

unread,
Oct 5, 2025, 1:24:50 PMOct 5
to Joe Lewis, R-inla discussion group
When you supply components, the formula should contain the actual expression for the predictor, so the -1 and offset construction are incorrect. I’ll send another message shortly.
Finn

On 5 Oct 2025, at 18:14, Joe Lewis <josephl...@gmail.com> wrote:

Apologies,

Helpdesk (Haavard Rue)

unread,
Oct 5, 2025, 1:27:43 PMOct 5
to Finn Lindgren, Joe Lewis, R-inla discussion group

field(geometry,
model = spde,
replicate = Authority_new2,


does this work with

> str(fit_data$Authority_new2)
Named chr [1:53515] "O" "S" "N" "C" "J" "R" "K" "E" "X" "Y" "W" "O" "S" ...
- attr(*, "names")= chr [1:53515] "Belgae" "Cantii" "Catuvellauni"
"Catuvellauni||Trinovantes" ...



???
> > > > > > directory=[C:\Users\jl2094\AppData\Local\Temp\RtmpgHyDZF\file32cc5e9
Håvard Rue
he...@r-inla.org

Finn Lindgren

unread,
Oct 5, 2025, 1:28:22 PMOct 5
to Joe Lewis, R-inla discussion group
Here's a corrected version.
You should also consider whether the "fixed = TRUE" on unique_id is what you intended, as it fixes the precision parameter to whatever value the default prior sets it to, which may not be what you want. If you set it fixed, you should also supply what value you want it to be fixed _to_.

components <- ~
  0 +

  Authority(Authority_new2, model = "iid") +
  Elevation(elevation_km, model = "linear") +
  River(rivers_1_dist2_km, model = "linear") +
  field(geometry,
        model = spde,
        replicate = Authority_new2,
        group = time_idx,
        control.group = list(model = "ar1")) +
  unique_id(location_id, model = "iid", fixed = TRUE) +
  myoffset(log_count, model = "const")


fit_poi <- bru(
  components = components,
  formula = obs ~ unique_id + field + Authority + Elevation + River + my_offset,

  family = "poisson",
  data = fit_data,
  options = list(control.compute = list(dic = FALSE, waic = FALSE, cpo = FALSE), verbose = TRUE))

Helpdesk (Haavard Rue)

unread,
Oct 5, 2025, 1:31:11 PMOct 5
to Finn Lindgren, Joe Lewis, R-inla discussion group
when I run the edited code, I get

> components <- ~
+ 0 +
+ Authority(Authority_new2, model = "iid") +
+ Elevation(elevation_km, model = "linear") +
+ River(rivers_1_dist2_km, model = "linear") +
+ field(geometry,
+ model = spde,
+ replicate = Authority_new2,
+ group = time_idx,
+ control.group = list(model = "ar1")) +
+ unique_id(location_id, model = "iid", fixed = TRUE) +
+ myoffset(log_count, model = "const")

> fit_poi <- bru(
+ components = components,
+ formula = obs ~ unique_id + field + Authority + Elevation + River +
my_offset,
+ family = "poisson",
+ data = fit_data,
+ options = list(control.compute = list(dic = FALSE, waic = FALSE, cpo =
FALSE),
+ verbose = TRUE, keep = TRUE))
Error in eval(predictor, envir = envir, enclos = enclos) :
object 'my_offset' not found
> > > > > > > directory=[C:\Users\jl2094\AppData\Local\Temp\RtmpgHyDZF\file32cc5
Håvard Rue
he...@r-inla.org

Joe Lewis

unread,
Oct 5, 2025, 1:33:09 PMOct 5
to R-inla discussion group
Hi Finn,

I've amended code so that these are converted to character before coercing into factor:

fit_data$Authority_new2 <- as.character(fit_data$Authority_new2)
fit_data$Authority_new2 <- factor(fit_data$Authority_new2, levels = unique(fit_data$Authority_new2), labels = unique(fit_data$Authority_new2))


I'm not sure if the different factor names impacts the fitting though.

Kind regards,
Joe

Finn Lindgren

unread,
Oct 5, 2025, 1:34:00 PMOct 5
to Helpdesk, Joe Lewis, R-inla discussion group
As for the replicate part, inlabru does support having labels for the replicate information, as it constructs a "factor mapper" to map the labels to indices, as needed by INLA::f():
In the example below, A,C,B,A in the input will be mapped to 1,3,2,1 before it hands it to inla()

> fit<-bru(y~field(1:4,model="ar1",replicate=c("A","C","B","A")),data=data.frame(y=1:4),options=list(bru_run=FALSE))
> fit
inlabru version: 2.13.0.9016
INLA version: 25.09.19
Components:
Latent components:
field: main = ar1(1:4), replicate = iid(c("A", "C", "B", "A"))
Intercept: main = linear(1)
Observation models:
  Family: 'gaussian'
    Tag: <No tag>
    Data class: 'data.frame'
    Response class: 'integer'
    Predictor: y ~ .
    Additive/Linear: TRUE/TRUE
    Used components: effects[field, Intercept], latent[]
NULL
> str(fit$bru_info$model$effects$field$replicate$mapper)
List of 4
 $ levels        : chr [1:3] "A" "B" "C"
 $ factor_mapping: chr "full"
 $ indexed       : logi TRUE
 $ n             : int 3
 - attr(*, "class")= chr [1:3] "bm_factor_index" "bm_factor" "bru_mapper"

Finn Lindgren

unread,
Oct 5, 2025, 1:36:37 PMOct 5
to Joe Lewis, R-inla discussion group
It will have an impact if the data doesn't use all the factor levels; In your updated code it does, and it would also do that if you give it plain character input, as then it would essentially do what you did (but I think it also sorts the levels alphabetically, based on my example, where A,C,B,A gave the levels A,B,C, in that order).

Finn

Joe Lewis

unread,
Oct 5, 2025, 1:36:50 PMOct 5
to R-inla discussion group
Hi,

Here's a corrected version.
You should also consider whether the "fixed = TRUE" on unique_id is what you intended, as it fixes the precision parameter to whatever value the default prior sets it to, which may not be what you want. If you set it fixed, you should also supply what value you want it to be fixed _to_.

Thank you, I assumed the precision parameter was fit to a high value. I will supply the fixed _to_ value. Specifically, I want a high value to minimise the borrowing between unique_id.


components <- ~
  0 +

  Authority(Authority_new2, model = "iid") +
  Elevation(elevation_km, model = "linear") +
  River(rivers_1_dist2_km, model = "linear") +
  field(geometry,
        model = spde,
        replicate = Authority_new2,
        group = time_idx,
        control.group = list(model = "ar1")) +
  unique_id(location_id, model = "iid", fixed = TRUE) +
  myoffset(log_count, model = "const")


fit_poi <- bru(
  components = components,
  formula = obs ~ unique_id + field + Authority + Elevation + River + my_offset,

  family = "poisson",
  data = fit_data,
  options = list(control.compute = list(dic = FALSE, waic = FALSE, cpo = FALSE), verbose = TRUE))

####
## Reply to Haavard 
####
Error in eval(predictor, envir = envir, enclos = enclos) :
object 'my_offset' not found

I'm not sure why? log_count is in the df. I assume it's to do with the const model?

> colnames(fit_data) [1] "x" "y" "count" "log_count" "geometry" "location_id" [7] "count_new" "obs" "elevation_km" "rivers_1_dist2_km" "Mid.Date" "Authority_new2" [13] "time_idx"

Finn Lindgren

unread,
Oct 5, 2025, 1:38:24 PMOct 5
to Joe Lewis, R-inla discussion group
I made a typo; if the component is my_offset, you need my_offset in the formula, but I accidentally left out the first _ ( in the component definition).

Finn

Helpdesk (Haavard Rue)

unread,
Oct 5, 2025, 1:38:40 PMOct 5
to Joe Lewis, R-inla discussion group

please recollect all changes, and resend. to many edits

note you're using both 'myoffset' and 'my_offset', so....
> https://groups.google.com/d/msgid/r-inla-discussion-group/662ec285-0776-42f4-a937-f6892bff023cn%40googlegroups.com

Finn Lindgren

unread,
Oct 5, 2025, 1:39:25 PMOct 5
to Joe Lewis, R-inla discussion group
Since your model is purely additive, you can also say just
  formula = y ~ .
which means "add all the available components.

Finn

Joe Lewis

unread,
Oct 5, 2025, 1:45:34 PMOct 5
to R-inla discussion group
Dear both,

Please see update code/files.

changes:
1. made Authority_new2 character/factor to ensure that factor names are the same
fit_data$Authority_new2 <- as.character(fit_data$Authority_new2)
fit_data$Authority_new2 <- factor(fit_data$Authority_new2, levels = unique(fit_data$Authority_new2), labels = unique(fit_data$Authority_new2))

2. added   myoffset(log_count, model = "const") to components to include offset correctly. 
3. amended formula to   formula = y ~ ., so that all components are used.

For now i'll keep unique_id(fixed = TRUE) without supplying a _to_ value.

Kind regards,
Joe
data_etc.zip

Helpdesk (Haavard Rue)

unread,
Oct 5, 2025, 3:54:19 PMOct 5
to Joe Lewis, R-inla discussion group

your response is poisson but not integer

*** ERROR *** INLA.Data1: POISSON likelihood is defined on integers, but y[0]
= 3159040.25062
> > > > > > > > > > > 06f294c/data.files/file32cc37101b85] 0/309996 (idx,y) =
> > > > > > > > > > > (0, -1)
> > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32
> > > > > > > > > > > cc3
> > > > > > > > > > > 06f294c/data.files/file32cc3ac113e8] 0/309996 (idx,y) =
> > > > > > > > > > > (0, 0)
> > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32
> > > > > > > > > > > cc3
> > > > > > > > > > > 06f294c/data.files/file32cc120f77f4] 0/309996 (idx,y) =
> > > > > > > > > > > (0, 0)
> > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32
> > > > > > > > > > > cc3
> > > > > > > > > > > Process
> > > > > > > > > > > file/directory[C:\Users\jl2094\AppData\Local\Temp\RtmpgHyD
> > > > > > > > > > > ZF\file32cc5e904
> > > > > > > > > > > 630/
> > > > > > > > > > > Model.ini] model[0/1/] threads[10] max.threads[12]
> > > > > > > > > > > blas_threads_force[0]
> > > > > > > > > > > nested[10:1]
> > > > > > > > > > > Run with
> > > > > > > > > > > model[C:\Users\jl2094\AppData\Local\Temp\RtmpgHyDZF\file32
> > > > > > > > > > > cc5e904630/Model
> > > > > > > > > > > e904630/data.files/file32cc2dfb178e] 0/363511 (idx,y) =
> > > > > > > > > > > (0, 0.94591)
> > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32
> > > > > > > > > > > e904630/data.files/file32cc612026b7] 0/363511 (idx,y) =
> > > > > > > > > > > (0, 0)
> > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32
> > > > > > > > > > > e904630/data.files/file32cc1c2b2aa2] 0/309996 (idx,y) =
> > > > > > > > > > > (0, 0)
> > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32
> > > > > > > > > > > e904630/data.files/file32cc48c39ee] 0/309996 (idx,y) = (0,
> > > > > > > > > > > -1)
> > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32
> > > > > > > > > > > e904630/data.files/file32cc62d428d5] 0/309996 (idx,y) =
> > > > > > > > > > > (0, -1)
> > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32
> > > > > > > > > > > e904630/data.files/file32ccf56649e] 0/309996 (idx,y) = (0,
> > > > > > > > > > > 0)
> > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32
> > > > > > > > > > > e904630/data.files/file32cc7f892fb0] 0/309996 (idx,y) =
> > > > > > > > > > > (0, 0)
> > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZF/file32
Håvard Rue
he...@r-inla.org

Joe Lewis

unread,
Oct 5, 2025, 4:10:32 PMOct 5
to R-inla discussion group
Hi,

This was caused by having y ~ ., rather than obs ~ 

I've amended this below:


components <- ~
  0 +
  Authority(Authority_new2, model = "iid") +
  Elevation(elevation_km, model = "rw2") +
  River(rivers_1_dist2_km, model = "rw2") +

  field(geometry,
        model = spde,
        replicate = Authority_new2,
        group = time_idx,
        control.group = list(model = "ar1")) +
  unique_id(location_id, model = "iid", fixed = TRUE, initial = log(1e-6)) +

  myoffset(log_count, model = "const")

fit_poi <- bru(
  components = components,
  formula = obs ~ .,
  #  formula = obs ~ -1 + unique_id + field + Authority + Elevation + River + offset(log_count),

  family = "poisson",
  data = fit_data,
  options = list(control.compute = list(dic = FALSE, waic = FALSE, cpo = FALSE), verbose = TRUE))

Helpdesk (Haavard Rue)

unread,
Oct 5, 2025, 4:21:45 PMOct 5
to Joe Lewis, R-inla discussion group

there is no way can you run this model on a 16Gb RAM computer ;-)
> > > > > > > > > > > > > > > > /home/jl2094/R/x86_64-pc-linux-gnu-
> > > > > > > > > > > > > > > > library/4.4/INLA/bin/linux/64bit/inla.mkl:
> > > > > > > > > > > > > > > > /lib/x86_64-linux-
> > > > > > > > > > > > > > > > gnu/libc.so.6: version `GLIBC_2.38' not found
> > > > > > > > > > > > > > > > (required by
> > > > > > > > > > > > > > > > /home/jl2094/R/x86_64-pc-linux-gnu-
> > > > > > > > > > > > > > > > library/4.4/INLA/bin/linux/64bit/libcom_err.so.2
> > > > > > > > > > > > > > > > )
> > > > > > > > > > > > > > > > /home/jl2094/R/x86_64-pc-linux-gnu-
> > > > > > > > > > > > > > > > library/4.4/INLA/bin/linux/64bit/inla.mkl:
> > > > > > > > > > > > > > > > /lib/x86_64-linux-
> > > > > > > > > > > > > > > > gnu/libc.so.6: version `GLIBC_2.38' not found
> > > > > > > > > > > > > > > > (required by
> > > > > > > > > > > > > > > > /home/jl2094/R/x86_64-pc-linux-gnu-
> > > > > > > > > > > > > > > > library/4.4/INLA/bin/linux/64bit/libkrb5support.

Joe Lewis

unread,
Oct 5, 2025, 4:26:48 PMOct 5
to Helpdesk, R-inla discussion group
Hi,

I might be able to get access to a HCP! (128gb).

Re. The model, is this correctly fitting individual spde to each authority_new2 with each spde also temporally varying by ar1 (ie. So I can see how each spde for authority_new2 varies across time?).

And then the offset correctly modifies the likelihood to take into account that while I'm predicting obs (1, observed. 0 not observed), the observation also has an associated count (higher count = more confidence at that location for predicting obs)?

Thank you both for all of your help!

Kind regards,
Joe

Helpdesk (Haavard Rue)

unread,
Oct 5, 2025, 4:32:53 PMOct 5
to Joe Lewis, R-inla discussion group

space-time models are more challenging due to different neigbourhood structure.

you can try to reduce the time resolution, to fewer 'points' just to see if it
runs. when it does, you can run with more time points, etc...  

also reducing the size of the mesh as much as you can will help.

try to set

num.threads="A:B"

and let A=2 and B=4 or something, as memory use is mainly controlled by 'A':
higher is more memory

Best
Havard
> > > > > > > > > > > > > > > directory=[C:\Users\jl2094\AppData\Local\Temp\Rtmp
> > > > > > > > > > > > > > > gHyD
> > > > > > > > > > > > > > > ZF\f
> > > > > > > > > > > > > > > ile32cc306f294c/
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc5a03f19] 0/363511
> > > > > > > > > > > > > > > (idx,y) =
> > > > > > > > > > > > > > > (0,
> > > > > > > > > > > > > > > 0.94591)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc5a03f19] 1/363511
> > > > > > > > > > > > > > > (idx,y) =
> > > > > > > > > > > > > > > (1,
> > > > > > > > > > > > > > > 0.94591)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc5a03f19] 2/363511
> > > > > > > > > > > > > > > (idx,y) =
> > > > > > > > > > > > > > > (2,
> > > > > > > > > > > > > > > 0.94591)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc5a03f19] 3/363511
> > > > > > > > > > > > > > > (idx,y) =
> > > > > > > > > > > > > > > (3,
> > > > > > > > > > > > > > > 0.94591)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc5a03f19] 4/363511
> > > > > > > > > > > > > > > (idx,y) =
> > > > > > > > > > > > > > > (4,
> > > > > > > > > > > > > > > 0.94591)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc5a03f19] 5/363511
> > > > > > > > > > > > > > > (idx,y) =
> > > > > > > > > > > > > > > (5,
> > > > > > > > > > > > > > > 0.94591)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc5a03f19] 6/363511
> > > > > > > > > > > > > > > (idx,y) =
> > > > > > > > > > > > > > > (6,
> > > > > > > > > > > > > > > 0.94591)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc5a03f19] 7/363511
> > > > > > > > > > > > > > > (idx,y) =
> > > > > > > > > > > > > > > (7,
> > > > > > > > > > > > > > > 0.94591)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc5a03f19] 8/363511
> > > > > > > > > > > > > > > (idx,y) =
> > > > > > > > > > > > > > > (8,
> > > > > > > > > > > > > > > 0.94591)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc5a03f19] 9/363511
> > > > > > > > > > > > > > > (idx,y) =
> > > > > > > > > > > > > > > (9,
> > > > > > > > > > > > > > > 0.94591)
> > > > > > > > > > > > > > > read link.fitted.values from
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc306f294c/data.
> > > > > > > > > > > > > > > file
> > > > > > > > > > > > > > > s/file32cc5414321f]
> > > > > > > > > > > > > > > read n=[727022] entries from
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc306f294c/data.
> > > > > > > > > > > > > > > file
> > > > > > > > > > > > > > > s/file32cc5414321f]
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc5414321f] 0/363511
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (0, 0)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc5414321f] 1/363511
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (1, 0)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc5414321f] 2/363511
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (2, 0)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc5414321f] 3/363511
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (3, 0)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc5414321f] 4/363511
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (4, 0)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc5414321f] 5/363511
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (5, 0)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc5414321f] 6/363511
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (6, 0)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc5414321f] 7/363511
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (7, 0)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc5414321f] 8/363511
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (8, 0)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc6441196f] 0/309996
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (0, 0)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc6441196f] 1/309996
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (1, 1)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc6441196f] 2/309996
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (2, 2)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc6441196f] 3/309996
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (3, 3)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc6441196f] 4/309996
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (4, 4)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc6441196f] 5/309996
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (5, 5)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc6441196f] 6/309996
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (6, 6)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc6441196f] 7/309996
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (7, 7)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc6441196f] 8/309996
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (8, 8)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc242b319f] 0/309996
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (0, -1)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc242b319f] 1/309996
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (1, -1)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc242b319f] 2/309996
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (2, -1)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc242b319f] 3/309996
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (3, -1)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc242b319f] 4/309996
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (4, -1)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc242b319f] 5/309996
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (5, -1)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc242b319f] 6/309996
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (6, -1)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc242b319f] 7/309996
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (7, -1)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc242b319f] 8/309996
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (8, -1)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc37101b85] 0/309996
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (0, -1)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc37101b85] 1/309996
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (1, -1)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc37101b85] 2/309996
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (2, -1)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc37101b85] 3/309996
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (3, -1)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc37101b85] 4/309996
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (4, -1)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc37101b85] 5/309996
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (5, -1)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc37101b85] 6/309996
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (6, -1)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc37101b85] 7/309996
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (7, -1)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc37101b85] 8/309996
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (8, -1)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc3ac113e8] 0/309996
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (0, 0)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc3ac113e8] 1/309996
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (1, 0)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc3ac113e8] 2/309996
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (2, 0)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc3ac113e8] 3/309996
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (3, 0)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc3ac113e8] 4/309996
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (4, 0)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc3ac113e8] 5/309996
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (5, 0)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc3ac113e8] 6/309996
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (6, 0)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc3ac113e8] 7/309996
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (7, 0)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc3ac113e8] 8/309996
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (8, 0)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc120f77f4] 0/309996
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (0, 0)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc120f77f4] 1/309996
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (1, 0)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc120f77f4] 2/309996
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (2, 0)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc120f77f4] 3/309996
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (3, 0)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc120f77f4] 4/309996
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (4, 0)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc120f77f4] 5/309996
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (5, 0)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc120f77f4] 6/309996
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (6, 0)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc120f77f4] 7/309996
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (7, 0)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc120f77f4] 8/309996
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (8, 0)
> > > > > > > > > > > > > > > file=[C:/Users/jl2094/AppData/Local/Temp/RtmpgHyDZ
> > > > > > > > > > > > > > > F/fi
> > > > > > > > > > > > > > > le32
> > > > > > > > > > > > > > > cc3
> > > > > > > > > > > > > > > 06f294c/data.files/file32cc120f77f4] 9/309996
> > > > > > > > > > > > > > > (idx,y)
> > > > > > > > > > > > > > > =
> > > > > > > > > > > > > > > (9, 0)
> > > > > > > > > > > > > > > prior mean=[0]
> > > > > > > > > > > > > > > prior precision=[0.001]
> > > > > > > > > > > > > > > compute=[1]
> > > > > > > > > > > > > > > output:
> > > > > > > > > > > > > > > summary=[1]
> > > > > > > > > > > > > > > return.marginals=[1]
> > > > > > > > > > > > > > > return.marginals.predictor=[0]
> > >

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

Finn Lindgren

unread,
Oct 5, 2025, 5:58:14 PMOct 5
to R-inla discussion group
Hi Joe,

I went back to your original message and see that your "obs" variable is a 0/1 variable, and that you're doing a Poisson trick for a multinomial model for each observation location.
In such a model, I don't see why the Elevation and River components are there, or rather, I don't see how you expect them to have any useful effect on the model, as they don't vary across Authority, and are constant for each given location (I haven't inspected your variables, so correct me if I'm wrong) and therefore would not affect the normalised calculation for the Multinomial target model, as exp(x+a)/(exp(x+a)+exp(y+a)) = exp(x)/(exp(x)+exp(y)) for any value of a (which is also what the passion-trick random effect variable that you name "unique_id" relies on; I now understand what you want with fixed=TRUE, and you really _should_ set the precision value to a specific value so you know exactly what value it is set to, as the default value isn't necessarily useful for this purpose!).

I suspect you want Elevation and River to also have replicate = Authority_new2 in their definitions, so they can have some influence on the Multinomial target model.
Or rather, I'd use the covariate values as weights, and model="iid":
  ... +
  Elevation(Authority_new2, elevation_km, model = "iid") +
  River(Authority_new2, rivers_1_dist2_km, model = "iid") +
  ...

I'm not really sure what your  offset construction is meant to do, and in particular how you intend the offset to represent certainty/uncertainty. Perhaps if you spelled out what the actual Multinomial model is, it would be easier to determine if you're doing something sensible.
If we let Pred_{i,a} be the "plain" probabilities defined by the model for observation "i" belonging to authority "a", and that the probaiblities are normalised exponentials from the Poisson trick linear predictor, \eta_{i,a}. Then
  Pred_{i,a} = \exp(\eta_{i,a}) / \sum_b \exp(\eta_{i,b})
for each {i,a}.

When you add C_{i,a} = \log(count_{i,a}) to \eta, the following happens, defining new probabilities, lets call them Pred^c_{i,a}:
  Pred^c_{i,a} = \exp(\eta_{i,a} + C_{i,a}) / \sum_b \exp(\eta_{i,b} + C_{i,b})
and this is what your code uses, plus the Poisson trick.

This _does_ have the effect of pushing the probabilities for {i,a} upwards for large C_{i,a} (i.e. when C_{i,b} < C_{i,a} for b \neq a).
However, what that actually means is that the estimated values of Pred_{i,a} themselves will be _smaller_ (the eta will be smaller than they would have had without adding C), which I think is the opposite effect of what you're after? Unless what you meant was that a large C means that the observation was _more likely than it "ought" to have been to come from 'a' than it "should" have_, based on some observation mechanism, in which case it _does_ have the effect you want.

I think you need to write down your model more carefully (in words and maths, not code); either write your "confidence model" in a way that it works as a kind of "prior distribution", and work out what approximation of that gives a model of the form we can deal with (which might be as simple as subtracting C instead of adding it, or keeping it as you have it now).
If it's just an observation mechanism, there's likely a basic formulation that works similarly to e.g. distance sampling models, where a "true" Poisson point process is observed in "thinned" form, and the apparent intensity function is the product of the true intensity and the conditional detection/observation probability model; after taking the log, one simply gets the log of the true intensity plus the log of the detection probability. This seems similar but not identical to what you describe, which sounds like some kind of preferential sampling problem.

PS. I dropped the loooong email quotations here, since the questions/answers about these particular things are only marginally related to how to write the code; once the maths is clear, the coding will be clear.   The memory requirements needed to run it is a separate topic...

Finn

Joe Lewis

unread,
Oct 5, 2025, 6:44:23 PMOct 5
to R-inla discussion group
Dear Finn,

Please see my responses in red.


I went back to your original message and see that your "obs" variable is a 0/1 variable, and that you're doing a Poisson trick for a multinomial model for each observation location.
In such a model, I don't see why the Elevation and River components are there, or rather, I don't see how you expect them to have any useful effect on the model, as they don't vary across Authority, and are constant for each given location (I haven't inspected your variables, so correct me if I'm wrong) and therefore would not affect the normalised calculation for the Multinomial target model, as exp(x+a)/(exp(x+a)+exp(y+a)) = exp(x)/(exp(x)+exp(y)) for any value of a (which is also what the passion-trick random effect variable that you name "unique_id" relies on; I now understand what you want with fixed=TRUE, and you really _should_ set the precision value to a specific value so you know exactly what value it is set to, as the default value isn't necessarily useful for this purpose!).

So my intention is to predict 'obs' using elevation/river components and the spde. 'obs' denotes which Authority_new the observation at each location is. 1 being the Authoity_new of the observed data point, 0 being the alternatives. I want to predict, based on their location, the expected Authority_new. For each location, I e.g. predict the rate of Authority_new2, nomalise across all predictions. This gives me for each location, the probability of that location being each Authority_new2.

My thought was that, while the data of elevation/river does not vary across each unique_id, the model would be able to capture broader patterns (i.e. across unique_id). Am I wrong in thinking this? Ideally, I want to include these factors to account for that the probability of a location being a specific Authority can depend on elevation/river distance (as well as the spde, which more broadly accounts for e.g. one authority being present in south-west; one in south-east, etc, as well accounting for other non-included factors).

I suspect you want Elevation and River to also have replicate = Authority_new2 in their definitions, so they can have some influence on the Multinomial target model.
Or rather, I'd use the covariate values as weights, and model="iid":
  ... +
  Elevation(Authority_new2, elevation_km, model = "iid") +
  River(Authority_new2, rivers_1_dist2_km, model = "iid") +
  ...

Ah, I didn't know I could use these to weight the covariate. Ideally, yes. I want elevation/river to influence the probability of each location being a specific Authority. but this likely varies spatially as well.


I'm not really sure what your  offset construction is meant to do, and in particular how you intend the offset to represent certainty/uncertainty. Perhaps if you spelled out what the actual Multinomial model is, it would be easier to determine if you're doing something sensible.
If we let Pred_{i,a} be the "plain" probabilities defined by the model for observation "i" belonging to authority "a", and that the probaiblities are normalised exponentials from the Poisson trick linear predictor, \eta_{i,a}. Then
  Pred_{i,a} = \exp(\eta_{i,a}) / \sum_b \exp(\eta_{i,b})
for each {i,a}.

When you add C_{i,a} = \log(count_{i,a}) to \eta, the following happens, defining new probabilities, lets call them Pred^c_{i,a}:
  Pred^c_{i,a} = \exp(\eta_{i,a} + C_{i,a}) / \sum_b \exp(\eta_{i,b} + C_{i,b})
and this is what your code uses, plus the Poisson trick.

This _does_ have the effect of pushing the probabilities for {i,a} upwards for large C_{i,a} (i.e. when C_{i,b} < C_{i,a} for b \neq a).
However, what that actually means is that the estimated values of Pred_{i,a} themselves will be _smaller_ (the eta will be smaller than they would have had without adding C), which I think is the opposite effect of what you're after? Unless what you meant was that a large C means that the observation was _more likely than it "ought" to have been to come from 'a' than it "should" have_, based on some observation mechanism, in which case it _does_ have the effect you want.

Each location in my df (observed) has an association count. Here, each location denotes the location in which coins were found. At this location, there are x coins. for example, location 1 has 10 coins; location 2 has 25 coins etc. I am wanting the probability of each location being a specific Authority_new to also depends on this count. For example, if at one location there were 100 coins found (which are all associated to a specific authority), then that location will have higher probability of being that specific authority.

I think you need to write down your model more carefully (in words and maths, not code); either write your "confidence model" in a way that it works as a kind of "prior distribution", and work out what approximation of that gives a model of the form we can deal with (which might be as simple as subtracting C instead of adding it, or keeping it as you have it now).
If it's just an observation mechanism, there's likely a basic formulation that works similarly to e.g. distance sampling models, where a "true" Poisson point process is observed in "thinned" form, and the apparent intensity function is the product of the true intensity and the conditional detection/observation probability model; after taking the log, one simply gets the log of the true intensity plus the log of the detection probability. This seems similar but not identical to what you describe, which sounds like some kind of preferential sampling problem.

In words (sorry!), I intend to:
* predict the probability of a location being a specific authority_new.
* each observed location has an associated count. This indicates that number of coins that are found at that location. All coins at this location are associated with the same authority. More coins = more confidence that this location is to be associated with that Authority. 
* probability of a location being a specific authority_new will depend 1. on the spatial location more generally, e.g. a specific Authority_new is 'clustered' in the SE; another is 'clustered' in the SW. So this is why I included 'Authority_new' as a replicate. 2. authority_new more likely to be in areas that also contain the same 'authroity_new' and e.g. observed data with a high associated count.
* The probability of a location being a specific authority_new will also depend on elevation/distance from river. Realistically, shifts from authority_new 'regions' will depend on rivers/elevation. for example, one authority_new will become less likely given its location due to factors such as being close to a river/ on a mountain range.
* This leaves aside the temporal aspect which then models how the probability of a location being a specific authroity_new varies across time.

PS. I dropped the loooong email quotations here, since the questions/answers about these particular things are only marginally related to how to write the code; once the maths is clear, the coding will be clear.   The memory requirements needed to run it is a separate topic...

Thank you once again.

Kind regards,
Joe

Reply all
Reply to author
Forward
0 new messages