Skip to contents

The parameters glgpm() estimates or holds for a model, with the names that start_pars and coef.RiskMap() use (riskmap_parameters). Only the formula, the data and the family are read, so this is quick.

Usage

glgpm_parameters(
  formula,
  data,
  family,
  fixed_pars = NULL,
  distance_units = c("km", "m")
)

# S3 method for class 'riskmap_parameters'
print(x, ...)

Arguments

formula, data, family, fixed_pars

As in glgpm().

distance_units

The units of distance, "km" (the default) or "m", for the label of the scale.

x

The result of glgpm_parameters().

...

Not used, and an error if given, so that a misspelt argument is not ignored.

Value

A data frame of class riskmap_parameters, with a row per element of each parameter and the columns name, element (the column of the design matrix of a coefficient, the term of a random-effect variance), flat (the name in unlist(coef(fit))), label (as in summary.RiskMap()), start (the rule of its automatic start, see riskmap_parameters) and held (the value at which the model holds the parameter, NA when it is estimated). Its print() method shows the template of a start_pars list and returns x invisibly.

Examples

data(liberia)
liberia <- sf::st_as_sf(liberia, coords = c("long", "lat"), crs = 4326)
glgpm_parameters(npos ~ log(elevation) + gp(nugget = TRUE), data = liberia,
                 family = "binomial")
#>    name        element                flat                    label
#>    beta    (Intercept)    beta.(Intercept)              (Intercept)
#>    beta log(elevation) beta.log(elevation)           log(elevation)
#>  sigma2                             sigma2     Spatial process var.
#>     phi                                phi Spatial corr. scale (km)
#>    tau2                               tau2   Variance of the nugget
#>              start held
#>         regression     
#>         regression     
#>                one     
#>  distance_quantile     
#>                one     
#> 
#> A template for `start_pars`:
#> list(beta = c("(Intercept)" = , "log(elevation)" = ), sigma2 = , phi = , tau2 = )