get_term: Extract the partial effect of a single smooth curve

View source: R/get-terms.R

get_termR Documentation

Extract the partial effect of a single smooth curve

Description

Extract the partial effect of a single smooth curve

Usage

get_term(data, fit, spec, n = 100, conf_level = 0.95, ...)

Arguments

data

A data frame containing variables used to fit the model. The first row is used as the basis for all covariates other than the one being varied (their values are irrelevant for the term-wise contribution).

fit

A fitted object of class gam.

spec

A single-row tibble (one row of get_smooth_terms) describing the curve to extract.

n

Number of points at which to evaluate the smooth over the range of its covariate.

conf_level

The confidence level for the pointwise confidence interval.

...

Further arguments (currently unused).


pammtools documentation built on Aug. 27, 2026, 1:08 a.m.