regressors: Regress vectors

regressorsR Documentation

Regress vectors

Description

Regress vectors

Correlate x and y

Polynomial regression of degree 1

Polynomial regression of degree 2

Polynomial regression of degree 3

Polynomial regression of degree 4

'

Usage

x %/r% y

x %/1% y

x %/2% y

x %/3% y

x %/4% y

x %/n% yn

Arguments

x

Numeric vectors

y

Numeric vector

yn

List of length 2, first element is a vector y, the second element an integer denoting the order of the polynomial regression.

Examples


x <- rnorm(100)
y <- x + x^2 + x^3

# Correlate x with y
x%/r%y

# Polynomial regression degree 1 .. 4
x%/1%y
x%/2%y
x%/3%y
x%/4%y

anova(x%/1%y,x%/2%y,x%/3%y,x%/4%y)

# Order n

x%/n%list(y,10)


invctr documentation built on Aug. 16, 2022, 5:18 p.m.