Learn R Programming

remstats (version 4.1.0)

.maybe_prepend_baseline: Prepend a baseline column of 1s to a 3-D stats array

Description

Checks whether the formula includes an intercept (no -1). If so, prepends a baseline{suffix} slice of 1s along dim 3.

Usage

.maybe_prepend_baseline(arr, formula, suffix)

Value

Updated array with P+1 slices, or the original if no intercept.

Arguments

arr

3-D array \[M × D × P\] or NULL.

formula

Formula that produced the array.

suffix

".start" or ".end".