# LDA Effect Size Error

**URL:** <https://help.galaxyproject.org/t/lda-effect-size-error/2840>\
**Category:** usegalaxy.org support\
**Tags:** development-tools\
**Created:** [January 23, 2020, 2:43am UTC](https://help.galaxyproject.org/t/lda-effect-size-error/2840 "2020-01-23T02:43:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![carolinek](https://avatars.discourse-cdn.com/v4/letter/c/45deac/32.png) [@carolinek](https://help.galaxyproject.org/u/carolinek)\
**Post date:** [January 23, 2020, 2:43am UTC](https://help.galaxyproject.org/t/lda-effect-size-error/2840/1 "2020-01-23T02:43:01Z")

</div>

I have been using LDA on several data sets. For some it seems to be successful and for other very similar data sets (all that has changed is my grouping variable of interest) the analysis does not work beyond the Effect Size calculator. I have pasted the error message below. Please let me know what the next best steps are.

Error Message:  
/galaxy\_venv/local/lib/python2.7/site-packages/rpy2/rinterface/ **init**.py:185: RRuntimeWarning: Error in (function (file = “”, n = NULL, text = NULL, prompt = “?”, keep.source = getOption(“keep.source”), :  
:1:47: unexpected numeric constant  
1: effect.size \<- abs(mean(LD[sub\_d[,“class”]==""1  
^

warnings.warn(x, RRuntimeWarning)  
Traceback (most recent call last):  
File “/shed\_tools/testtoolshed.g2.bx.psu.edu/repos/george-weingart/lefse/a6284ef17bf3/lefse/run\_lefse.py”, line 89, in   
if params[‘rank\_tec’] == ‘lda’: lda\_res,lda\_res\_th = test\_lda\_r(cls,feats,class\_sl,params[‘n\_boots’],params[‘f\_boots’],params[‘lda\_abs\_th’],0.0000000001,params[‘nlogs’])  
File “/export/shed\_tools/testtoolshed.g2.bx.psu.edu/repos/george-weingart/lefse/a6284ef17bf3/lefse/lefse.py”, line 199, in test\_lda\_r  
robjects.r(‘effect.size \<- abs(mean(LD[sub\_d[,“class”]=="’+p[0]+’"]) - mean(LD[sub\_d[,“class”]=="’+p[1]+’"]))’)  
File “/galaxy\_venv/local/lib/python2.7/site-packages/rpy2/robjects/ **init**.py”, line 358, in **call**  
p = \_rparse(text=StrSexpVector((string,)))  
rpy2.rinterface.RRuntimeError: Error in (function (file = “”, n = NULL, text = NULL, prompt = “?”, keep.source = getOption(“keep.source”), :  
:1:47: unexpected numeric constant  
1: effect.size \<- abs(mean(LD[sub\_d[,“class”]==""1  
^

Thank you for any and all help!

---

<div class="post-metadata">

**Author:** ![rickmortyforever](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/rickmortyforever/32/1578_2.png) [@rickmortyforever](https://help.galaxyproject.org/u/rickmortyforever)\
**Post date:** [May 28, 2020, 12:35pm UTC](https://help.galaxyproject.org/t/lda-effect-size-error/2840/2 "2020-05-28T12:35:09Z")

</div>

have you solve that problem? I’ve met this problem, too.

---

<div class="post-metadata">

**Author:** ![bernt-matthias](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/bernt-matthias/32/502_2.png) [@bernt-matthias](https://help.galaxyproject.org/u/bernt-matthias)\
**Post date:** [September 17, 2020, 1:01pm UTC](https://help.galaxyproject.org/t/lda-effect-size-error/2840/3 "2020-09-17T13:01:24Z")

</div>

Could someone of you provide test data or a link to some public history for reproducing the issue.

For my reference, linked issue here: [https://github.com/galaxyproject/tools-iuc/issues/2816](https://github.com/galaxyproject/tools-iuc/issues/2816)

---

<div class="post-metadata">

**Author:** ![jennaj](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/jennaj/32/27_2.png) [@jennaj](https://help.galaxyproject.org/u/jennaj)\
**Post date:** [October 13, 2022, 10:02pm UTC](https://help.galaxyproject.org/t/lda-effect-size-error/2840/4 "2022-10-13T22:02:25Z")

</div>

Closed on October 13, 2022, 10:02pm UTC


