Skip to contents

Read variance-covariance matrix for sightability models

Usage

sight_read_vcov(model = NULL, pages = list(omit = 1), includes = NULL, ...)

sight_read_vcov_id(
  model_id = NULL,
  pages = list(omit = 1),
  includes = NULL,
  dry_run = FALSE,
  ...
)

Arguments

model

the name of the model to filter by

pages

a list of pagination options, see details

includes

a character vector of related resources to include, see details

...

Additional arguments passed to the underlying spdgt.auth function (e.g., verbosity, timeout).

model_id

unique identifier of the model

dry_run

If TRUE, print the HTTP request without sending it and return the request object invisibly. Useful for debugging.

Value

A tibble in long format representing the variance-covariance matrix:

id

Integer. Unique identifier for the matrix entry.

beta_id1

Integer. Row index (beta coefficient ID).

beta_id2

Integer. Column index (beta coefficient ID).

vcov

Numeric. The variance (diagonal) or covariance (off-diagonal) value.

created_at, updated_at

Character. Timestamps (may be NA).

The matrix is symmetric, so only unique pairs are returned (upper triangle).

Details

The pages argument is a named list with the following options:

  • omit: page number to omit, default is 1 which returns all records

  • size: number of records to return

  • number: the page number to return given the size

The includes argument is a character vector of related resources to include. Valid values are:

  • betaOne: include beta one details

  • betaTwo: include beta two details

The betaOne and betaTwo arguments are simply the indices of the matrix.

See also

lkup_model_id() for converting model names to IDs

Examples

if (FALSE) { # \dontrun{
# Read variance-covariance matrix for the mule deer sightability model
sight_read_vcov(model = "Mule Deer")
} # }