Establishes if relationship between two vectors is linear or nonlinear. Does not return any value. Prints details of the relationship between x and y.
poly_eval(y, x, threshold)
y
: vector of response valuesx
: vector of predictor valuesthreshold
: optional argument. Threshold percentage value for average deviation from linearity. Defaults to 5.foo <- c(1000, 4000, 5000, 4500, 3000, 4000, 9000, 11000, 15000, 12000, 7000, 3000) bar <- c(9914, 40487, 54324, 50044, 34719, 42551, 94871, 118914, 158484, 131348, 78504, 36284) poly_eval(bar, foo)
Useful links