Learn R Programming

smnet (version 2.1.2)

m: Specify Smooth Terms in Formulae

Description

Function used to set up univariate or bivariate smooth terms based on P-splines, for use within a call to smnet.

Usage

m(..., k = -1, cyclic = F)

Arguments

...

one or more variables for creating P-spline smooths.

k

integer defining the number of uniformly spaced B-spline basis functions for the smooth, default is 10. For 2d (and higher) smooths, this is the marginal basis size.

cyclic

logical vector indicating whether the smooth should be cyclic. Based on the harmonic smoother of Eiler and Marx (2004)

Value

List object with components

  • term: character vector of the names of the variables involved in the smooth to be set up

  • bs.dim: number of B-spline basis functions to be used in the smooth

References

Modified version of s originally from package mgcv, Simon Wood (2014).

See Also

smnet, plot.smnet, predict.smnet