Learn R Programming

fMRItools (version 0.5.3)

hat_matrix: Hat matrix

Description

Get the hat matrix from a design matrix.

Usage

hat_matrix(design)

Value

The \(T\) by \(T\) hat matrix

Arguments

design

The \(T\) by \(Q\) design matrix

Details

Uses the QR decomposition.

Examples

Run this code
hat_matrix(cbind(seq(100), 1))

Run the code above in your browser using DataLab