| basis_poly {drape} | R Documentation | 
Estimate the score function of the d'th covariate using a polynomial basis.
Description
Computes the score function estimate when rho(X) is assumed to lie within the span of the polynomial basis of X.
Usage
basis_poly(X, d, degree = 2, lambda = NULL)
Arguments
| X | matrix of covariates. | 
| d | integer index of covariate of interest. | 
| degree | maximum degree of polynomial terms. | 
| lambda | optional scalar penalty, if "NULL" chosen via cross-validation. | 
Value
list containing the estimated score function "rho", which takes matrix input and yields a vector of score estimates.
Examples
set.seed(0)
X <- matrix(stats::rnorm(200), ncol=4)
bs <- basis_poly(X=X, d=1, degree=2)
bs$rho(X)
[Package drape version 0.0.1 Index]