dot-detect_L2_only: Detect whether the predictors are L2-only

Description Usage Arguments Value Author(s)

Description

Detects whether the predictors are level-2 only. E.g., whether location and scale are covariates are the same across all n_k observations of each K. This is important for efficiency reasons. If the covariates are invariant across repeated observations of the given group k, for all K, then we can compute predicted values once, and broadcast the prediction, rather than compute the prediction for every single row. Specifically, it detects if all x == x[1], where x is a group's data, for each column in mf.

Usage

1

Arguments

mf

Data frame for predictors. Should contain no missings.

group

Grouping variable for the model frame.

Value

Logical. TRUE if the covariates appear to be level-2 only.

Author(s)

Stephen R. Martin


LMMELSM documentation built on March 13, 2021, 5:06 p.m.