Take a k-order polynomial approximation of a bivariate \(\phi(xi,xj)\). The expansion excludes terms that are solely in the first variable term because coefficients on them are not identified.

polyexp(xi, xj, k)

Arguments

xi

first variable term

xj

second variable term

k

order of polynomial approximation

Value

vector of length \(k(k+1)/2\)

Examples

polyexp(1.2,3.1,3)
#> [1] 3.100 9.610 29.791 3.720 11.532 4.464
polyexp(1,0,1) # an order one expansion useful for dummy variables
#> [1] 0