eval_poly {nn2poly} | R Documentation |
Polynomial evaluation
Description
Evaluates one or several polynomials on the given data.
Usage
eval_poly(poly, newdata)
Arguments
poly |
List containing 2 items:
Example: If |
newdata |
Input data as matrix, vector or dataframe. Number of columns (or elements in vector) should be the number of variables in the polynomial (dimension p). Response variable to be predicted should not be included. |
Details
Note that this function is unstable and subject to change. Therefore it is
not exported but this documentations is left available so users can use it if
needed to simulate data by using nn2poly:::eval_poly()
Value
Returns a matrix containing the evaluation of the polynomials. Each column corresponds to each polynomial used and each row to each observation, meaning that each column vector corresponds to the results of evaluating all the given data for each polynomial.
See Also
eval_poly()
is also used in predict.nn2poly()
.