Skip to contents

Stores the observation dimension d separately from the index dimension N. Index coordinates are never appended to the observations used for density estimation. The representation does not establish stationarity or mixing.

Usage

glbfp_field(
  values,
  indices = NULL,
  value_dim = NULL,
  na.action = c("fail", "omit"),
  units = NULL,
  index_units = NULL,
  dependence = c("unspecified", "dependent", "iid")
)

Arguments

values

Numeric vector, matrix or data frame with explicit indices, or a numeric array without indices.

indices

Numeric matrix or data frame (n x N) of distinct integer sites. Negative indices are allowed. With NULL, array axes define sites.

value_dim

Optional axis of an array containing the observation components. All other axes are index dimensions. With NULL, array entries are scalar observations, including entries of a matrix.

na.action

"fail" rejects missing observations; "omit" removes entire sites with at least one missing component and records their indices. Non-finite or missing indices and infinite observations are always rejected.

units

Optional character vector of length d giving observation units.

index_units

Optional character vector of length N describing index units. Physical coordinates on a noninteger lattice require a separate map.

dependence

One of "unspecified", "dependent", or "iid". "iid" is an explicit assumption by the caller, not a diagnostic.

Value

A glbfp_field list with values, indices, d, N, bounding-box shape, complete, and omitted sites. Incomplete fields are accepted for descriptive marginal density estimation; no values are imputed.

Examples

set.seed(11)
field <- glbfp_field(array(rnorm(60), c(5, 4, 3)))
field
#> Indexed field: 60 observed sites; N = 3 ; d = 1 
#> Complete integer bounding box: TRUE 
#> Omitted sites: 0 ; dependence: unspecified 
GLBFP(0, field, b = 1, m = 2, min_vals = -5, max_vals = 5)
#> GLBFP Density Estimation:
#> Point: (0) 
#> Estimated density: 0.404167 
#> Bandwidths (b): 1 
#> Shifts (m): 2 
#> Relative grid coordinate (u): 0.5 
sites <- as.matrix(expand.grid(i = 1:4, j = 1:5))
glbfp_field(cbind(a = rnorm(20), b = rnorm(20)), indices = sites)
#> Indexed field: 20 observed sites; N = 2 ; d = 2 
#> Complete integer bounding box: TRUE 
#> Omitted sites: 0 ; dependence: unspecified