【问题标题】:fitdistr in rpy2rpy2中的fitdistr
【发布时间】:2012-06-25 04:21:55
【问题描述】:

我有一个一维数据列表,我想使用最小二乘或最大似然来拟合分布,如 here 所示,但我想从 python 而不是 R 交互式 shell 中进行。

我安装了rpy2,并希望在交互式ipython shell 中使用fitdistr 函数,因为我已将数据导入列表中。

这个功能在哪里,如何使用?

【问题讨论】:

    标签: python r statistics rpy2 rpython


    【解决方案1】:

    函数在R包MASS中

    from rpy2.robjects.packages import importr
    
    MASS = importr('MASS')
    
    # the function is now at MASS.fitdistr
    

    【讨论】:

    • 非常感谢!正是我想要的。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-02-22
    • 2020-10-11
    • 2013-06-11
    • 1970-01-01
    • 1970-01-01
    • 2020-05-30
    相关资源
    最近更新 更多