Learn R Programming

dsp (version 1.2.0)

build_XtX: Compute X'X

Description

Build the Tp x Tp matrix XtX using the Matrix() package

Usage

build_XtX(X)

Value

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

Arguments

X

T x p matrix of predictors