Skip to contents

Simply fits a constant (the mean). This is useful as a benchmark for other models.

Usage

constant_inla(sf, verbose = FALSE, cores = parallel::detectCores())

Arguments

sf

A simple features object with some geometry.

verbose

Should R-INLA run in mode verbose = TRUE.

cores

Number of cores, passed to R-INLA, defaults to parallel::detectCores().

Examples

fit <- constant_inla(mw, cores = 2)
#> Error in nrow(sf): object 'mw' not found
mean <- plogis(fit$summary.fixed$mean)
#> Error in plogis(fit$summary.fixed$mean): object 'fit' not found