Skip to content

FRK

Fixed Rank Kriging

v2.3.2 · Jan 16, 2026 · GPL (>= 2)

Description

A tool for spatial/spatio-temporal modelling and prediction with large datasets. The approach models the field, and hence the covariance function, using a set of basis functions. This fixed-rank basis-function representation facilitates the modelling of big data, and the method naturally allows for non-stationary, anisotropic covariance functions. Discretisation of the spatial domain into so-called basic areal units (BAUs) facilitates the use of observations with varying support (i.e., both point-referenced and areal supports, potentially simultaneously), and prediction over arbitrary user-specified regions. `FRK` also supports inference over various manifolds, including the 2D plane and 3D sphere, and it provides helper functions to model, fit, predict, and plot with relative ease. Version 2.0.0 and above also supports the modelling of non-Gaussian data (e.g., Poisson, binomial, negative-binomial, gamma, and inverse-Gaussian) by employing a generalised linear mixed model (GLMM) framework. Zammit-Mangion and Cressie <doi:10.18637/jss.v098.i04> describe `FRK` in a Gaussian setting, and detail its use of basis functions and BAUs, while Sainsbury-Dale, Zammit-Mangion, and Cressie <doi:10.18637/jss.v108.i10> describe `FRK` in a non-Gaussian setting; two vignettes are available that summarise these papers and provide additional examples.

Downloads

678

Last 30 days

5256th

678

Last 90 days

678

Last year

CRAN Check Status

2 ERROR
3 NOTE
9 OK
Show all 14 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang ERROR
r-devel-linux-x86_64-fedora-gcc ERROR
r-devel-macos-arm64 OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 NOTE
r-oldrel-macos-x86_64 NOTE
r-oldrel-windows-x86_64 NOTE
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK
Check details (19 non-OK)
OK r-devel-linux-x86_64-debian-clang

*


            
OK r-devel-linux-x86_64-debian-gcc

*


            
ERROR r-devel-linux-x86_64-fedora-clang

re-building of vignette outputs

Error(s) in re-building vignettes:
--- re-building ‘FRK_intro.Rnw’ using knitr
OMP: Warning #96: Cannot form a team with 24 threads, using 2 instead.
OMP: Hint Consider unsetting KMP_DEVICE_THREAD_LIMIT (KMP_ALL_THREADS), KMP_TEAMS_THREAD_LIMIT, and OMP_THREAD_LIMIT (if any are set).
--- re-building ‘FRK_non-Gaussian.Rnw’ using knitr
--- finished re-building ‘FRK_non-Gaussian.Rnw’

SUMMARY: processing the following file failed:
  ‘FRK_intro.Rnw’

Error: Vignette re-building failed.
Execution halted
ERROR r-devel-linux-x86_64-fedora-clang

tests

  Running ‘testthat.R’ [90m/64m]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > ops <- options("crayon.enabled" = FALSE)
  > library(testthat)
  > require("covr")
  Loading required package: covr
  > 
  > test_check("FRK")
  Loading required package: FRK
  
  Attaching package: 'FRK'
  
  The following object is masked from 'package:stats':
  
      simulate
  
  NOTE: In FRK >2.0 simple_kriging_fixed = FALSE by default, and hence
        universal kriging is done by default. However this is only the case when
        method = 'TMB'. When method = 'EM', simple kriging is done, irrespective of
        what the argument simple_kriging_fixed is set to.
  
    |                                                                            
    |                                                                      |   0%OMP: Warning #96: Cannot form a team with 24 threads, using 2 instead.
  OMP: Hint Consider unsetting KMP_DEVICE_THREAD_LIMIT (KMP_ALL_THREADS), KMP_TEAMS_THREAD_LIMIT, and OMP_THREAD_LIMIT (if any are set).
  
    |                                                                            
    |=======================                                               |  33%
    |                                                                            
    |===============================================                       |  67%
    |                                                                            
    |======================================================================| 100%
  Maximum EM iterations reached
  Intercept 
   0.152395 
  Formula: z ~ 1 
  Assumed response distribution: gaussian 
  Specified link function: identity 
  Method of model fitting: EM 
  Number of datasets: 1 
  Number of basis functions: 18 
  Class of basis functions: Basis 
  Number of BAUs [extract using object@BAUs]:  138 
  Number of observations [extract using object@Z]:  50 
  Mean obs. variance at BAU level [extract using object@Ve]: 0.01 
  Fine-scale variance proportionality constant [extract using object@sigma2fshat]: 0.1172823 
  Dimensions of C in Z = C*Y + e [extract using object@Cmat]:  c(50L, 138L) 
  Dimensions of S in Y = X*alpha + S*eta + delta [extract using object@S]:  c(50L, 18L) 
  Number of covariates: 1 
  
  Formula: z ~ 1 
  Assumed response distribution: gaussian 
  Specified link function: identity 
  Method of model fitting: EM 
  Number of datasets: 1 
  Number of basis functions: 18 
  Class of basis functions: Basis 
  Number of BAUs [extract using object@BAUs]:  138 
  Number of observations [extract using object@Z]:  50 
  Mean obs. variance at BAU level [extract using object@Ve]: 0.01 
  Fine-scale variance proportionality constant [extract using object@sigma2fshat]: 0.1172823 
  Dimensions of C in Z = C*Y + e [extract using object@Cmat]:  c(50L, 138L) 
  Dimensions of S in Y = X*alpha + S*eta + delta [extract using object@S]:  c(50L, 18L) 
  Number of covariates: 1 
  
  NOTE: In FRK >2.0 simple_kriging_fixed = FALSE by default, and hence
        universal kriging is done by default. However this is only the case when
        method = 'TMB'. When method = 'EM', simple kriging is done, irrespective of
        what the argument simple_kriging_fixed is set to.
  
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |=======================                                               |  33%
    |                                                                            
    |===============================================                       |  67%
    |                                                                            
    |======================================================================| 100%
  Maximum EM iterations reached
  Averaging over polygons...
  NOTE: In FRK >2.0 simple_kriging_fixed = FALSE by default, and hence
        universal kriging is done by default. However this is only the case when
        method = 'TMB'. When method = 'EM', simple kriging is done, irrespective of
        what the argument simple_kriging_fixed is set to.
  
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |=======================                                               |  33%
    |                                                                            
    |===============================================                       |  67%
    |                                                                            
    |======================================================================| 100%
  Maximum EM iterations reached
  Averaging over polygons...
  NOTE: In FRK >2.0 simple_kriging_fixed = FALSE by default, and hence
        universal kriging is done by default. However this is only the case when
        method = 'TMB'. When method = 'EM', simple kriging is done, irrespective of
        what the argument simple_kriging_fixed is set to.
  
    |                                                                            
    |                                                                      |   0%
ERROR r-devel-linux-x86_64-fedora-gcc

re-building of vignette outputs

Error(s) in re-building vignettes:
--- re-building ‘FRK_intro.Rnw’ using knitr
--- re-building ‘FRK_non-Gaussian.Rnw’ using knitr
--- finished re-building ‘FRK_non-Gaussian.Rnw’

SUMMARY: processing the following file failed:
  ‘FRK_intro.Rnw’

Error: Vignette re-building failed.
Execution halted
ERROR r-devel-linux-x86_64-fedora-gcc

tests

  Running ‘testthat.R’ [90m/59m]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > ops <- options("crayon.enabled" = FALSE)
  > library(testthat)
  > require("covr")
  Loading required package: covr
  > 
  > test_check("FRK")
  Loading required package: FRK
  
  Attaching package: 'FRK'
  
  The following object is masked from 'package:stats':
  
      simulate
  
  NOTE: In FRK >2.0 simple_kriging_fixed = FALSE by default, and hence
        universal kriging is done by default. However this is only the case when
        method = 'TMB'. When method = 'EM', simple kriging is done, irrespective of
        what the argument simple_kriging_fixed is set to.
  
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |=======================                                               |  33%
    |                                                                            
    |===============================================                       |  67%
    |                                                                            
    |======================================================================| 100%
  Maximum EM iterations reached
  Intercept 
   0.152395 
  Formula: z ~ 1 
  Assumed response distribution: gaussian 
  Specified link function: identity 
  Method of model fitting: EM 
  Number of datasets: 1 
  Number of basis functions: 18 
  Class of basis functions: Basis 
  Number of BAUs [extract using object@BAUs]:  138 
  Number of observations [extract using object@Z]:  50 
  Mean obs. variance at BAU level [extract using object@Ve]: 0.01 
  Fine-scale variance proportionality constant [extract using object@sigma2fshat]: 0.1172823 
  Dimensions of C in Z = C*Y + e [extract using object@Cmat]:  c(50L, 138L) 
  Dimensions of S in Y = X*alpha + S*eta + delta [extract using object@S]:  c(50L, 18L) 
  Number of covariates: 1 
  
  Formula: z ~ 1 
  Assumed response distribution: gaussian 
  Specified link function: identity 
  Method of model fitting: EM 
  Number of datasets: 1 
  Number of basis functions: 18 
  Class of basis functions: Basis 
  Number of BAUs [extract using object@BAUs]:  138 
  Number of observations [extract using object@Z]:  50 
  Mean obs. variance at BAU level [extract using object@Ve]: 0.01 
  Fine-scale variance proportionality constant [extract using object@sigma2fshat]: 0.1172823 
  Dimensions of C in Z = C*Y + e [extract using object@Cmat]:  c(50L, 138L) 
  Dimensions of S in Y = X*alpha + S*eta + delta [extract using object@S]:  c(50L, 18L) 
  Number of covariates: 1 
  
  NOTE: In FRK >2.0 simple_kriging_fixed = FALSE by default, and hence
        universal kriging is done by default. However this is only the case when
        method = 'TMB'. When method = 'EM', simple kriging is done, irrespective of
        what the argument simple_kriging_fixed is set to.
  
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |=======================                                               |  33%
    |                                                                            
    |===============================================                       |  67%
    |                                                                            
    |======================================================================| 100%
  Maximum EM iterations reached
  Averaging over polygons...
  NOTE: In FRK >2.0 simple_kriging_fixed = FALSE by default, and hence
        universal kriging is done by default. However this is only the case when
        method = 'TMB'. When method = 'EM', simple kriging is done, irrespective of
        what the argument simple_kriging_fixed is set to.
  
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |=======================                                               |  33%
    |                                                                            
    |===============================================                       |  67%
    |                                                                            
    |======================================================================| 100%
  Maximum EM iterations reached
  Averaging over polygons...
  NOTE: In FRK >2.0 simple_kriging_fixed = FALSE by default, and hence
        universal kriging is done by default. However this is only the case when
        method = 'TMB'. When method = 'EM', simple kriging is done, irrespective of
        what the argument simple_kriging_fixed is set to.
  
    |                                                                            
    |                                                                      |   0%
OK r-devel-macos-arm64

*


            
OK r-devel-windows-x86_64

*


            
NOTE r-oldrel-macos-arm64

installed package size

  installed size is 104.7Mb
  sub-directories of 1Mb or more:
    data   4.8Mb
    doc    1.9Mb
    libs  96.9Mb
NOTE r-oldrel-macos-arm64

package dependencies

Package suggested but not available for checking: ‘dggrids’
NOTE r-oldrel-macos-x86_64

installed package size

  installed size is 106.7Mb
  sub-directories of 1Mb or more:
    data   5.5Mb
    doc    1.9Mb
    libs  98.2Mb
NOTE r-oldrel-macos-x86_64

package dependencies

Package suggested but not available for checking: ‘dggrids’
NOTE r-oldrel-windows-x86_64

installed package size

  installed size is 20.6Mb
  sub-directories of 1Mb or more:
    data   4.8Mb
    doc    1.9Mb
    libs  12.8Mb
NOTE r-oldrel-windows-x86_64

package dependencies

Package suggested but not available for checking: 'dggrids'
OK r-patched-linux-x86_64

*


            
OK r-release-linux-x86_64

*


            
OK r-release-macos-arm64

*


            
OK r-release-macos-x86_64

*


            
OK r-release-windows-x86_64

*


            

Check History

ERROR 9 OK · 3 NOTE · 0 WARNING · 2 ERROR · 0 FAILURE Mar 9, 2026
ERROR r-devel-linux-x86_64-fedora-clang

tests

  Running ‘testthat.R’ [90m/64m]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > ops <- options("crayon.enabled" = FALSE)
  > library(testthat)
  > require("covr")
  Loading required package: covr
  > 
  > test_check("FRK")
  Loading required package: FRK
  
  Attaching package: 'FRK'
  
  The following object is masked from 'package:stats':
  
      simulate
  
  NOTE: In FRK >2.0 simple_kriging_fixed = FALSE by default, and hence
        universal kriging is done by defaul
ERROR r-devel-linux-x86_64-fedora-gcc

tests

  Running ‘testthat.R’ [90m/59m]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > ops <- options("crayon.enabled" = FALSE)
  > library(testthat)
  > require("covr")
  Loading required package: covr
  > 
  > test_check("FRK")
  Loading required package: FRK
  
  Attaching package: 'FRK'
  
  The following object is masked from 'package:stats':
  
      simulate
  
  NOTE: In FRK >2.0 simple_kriging_fixed = FALSE by default, and hence
        universal kriging is done by defaul
NOTE r-oldrel-macos-arm64

package dependencies

Package suggested but not available for checking: ‘dggrids’
NOTE r-oldrel-macos-x86_64

package dependencies

Package suggested but not available for checking: ‘dggrids’
NOTE r-oldrel-windows-x86_64

package dependencies

Package suggested but not available for checking: 'dggrids'

Reverse Dependencies (1)

imports

IDE

Dependency Network

Dependencies Reverse dependencies digest dplyr fmesher ggplot2 Hmisc Matrix plyr Rcpp sp spacetime sparseinv statmod TMB ggpubr reshape2 +1 more dependencies IDE FRK

Version History

new 2.3.2 Mar 9, 2026