更新时间:2023-12-02 13:52:04
rx2
方法对应于 R 的 [[
,我理解与 相同$
.
The method rx2
corresponds to R's [[
, which I understand to be identical to $
.
考虑到这一点,您可以像访问系数"一样访问系数"中名为固定"的项目:
With that in mind, you can access the item called "fixed" within "coefficients" the same way you are already accessing "coefficients":
# Python sequences are zero-based
model.rx2("coefficients").rx2("fixed")[1]
或
# R vectors are one-based (so 1+1=2)
model.rx2("coefficients").rx2("fixed").rx(2)