betaTildeInt: Bias Correct OLS model with interaction term

Description Usage Arguments Value

View source: R/utility_functions.R

Description

This function takes OLS coefficients from a moel including an interaction term as inputs and bias corrects according to the noise matrix, S.

Usage

1
betaTildeInt(coef, S, X, N, int1, int2)

Arguments

coef

Vector of OLS coefficients

S

Matrix of error terms. Dimensions must be length(coef) x length(coef)

X

Design matrix that produced OLS coefficients

N

Number of rows in X

int1

Column index of first interaction variable in X

int2

Column index of second interaction variable in X

Value

Returns a list:

bias_correct

Vector of bias corrected coefficients

x_prime_x

X'X matrix to be used in variance estimationo


georgieevans/PrivacyUnbiased documentation built on May 22, 2021, 1:01 p.m.