build_XtX: Compute X'X

build_XtXR Documentation

Compute X'X

Description

Build the Tp x Tp matrix XtX using the Matrix package

Usage

build_XtX(X)

Arguments

X

T x p matrix of predictors

Value

Block diagonal Tp x Tp Matrix (object) where each p x p block is tcrossprod(matrix(X[t,]))

Note

X'X is a one-time computing cost. Special cases may have more efficient computing options, but the Matrix representation is important for efficient computations within the sampler.


drkowal/dsp documentation built on July 19, 2023, 11:42 a.m.