提问人:T_S 提问时间:11/15/2023 更新时间:11/15/2023 访问量:18
如何在python中使用statsmodel修复线性回归模型中多个变量的系数?
How to fix coefficients of multiple variables in a linear regression model using statsmodel in python?
问:
假设我有一个因变量 y 和自变量 x1、x2、x3、x4、x5 和 x6。我想在 python 中使用 statsmodels 构建线性回归模型。我还想将模型中 x2、x4 和 x5 的系数分别固定为 0.2、2 和 0.5。如何在 python 中使用 statsmodels 的 OLS 模块修复模型中的系数?
答: 暂无答案
评论