Skip to contents

Reads one structure's entry in the registry that frmtmb_register_covstruct() fills, so that another package, such as frmtmb.sample, asks the registry instead of keeping its own list of structure names. Works for frmtmb's own structures and for a registered one alike.

Usage

frmtmb_covstruct_info(name)

Arguments

name

The structure's name, as a block records it (fit$frame$re_blocks[[i]]$covstruct): "us", "ar1", "car".

Value

A list:

name

The name.

package

The package that registered it, or NULL for one of frmtmb's own.

builtin

TRUE for one of frmtmb's own structures.

field

TRUE when the structure reports its own rows (its natural slot), so its parameters have no brms sd_<group>__<coef> or cor_ names and brms counts no grouping factor for it: smooths, gp(), car().

term

TRUE when it is written as a predictor special rather than a bar structure.

levels_coupled

TRUE when a fixed matrix correlates the levels.

full_rank

TRUE or FALSE as the structure states it, or NA when it states nothing, and the weights check is then open for it (see full_rank in frmtmb_register_covstruct()).

A name nothing registered is refused. A name that core lists as an extension's ("car", "spde") loads that extension, which registers it, as a fit that uses the structure would. A residual correlation term ("fcor", frmtmb.spatial's "sar") is no covariance structure: it is refused with a pointer to frmtmb_autocor_pars().

Examples

frmtmb_covstruct_info("ar1")$field
#> [1] FALSE
frmtmb_covstruct_info("smooth")$field
#> [1] TRUE