reg: linear regression

Description Usage Arguments Value Examples

View source: R/RegKink.R

Description

This is a function computing OLS estimates of linear model.

Usage

1
reg(X,y)

Arguments

y

A vector of response.

X

data matrix

Value

bols

The ols estimates of a linear regression model.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
pt1 <- proc.time()
##Simulated data
set.seed(12345)
n=200
e = rnorm(n)
X = cbind(1,rnorm(n))
b0 =c(1,2)
y = X
obj <- reg(X,y)

proc.time() - pt1

RegKink documentation built on April 15, 2021, 9:10 a.m.

Related to reg in RegKink...