Skip to contents

Compute OLS with arbitrary vector of weights (possibly negative)

Usage

OLSw(y, X, w)

Arguments

y

Response vector

X

A numeric data matrix

w

vector of weights (same length as y)

Value

Regression vector beta of length ncol(X).