linreg: Linear Regression.

Description Usage Arguments Value Author(s)

View source: R/linreg.R

Description

Estimates parameters \boldsymbol{\hat{β}} of a linear regression model given by \mathbf{y}_{n \times 1} = \mathbf{X}_{n \times k} \mathbf{b}_{k \times i} + \mathbf{e}_{n \times 1}.

Usage

1

Arguments

X

The data matrix, that is an n \times k matrix of n observations of k regressors, which includes a regressor whose value is 1 for each observation.

y

n \times 1 vector of observations on the regressand variable.

optimize

Logical. If TRUE, uses optimization to estimate parameters. If FALSE, uses the closed form of the Ordinary Least Squares (OLS) estimator.

...

Arguments to be passed to the optimization function specified. This is only used when optim is TRUE

Value

If optimize is TRUE, returns the results of the optimization process. If optimize is FALSE, returns a k \times 1 matrix of k unknown regression parameters estimated using ordinary least squares.

Author(s)

Ivan Jacob Agaloos Pesigan


jeksterslabds/jeksterslabRds documentation built on July 16, 2020, 3:41 p.m.