【发布时间】:2012-06-25 04:21:55
【问题描述】:
我有一个一维数据列表,我想使用最小二乘或最大似然来拟合分布,如 here 所示,但我想从 python 而不是 R 交互式 shell 中进行。
我安装了rpy2,并希望在交互式ipython shell 中使用fitdistr 函数,因为我已将数据导入列表中。
这个功能在哪里,如何使用?
【问题讨论】:
标签: python r statistics rpy2 rpython
我有一个一维数据列表,我想使用最小二乘或最大似然来拟合分布,如 here 所示,但我想从 python 而不是 R 交互式 shell 中进行。
我安装了rpy2,并希望在交互式ipython shell 中使用fitdistr 函数,因为我已将数据导入列表中。
这个功能在哪里,如何使用?
【问题讨论】:
标签: python r statistics rpy2 rpython
函数在R包MASS中
from rpy2.robjects.packages import importr
MASS = importr('MASS')
# the function is now at MASS.fitdistr
【讨论】: