distributed_lag_list
distributed_lag_list.Rd
Create distributed lag terms
Usage
distributed_lag_list(
x,
n_lag,
lag_max,
df,
degree,
internal_knots,
boundary_knots,
complete_basis,
periodic,
derivs,
integral
)
Arguments
- x
numeric vector to lag
- n_lag
number of lag terms
- lag_max
integer the maximum lag
- df
Degree of freedom that equals to the column number of the returned matrix. One can specify
df
rather thanknots
, then the function choosesdf - degree - as.integer(intercept)
internal knots at suitable quantiles ofx
ignoring missing values and thosex
outside of the boundary. For periodic splines,df - as.integer(intercept)
internal knots will be chosen at suitable quantiles ofx
relative to the beginning of the cyclic intervals they belong to (see Examples) and the number of internal knots must be greater or equal to the specifieddegree - 1
. If internal knots are specified viaknots
, the specifieddf
will be ignored.- degree
A nonnegative integer specifying the degree of the piecewise polynomial. The default value is
3
for cubic splines. Zero degree is allowed for piecewise constant basis functions.- internal_knots
location of internal knots
- boundary_knots
location of boundary knots
- complete_basis
logical intercept?
- periodic
A logical value. If
TRUE
, the periodic splines will be returned. The default value isFALSE
.- derivs
A nonnegative integer specifying the order of derivatives of splines basis function. The default value is
0
.- integral
A logical value. If
TRUE
, the corresponding integrals of spline basis functions will be returned. The default value isFALSE
. For periodic splines, the integral of each basis is integrated from the left boundary knot.