predict.hierbasis: Model Predictions for the Univariate hierbasis model

Description Usage Arguments Details Value Author(s) References See Also

Description

The generic S3 method for predictions for objects of class hierbasis.

Usage

1
2
3
## S3 method for class 'hierbasis'
predict(object, new.x = NULL, lam.idx = NULL,
  interpolate = FALSE, ...)

Arguments

object

A fitted object of class 'hierbasis'.

new.x

An optional vector of x values we wish to fit the fitted functions at. This should be within the range of the training data.

interpolate

A logical indicator of if we wish to use linear interpolation for estimation of fitted values. This becomes useful for high dof when the estimation of betas on the original scale becomes unstable.

...

Not used. Other arguments for predict function.

Details

This function returns a matrix of predicted values at the specified values of x given by new.x. Each column corresponds to a lambda value used for fitting the original model.

If new.x == NULL then this function simply returns the fitted values of the estimated function at the original x values used for model fitting. The predicted values are presented for each lambda values.

The function also has an option of making predictions via linear interpolation. If TRUE, a predicted value is equal to the fitted values if new.x is an x value used for model fitting. For a value between two x values used for model fitting, this simply returns the value of a linear interpolation of the two fitted values.

Value

fitted.values

A matrix with length(new.x) rows and nlam columns

Author(s)

Annik Gougeon, David Fleischer (david.fleischer@mail.mcgill.ca).

References

Haris, A., Shojaie, A. and Simon, N. (2016). Nonparametric Regression with Adaptive Smoothness via a Convex Hierarchical Penalty. Available on request by authors.

See Also

The original HierBasis function, as implemented by Haris et al. (2016) can be found via https://github.com/asadharis/HierBasis/.


dfleis/hierbasis2 documentation built on May 17, 2019, 7:03 p.m.