get_num_lvs: Gets the number of latent variables from a boral model object

Description Usage Arguments Details Value

View source: R/helper_functions.R

Description

Starting with version 1.7 of the boral package, the number of latent variables is specified via the lv.control list argument to the boral function. Prior to this it was specified using the num.lv argument. This function detects which has been used.

Usage

1
get_num_lvs(model)

Arguments

model

A fitted boral object.

Details

This function is not strictly necessary, at least not with boral version 1.7. Although the boral function ignores the num.lv argument when called, it sets the num.lv element in the returned model object to have the same value as lv.control$num.lv. But it seemed like a good idea to have this helper function in case that ever changes in the future.

Value

Number of latent variables.


mbedward/ggboral documentation built on June 27, 2020, 10:15 a.m.