unknown error message using gamlj in R

Discuss statistics related things

by Arnaud Mortier » Sat May 01, 2021 10:53 pm


I need to be able to run mixed data count analyses directly in R, so I installed gamlj via
Code: Select all

and then copy-pasted the code given by jamovi in R syntax mode, namely:

Code: Select all
gamlj::gamljGlmMixed(formula = mes ~ 1 + tps + gr +tps:gr+( 1 | part ),
+                      data = g,
+                      modelSelection = "nb")

It outputs the error message
Error: 'OptionOutput' is not an exported object from 'namespace:jmvcore'

Google is of no help to find out what this means.
I have checked on a simpler model (one way ANOVA) that the code displayed by jamovi in syntax mode works as such, so the problem seems to come from gamlj itself.

I have R version 4.0.5.

Thank you for any ideas.
User avatar
Arnaud Mortier
Posts: 8
Joined: Tue Apr 27, 2021 11:39 am

by jonathon » Sun May 02, 2021 8:14 am

update your jmvcore:



User avatar
Posts: 1729
Joined: Fri Jan 27, 2017 10:04 am

by Arnaud Mortier » Sun May 02, 2021 10:11 am

Thanks for your answer!

Now the analysis will try to run, but it treats the factors as covariates and thus insists that I make them numeric:

Error: Covariate tps cannot be converted to a numeric variable
In addition: Warning message:
In mf.checkData(self$options, data, modelType = modelType) :
NAs introduced by coercion

If I make the factors numeric beforehand, then the analysis does run, but of course it is not the analysis I want.

Edit : sorry, I got that one, you actually need to manually turn variables into factors if you want them treated as such.
I understood this thanks to https://forum.jamovi.org/viewtopic.php?f=2&t=1419

Thanks for your help!

User avatar
Arnaud Mortier
Posts: 8
Joined: Tue Apr 27, 2021 11:39 am

by mcfanda@gmail.com » Sun May 02, 2021 1:13 pm

yes, that's a feature we intended to have. In R, gamlj treats variables as defined by their class. So, if you want an IV to be treated as a factor, you should make them a factor beforehand. The DV, however, is coerced to the appropriate class, if possible
User avatar
Posts: 251
Joined: Thu Mar 23, 2017 9:24 pm

Return to Statistics