Learn R Programming

tramME (version 1.0.7)

smooth_terms.tramME: Extract and evaluate the smooth terms of a tramME model

Description

Extract and evaluate the smooth terms of a tramME model

Usage

# S3 method for tramME
smooth_terms(object, k = 100, newdata = NULL, ...)

Value

A list of results from evaluating the smooth terms of the model.

Arguments

object

A tramME object.

k

Integer, the number of points to be used to evaluate the smooth terms. Ignored when newdata is supplied.

newdata

A data.frame with new values for the smooth terms. If NULL, the new data is set up based on the model.frame and k. Smooths for which the supplied information in this input is incomplete will be ignored.

...

Optional arguments. as.lm is passed through this when it is necessary.

Examples

Run this code
data("mcycle", package = "MASS")
fit <- LmME(accel ~ s(times), data = mcycle)
plot(smooth_terms(fit))

Run the code above in your browser using DataLab