view.model.addHierBasis: View Fitted Additive Model

Description Usage Arguments Author(s) References See Also Examples

View source: R/hier_basis_additive.R

Description

This function prints a list of size p where p is the number of covariates. Each element in the list is a vector of strings showing the polynomial representation of each individual component function.

Usage

1
view.model.addHierBasis(object, lam.index = 1, digits = 3)

Arguments

object

An object of class addHierBasis.

lam.index

The index of the lambda value to view.

digits

The significant figures printed.

Author(s)

Asad Haris (aharis@uw.edu), Ali Shojaie and Noah Simon

References

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

See Also

AdditiveHierBasis, print.addHierBasis

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
require(Matrix)

set.seed(1)

# Generate the points x.
n <- 100
p <- 30

x <- matrix(rnorm(n*p), ncol = p)

# A simple model with 3 non-zero functions.
y <- rnorm(n, sd = 0.1) + sin(x[, 1]) + x[, 2] + (x[, 3])^3

mod <- AdditiveHierBasis(x, y, nbasis = 50, max.lambda = 30)
view.model.addHierBasis(mod, 30)

asadharis/HierBasis documentation built on Aug. 3, 2021, 4:16 p.m.