piecewise_poly_basis_fun: Truncated Piecewise polynomial basis

Description Usage Arguments Value References Examples

Description

Truncated Piecewise polynomial basis

Usage

1
piecewise_poly_basis_fun(x, int_knots, p)

Arguments

x

A vector of a predictor variable.

int_knots

A vector containing the interior knots.

p

A value specifying the degree of the polynomial.

Value

A matrix consisting of (x_i - k_j)^p if x_i > k_j or 0 otherwise for i = 1,...,n and j = 1,... k. Where n equals the length of x and k equals the length of int_knots.

References

\insertRef

wand2003unequalgroupoutlier

Examples

1
2
out <- piecwise_poly_basis_fun(x = c(1:9), k = c(2:4), p = 3)
plot(out[,1], type = "l") # see what your basis looks like

cshannum/unequalgroupoutlier documentation built on May 13, 2019, 11:10 a.m.