resid_maker: Creates orthogonal residuals

View source: R/other.R

resid_makerR Documentation

Creates orthogonal residuals

Description

This function is an auxiliary function for simulation purposes. It creates a vector of n standard normal random variables, residualizes this vector against a matrix of covariates C, then standardizes the vector again.

Usage

resid_maker(n, C)

Arguments

n

sample size.

C

a numeric matrix with n rows and p columns.

Value

The function returns a numeric vector orthogonal to C.


chadhazlett/sensemakr documentation built on Dec. 12, 2023, 11:20 a.m.