Skip to contents

Class that defines a "tracker" for random effects models, most notably storing the data indices available in each group for quicker posterior computation and sampling of random effects terms. The class stores a mapping from every observation to its group index, a mapping from group indices to the training sample observations available in that group, and predictions for each observation.

This class is intended for advanced use cases in which users require detailed control of sampling algorithms and data structures. Minimal input validation and error checks are performed – users are responsible for providing the correct inputs. For tutorials on the "proper" usage of the stochtree's advanced workflow, we provide several vignettes at stochtree.ai

Public fields

rfx_tracker_ptr

External pointer to a C++ StochTree::RandomEffectsTracker class

Methods


Method new()

Create a new RandomEffectsTracker object.

Usage

RandomEffectsTracker$new(rfx_group_indices)

Arguments

rfx_group_indices

Integer indices indicating groups used to define random effects

Returns

A new RandomEffectsTracker object.