加入新推出的
Discord 社区,展开实时讨论,获得同行支持,并直接与 Meridian 团队互动!
meridian.model.knots.get_knot_info
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
返回结数、结位置和权重。
meridian.model.knots.get_knot_info(
n_times: int,
knots: (int | Collection[int] | None),
is_national: bool = False
) -> meridian.model.knots.KnotInfo
实参 |
n_times
|
数据中的时间段数。
|
knots
|
一个可选的整数或整数集合,表示用于估算时间效应的结数。如果 knots 是一个整数集合,则结的位置由该集合提供。0 表示第一个时间段的结,1 表示第二个时间段的结,依此类推,(n_times - 1) 表示最后一个时间段的结。如果 knots 是整数,则结的位置在各个时间段中均匀分布,包括 0 和 (n_times - 1) 处的结。如果 knots 是 1 ,则所有时间段都使用一个共同的回归系数。如果 knots 是 None ,则使用的结数等于时间段数。这相当于每个时间段都有自己的回归系数。
|
is_national
|
一个布尔值,用于表示是否要为国家级模型调整结信息。
|
返回结果 |
KnotInfo,其中包含结数、结位置,以及用于与结值相乘从而获得时变系数的权重。
|
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-01-25。
[null,null,["最后更新时间 (UTC):2025-01-25。"],[],["The function `get_knot_info` determines knot-related information for time-effect estimation. It takes `n_times` (number of time periods), optional `knots` (locations or count), and `is_national` (national model indicator) as input. If `knots` is a collection, these are used directly as locations; if an integer, knots are equally spaced; `None` equals each time period having its own knot. The output includes the total number of knots, their locations, and associated weights.\n"],null,[]]