Learn R Programming

relgam (version 1.0)

print.rgam: Print a rgam object

Description

Print a summary of the rgam path at each step along the path.

Usage

# S3 method for rgam
print(x, digits = max(3, getOption("digits") - 3), ...)

Arguments

x

Fitted rgam object.

digits

Significant digits in printout.

...

Additional print arguments.

Value

The matrix above is silently returned.

Details

The call that produced the object x is printed, followed by a five-column matrix with columns NonZero, Lin, NonLin, columns say how many nonzero, linear and nonlinear terms there are. the percent deviance explained (relative to the null deviance).

See Also

rgam.

Examples

Run this code
# NOT RUN {
set.seed(1)
n <- 100; p <- 12
x <- matrix(rnorm(n * p), n, p)
beta <- matrix(c(rep(2, 3), rep(0, 9)), ncol = 1)
y <- x %*% beta + x[, 4]^2 + rnorm(n)
fit <- rgam(x, y)
print(fit)

# }

Run the code above in your browser using DataLab