meridian.model.knots.get_knot_info

Returns the number of knots, knot locations, and weights.

n_times The number of time periods in the data.
knots An optional integer or a collection of integers indicating the knots used to estimate time effects. When knots is a collection of integers, the knot locations are provided by that collection. Zero corresponds to a knot at the first time period, one corresponds to a knot at the second time, ..., and (n_times - 1) corresponds to a knot at the last time period. When knots is an integer, then there are knots with locations equally spaced across the time periods (including knots at zero and (n_times - 1). When knots is 1, there is a single common regression coefficient used for all time periods. If knots is None, then the numbers of knots used is equal to the number of time periods. This is equivalent to each time period having its own regression coefficient.
is_national A boolean indicator whether to adapt the knot information for a national model.

A KnotInfo that contains the number of knots, the location of knots, and the weights used to multiply with the knot values to get time-varying coefficients.