Error when running mixed model in GAMLj

General help and assistance with jamovi. Bug reports can be made at our issues page: https://github.com/jamovi/jamovi/issues . (If you're unsure feel free to discuss it here)

by dskvarc » Wed Feb 12, 2020 5:34 am

Hi Jonathon and co,
Thank you and your team for providing such an excellent software package! It's really cool and intuitive.

I'm having some trouble trying to run a linear mixed model in GAMLj, I get an error stating that "object 'mePredDCreate' not found" and the analysis does not run. Everything else seems to work perfectly fine from what I can tell.

Speaking with some colleagues who are all using the same software, we've identified all of us with a similar institutional build computer (Windows 10, OS version 1809) get the same error. My colleagues with older machines (Windows 10 1709) can run the analysis perfectly without any issue.

Is this something that you have seen before?


Cheers,
Dave
dskvarc
 
Posts: 10
Joined: Wed Feb 12, 2020 5:25 am

by jonathon » Wed Feb 12, 2020 8:13 am

hi,

can you attach a .omv file containing the error?

with thanks
User avatar
jonathon
 
Posts: 1052
Joined: Fri Jan 27, 2017 10:04 am

by jonathon » Wed Feb 12, 2020 8:21 am

is that 'mePredDCreate' or 'merPredDCreate'?
User avatar
jonathon
 
Posts: 1052
Joined: Fri Jan 27, 2017 10:04 am

by mcfanda@gmail.com » Wed Feb 12, 2020 11:38 am

Hi
we just upgraded GAMLj to version 2.0.3. Could you please update and check if the problem persists?
thanks
User avatar
mcfanda@gmail.com
 
Posts: 179
Joined: Thu Mar 23, 2017 9:24 pm

by dskvarc » Wed Feb 12, 2020 10:07 pm

Hi Jonathon and Marcello,
Thank you both for your speedy replies! I have uploaded my omv file.
And apologies, yes, the error was "object 'merPredDCreate' not found".

Marcello, I have now updated GAMLj, but the error persists.



Cheers,
Dave
Attachments
wicksell-gamlj error.omv
(6.08 KiB) Downloaded 6 times
dskvarc
 
Posts: 10
Joined: Wed Feb 12, 2020 5:25 am

by mcfanda@gmail.com » Wed Feb 12, 2020 10:57 pm

Hi
it may be a problem with the underlying lme4 R package. To be sure, may I ask you to install jamovi module `Rj` and run this code. So we can check what is going on.

Code: Select all

formula = dv ~ 1 + time + group + time:group+( 1 | subj )
gamlj::gamljMixed(
    formula = formula,
    data = data)
   
library(lmerTest)
mod<-lmer(formula,data=data)
summary(mod)
pr<-predict(mod)
length(pr)

User avatar
mcfanda@gmail.com
 
Posts: 179
Joined: Thu Mar 23, 2017 9:24 pm

by mcfanda@gmail.com » Wed Feb 12, 2020 10:58 pm

This should be run after opening the .omv you sent us
User avatar
mcfanda@gmail.com
 
Posts: 179
Joined: Thu Mar 23, 2017 9:24 pm

by dskvarc » Thu Feb 13, 2020 2:13 am

Hi Marcello,
Here is the output from the code:

Debug

Error in loadNamespace(name): there is no package called 'gamlj'

private$.run()
eval(code, self$data, echo, self$results, figWidth = figWidth, figHeight = figHeight)
evaluate::evaluate(input = script, envir = eval.env, output_handler = handler, stop_on_error = 2)
evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos, debug = debug, last = i == length(out), use_try = stop_on_error != 2, keep_warning = keep_warning, keep_message = keep_message, output_handler = output_handler, include_timing = include_timing)
timing_fn(handle(ev <- withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler, error = eHandler, message = mHandler)))
handle(ev <- withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler, error = eHandler, message = mHandler))
withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler, error = eHandler, message = mHandler)
withVisible(eval(expr, envir, enclos))
eval(expr, envir, enclos)
eval(expr, envir, enclos)
gamlj::gamljMixed
getExportedValue(pkg, name)
asNamespace(ns)
getNamespace(ns)
loadNamespace(name)
withRestarts(stop(cond), retry_loadNamespace = function() NULL)
withOneRestart(expr, restarts[[1]])
doWithOneRestart(return(expr), restart)


Cheers,
Dave
dskvarc
 
Posts: 10
Joined: Wed Feb 12, 2020 5:25 am

by jonathon » Thu Feb 13, 2020 3:08 am

hey dave,

try just these lines:

library(lmerTest)
formula = dv ~ 1 + time + group + time:group+( 1 | subj )
mod<-lmer(formula,data=data)
summary(mod)
pr<-predict(mod)
length(pr)

(in order for the gamlj line to work, you'll need to be using system R, and have gamlj installed into R ... let's just try the above lines for now).

cheers
User avatar
jonathon
 
Posts: 1052
Joined: Fri Jan 27, 2017 10:04 am

by dskvarc » Thu Feb 13, 2020 3:15 am

Hi Jonathon,
Here is the output from the code:

Debug

Error: object of type 'closure' is not subsettable

private$.run()
eval(code, self$data, echo, self$results, figWidth = figWidth, figHeight = figHeight)
evaluate::evaluate(input = script, envir = eval.env, output_handler = handler, stop_on_error = 2)
evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos, debug = debug, last = i == length(out), use_try = stop_on_error != 2, keep_warning = keep_warning, keep_message = keep_message, output_handler = output_handler, include_timing = include_timing)
timing_fn(handle(ev <- withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler, error = eHandler, message = mHandler)))
handle(ev <- withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler, error = eHandler, message = mHandler))
withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler, error = eHandler, message = mHandler)
withVisible(eval(expr, envir, enclos))
eval(expr, envir, enclos)
eval(expr, envir, enclos)
lmer(formula, data = data)
eval.parent(mc)
eval(expr, p)
eval(expr, p)
lme4::lmer(formula = formula, data = data)
eval(mc, parent.frame(1))
eval(mc, parent.frame(1))
lme4::lFormula(formula = formula, data = data, control = list(optimizer = "nloptwrap", restart_edge = TRUE, boundary.tol = 1e-05, calc.derivs = TRUE, use.last.params = FALSE, checkControl = list(check.nobs.vs.rankZ = "ignore", check.nobs.vs.nlev = "stop", check.nlev.gtreq.5 = "ignore", check.nlev.gtr.1 = "stop", check.nobs.vs.nRE = "stop", check.rankX = "message+drop.cols", check.scaleX = "warning", check.formula.LHS = "stop"), checkConv = list(check.conv.grad = list(action = "warning", tol = 0.002,
relTol = NULL), check.conv.singular = list(action = "message", tol = 1e-04), check.conv.hess = list(action = "warning", tol = 1e-06)), optCtrl = list()))
checkFormulaData(formula, data, checkLHS = control$check.formula.LHS == "stop")
stopifnot(!checkLHS || length(as.formula(formula, env = denv)) == 3)
as.formula(formula, env = denv)
formula(object, env = baseenv())
formula.default(object, env = baseenv())
notnull(x$formula)


--

Thanks again to you both!

Cheers,
Dave
dskvarc
 
Posts: 10
Joined: Wed Feb 12, 2020 5:25 am

Next

Return to Help