在Windows 7 64上的python脚本中执行GLM

1 python windows r scipy glm

我试图在python脚本(循环内)中重复执行GLM(广义线性模型).

1-我试图在Scipy glm函数中使用Stats,但描述是相当不存在的,我想我没用得好 - >错误信息

"ValueError: only ttest_ind implemented".
我在stats.py文件和_support.py中搜索,找不到结果.

2-我试图安装RPY2(希望lgautier或其他人会读我),使用R驱动的功能.但我在Windows 7 64上,似乎我没有成功安装它.我有错误消息:

    import rpy2.tests
  File "C:\Python26\lib\site-packages\rpy2\tests.py", line 3, in 
    import rpy2.robjects.tests
  File "C:\Python26\lib\site-packages\rpy2\robjects\__init__.py", line 12, in 
    import rpy2.rinterface as rinterface
  File "C:\Python26\lib\site-packages\rpy2\rinterface\__init__.py", line 22, in 
    "This might be because R.exe is nowhere in your Path.")
RuntimeError: Unable to determine R version from the registery.Calling the command 'R RHOME' does not return anything.
This might be because R.exe is nowhere in your Path.
Run Code Online (Sandbox Code Playgroud)

如何在python中执行健壮的GLM(其他方式?,我尝试过好的但我错过了??)?如何在Windows 7 64上安装RPY(noob/basic student learner)并将其与python连接?

jse*_*old 5

我不知道为什么这里的答案似乎表明,对于GLM的statsmodels测试覆盖率并不是那么好.我写了测试.这些模型针对Stata,R和SAS进行了验证.他们非常全面.如果您发现意外情况或不是这种情况,请向开发人员报告.

https://github.com/statsmodels/statsmodels/blob/master/scikits/statsmodels/genmod/tests/test_glm.py