bs_diff: B spline basis with option of centering and differencing...

View source: R/observation_models.R

bs_diffR Documentation

B spline basis with option of centering and differencing coefficients

Description

parameters follow bs

Usage

bs_diff(
  x,
  df = NULL,
  knots = NULL,
  degree = 3,
  intercept = TRUE,
  Boundary.knots = range(x),
  differences = 1,
  periodic = FALSE,
  center = TRUE
)

Details

uses code from bs, but optionally transforms the basis into a difference between spline parameters.

Also, optionally centers the spline so that the spline average is zero.

Value

list of data_model variables including:

  • state a list of parameters associated with the data_model. Here, only the matrix Eta

  • posteriorSample_params a list of parameter names to record posterior samples of

  • posteriorMean_params a list of parameters to record the posterior mean, but not save individual posterior samples

References

following code from https://github.com/SurajGupta/r-source/blob/master/src/library/splines/R/splines.R


deruncie/MegaLMM documentation built on June 10, 2025, 7:26 p.m.