如何使用 statsmodels quantreg 拥有多个独立的值列

How to have multiple independent value columns using statsmodels quantreg

现在我正在尝试使用 statsmodels.formula.api 的 quantreg,方法是像 https://www.statology.org/quantile-regression-in-python/ 中一样,通过执行 smf.quantreg('<independant values> ~ <dependant values>', df).fit(q=0.9) 来放入公式和数据框 但是我找不到如何构建该公式采用多个独立值,我尝试使用 'xValue1, xValue2 ~ yValue' 的结构,但这导致我出现行不匹配错误,让我认为 statsmodels 假设我的 xValues 是行而不是列。

这应该有效

smf.quantreg('yValue ~ xValue1 + xValue2 + xValue3', df).fit(q=0.9)