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)
User avatar
jonathon
Posts: 2613
Joined: Fri Jan 27, 2017 10:04 am

Re: Error when running mixed model in GAMLj

Post by jonathon »

looking at your output, i'd say you haven't run the:

formula = dv ~ 1 + time + group + time:group+( 1 | subj )

line. could you double check, and ensure that line gets called?

with thanks
dskvarc
Posts: 10
Joined: Wed Feb 12, 2020 5:25 am

Re: Error when running mixed model in GAMLj

Post by dskvarc »

Ah, doh!

You are correct.

Here is the output:
Debug

Error in eval(predvars, data, env): object 'dv' not found

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[], 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()))
eval(mf, parent.frame())
eval(mf, parent.frame())
stats::model.frame(data = data, drop.unused.levels = TRUE, formula = dv ~ 1 + time + group + time:group + (1 + subj))
model.frame.default(data = data, drop.unused.levels = TRUE, formula = dv ~ 1 + time + group + time:group + (1 + subj))
eval(predvars, data, env)
eval(predvars, data, env)


Cheers,
Dave
User avatar
jonathon
Posts: 2613
Joined: Fri Jan 27, 2017 10:04 am

Re: Error when running mixed model in GAMLj

Post by jonathon »

ah, so the next important thing, is that this needs to be run inside that wicksell data set, i.e. with the variables subj, time, group, dv.
dskvarc
Posts: 10
Joined: Wed Feb 12, 2020 5:25 am

Re: Error when running mixed model in GAMLj

Post by dskvarc »

You have the patience of a saint :)

It works!

Linear mixed model fit by REML. t-tests use Satterthwaite's method [
lmerModLmerTest]
Formula: formula
Data: data

REML criterion at convergence: 1000.8

Scaled residuals:
Min 1Q Median 3Q Max
-2.79300 -0.38860 0.00641 0.55955 1.76696

Random effects:
Groups Name Variance Std.Dev.
subj (Intercept) 2539 50.39
Residual 2761 52.54
Number of obs: 96, groups: subj, 24

Fixed effects:
Estimate Std. Error df t value Pr(>|t|)
(Intercept) 304.33 21.02 52.11 14.481 < 2e-16 ***
time1 -47.67 21.45 66.00 -2.222 0.029701 *
time3 -88.58 21.45 66.00 -4.130 0.000104 ***
time6 -155.50 21.45 66.00 -7.249 5.82e-10 ***
group2 -23.92 29.72 52.11 -0.805 0.424644
time1:group2 -138.25 30.33 66.00 -4.557 2.30e-05 ***
time3:group2 -91.50 30.33 66.00 -3.016 0.003631 **
time6:group2 -18.25 30.33 66.00 -0.602 0.549490
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Correlation of Fixed Effects:
(Intr) time1 time3 time6 group2 tm1:g2 tm3:g2
time1 -0.510
time3 -0.510 0.500
time6 -0.510 0.500 0.500
group2 -0.707 0.361 0.361 0.361
time1:grop2 0.361 -0.707 -0.354 -0.354 -0.510
time3:grop2 0.361 -0.354 -0.707 -0.354 -0.510 0.500
time6:grop2 0.361 -0.354 -0.354 -0.707 -0.510 0.500 0.500
User avatar
jonathon
Posts: 2613
Joined: Fri Jan 27, 2017 10:04 am

Re: Error when running mixed model in GAMLj

Post by jonathon »

hmm, although it's weird that this works, and gamlj doesn't ...

after you've run this, can you see if running the analysis with gamlj begins to work, or if it continues to throw the same error you originally reported.

with thanks

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

Re: Error when running mixed model in GAMLj

Post by dskvarc »

It works :D

I'm not sure what has changed, but something seems to have done the trick.

One thing I did do was go onto my system R and install the lmerTest package, though. My institution is fairly locked down and I've had to add specific permissions for R to be able to run - could this be a factor?


In any case, thank you so much for all your (and Marcello's) help and hard work. I'm very appreciative :)

Cheers,
Dave
User avatar
jonathon
Posts: 2613
Joined: Fri Jan 27, 2017 10:04 am

Re: Error when running mixed model in GAMLj

Post by jonathon »

try restarting jamovi and run the gamlj analysis as the very first analysis, and see if the problem comes back again.

cheers

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

Re: Error when running mixed model in GAMLj

Post by dskvarc »

Hmm, upon reset the "object 'merPredDCreate' not found" error has returned, even when running the code in Rj Editor.

I now get a much longer error when trying to run the analysis from trying to run the analysis in the RJ editor:
Debug

Error in initializePtr(): object 'merPredDCreate' not found

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[], 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)
do.call(mkLmerDevfun, c(lmod, list(start = start, verbose = verbose, control = control)))
(function (fr, X, reTrms, REML = TRUE, start = NULL, verbose = 0, control = lmerControl(), ...)
{
p <- ncol(X)
rho <- new.env(parent = parent.env(environment()))
rho$pp <- do.call(merPredD$new, c(reTrms[c("Zt", "theta", "Lambdat", "Lind")], n = nrow(X), list(X = X)))
REMLpass <- if (REML)
p
else 0
rho$resp <- if (missing(fr))
mkRespMod(REML = REMLpass, ...)
else mkRespMod(fr, REML = REMLpass)
pp <- resp <- NULL
rho$lmer_Deviance <- lmer_Deviance
devfun <- function(theta) .Call(lmer_Deviance, pp$ptr(), resp$ptr(), as.double(theta))
environment(devfun) <- rho
if (is.null(start) && all(reTrms$cnms == "(Intercept)") && length(reTrms$flist) == length(reTrms$lower) && !is.null(y <- model.response(fr))) {
v <- sapply(reTrms$flist, function(f) var(ave(y, f)))
v.e <- var(y) - sum(v)
if (!is.na(v.e) && v.e > 0) {
v.rel <- v/v.e
if (all(v.rel >= reTrms$lower^2))
rho$pp$setTheta(sqrt(v.rel))
}
}
if (length(rho$resp$y) > 0)
devfun(rho$pp$theta)
rho$lower <- reTrms$lower
devfun
})(fr = list(dv = c(296, 175, 187, 192, 376, 329, 236, 76, 309, 238, 150, 123, 222, 60, 82, 85, 150, 271, 250, 216, 316, 291, 238, 144, 321, 364, 270, 308, 447, 402, 294, 216, 220, 70, 95, 87, 375, 335, 334, 79, 310, 300, 253, 140, 310, 245, 200, 120, 282, 186, 225, 134, 317, 31, 85, 120, 362, 104, 144, 114, 338, 132, 91, 77, 263, 94, 141, 142, 138, 38, 16, 95, 329, 62, 62, 6, 292, 139, 104, 184, 275, 94, 135, 137, 150, 48, 20, 85, 319, 68, 67, 12, 300, 138, 114, 174), time = c(1, 2, 3, 4, 1, 2,
3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4), group = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2), subj = c(1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 23, 23, 23, 23, 24, 24, 24, 24)), X = c(1, 1, 1, 1, 1, 1, 1, 1, 1,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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), reTrms = list(Zt = new("dgCMatrix", i = c(0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16,
16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 23, 23, 23, 23), p = 0:96, Dim = c(24, 96), Dimnames = list(c("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24"), c("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35",
"36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", "91", "92", "93", "94", "95", "96")), x = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1), factors = list()), theta = 1, Lind = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1), Gp = c(0, 24), lower = 0, Lambdat = new("dgCMatrix", i = 0:23, p = 0:24, Dim = c(24, 24), Dimnames = list(NULL, NULL), x = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1), factors = list()), flist = list(
subj = c(1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 23, 23, 23, 23, 24, 24, 24, 24)), cnms = list(subj = "(Intercept)"), Ztlist = list(`1 | subj` = new("dgCMatrix", i = c(`0` = 0, `1` = 0, `2` = 0, `3` = 0, `4` = 1, `5` = 1,
`6` = 1, `7` = 1, `8` = 2, `9` = 2, `10` = 2, `11` = 2, `12` = 3, `13` = 3, `14` = 3, `15` = 3, `16` = 4, `17` = 4, `18` = 4, `19` = 4, `20` = 5, `21` = 5, `22` = 5, `23` = 5, `24` = 6, `25` = 6, `26` = 6, `27` = 6, `28` = 7, `29` = 7, `30` = 7, `31` = 7, `32` = 8, `33` = 8, `34` = 8, `35` = 8, `36` = 9, `37` = 9, `38` = 9, `39` = 9, `40` = 10, `41` = 10, `42` = 10, `43` = 10, `44` = 11, `45` = 11, `46` = 11, `47` = 11, `48` = 12, `49` = 12, `50` = 12, `51` = 12, `52` = 13, `53` = 13, `54` = 13,
`55` = 13, `56` = 14, `57` = 14, `58` = 14, `59` = 14, `60` = 15, `61` = 15, `62` = 15, `63` = 15, `64` = 16, `65` = 16, `66` = 16, `67` = 16, `68` = 17, `69` = 17, `70` = 17, `71` = 17, `72` = 18, `73` = 18, `74` = 18, `75` = 18, `76` = 19, `77` = 19, `78` = 19, `79` = 19, `80` = 20, `81` = 20, `82` = 20, `83` = 20, `84` = 21, `85` = 21, `86` = 21, `87` = 21, `88` = 22, `89` = 22, `90` = 22, `91` = 22, `92` = 23, `93` = 23, `94` = 23, `95` = 23), p = 0:96, Dim = c(24, 96), Dimnames = list(c("1",
"2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24"), c("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", "60", "61", "62", "63",
"64", "65", "66", "67", "68", "69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", "91", "92", "93", "94", "95", "96")), x = c(`0` = 1, `1` = 1, `2` = 1, `3` = 1, `4` = 1, `5` = 1, `6` = 1, `7` = 1, `8` = 1, `9` = 1, `10` = 1, `11` = 1, `12` = 1, `13` = 1, `14` = 1, `15` = 1, `16` = 1, `17` = 1, `18` = 1, `19` = 1, `20` = 1, `21` = 1, `22` = 1, `23` = 1, `24` = 1, `25` = 1, `26` = 1, `27` = 1, `28` = 1, `29` = 1, `30` = 1,
`31` = 1, `32` = 1, `33` = 1, `34` = 1, `35` = 1, `36` = 1, `37` = 1, `38` = 1, `39` = 1, `40` = 1, `41` = 1, `42` = 1, `43` = 1, `44` = 1, `45` = 1, `46` = 1, `47` = 1, `48` = 1, `49` = 1, `50` = 1, `51` = 1, `52` = 1, `53` = 1, `54` = 1, `55` = 1, `56` = 1, `57` = 1, `58` = 1, `59` = 1, `60` = 1, `61` = 1, `62` = 1, `63` = 1, `64` = 1, `65` = 1, `66` = 1, `67` = 1, `68` = 1, `69` = 1, `70` = 1, `71` = 1, `72` = 1, `73` = 1, `74` = 1, `75` = 1, `76` = 1, `77` = 1, `78` = 1, `79` = 1, `80` = 1, `81` = 1,
`82` = 1, `83` = 1, `84` = 1, `85` = 1, `86` = 1, `87` = 1, `88` = 1, `89` = 1, `90` = 1, `91` = 1, `92` = 1, `93` = 1, `94` = 1, `95` = 1), factors = list()))), REML = TRUE, wmsgs = character(0), start = NULL, verbose = 0, 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()))
do.call(merPredD$new, c(reTrms[c("Zt", "theta", "Lambdat", "Lind")], n = nrow(X), list(X = X)))
(new("refMethodDef", .Data = function (...)
{
methods::new(def, ...)
}, mayCall = c("methods", "new"), name = "new", refClassName = "refGeneratorSlot", superClassMethod = ""))(Zt = new("dgCMatrix", i = c(0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 23, 23, 23, 23), p = 0:96, Dim = c(24,
96), Dimnames = list(c("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24"), c("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59",
"60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", "91", "92", "93", "94", "95", "96")), x = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1), factors = list()), theta = 1, Lambdat = new("dgCMatrix", i = 0:23, p = 0:24, Dim = c(24, 24), Dimnames = list(NULL, NULL), x = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1))
methods::new(def, ...)
initialize(value, ...)
initialize(value, ...)
.Object$initialize(...)
initializePtr()
User avatar
mcfanda@gmail.com
Posts: 457
Joined: Thu Mar 23, 2017 9:24 pm

Re: Error when running mixed model in GAMLj

Post by mcfanda@gmail.com »

Ok, it seems that your system has an issue with R lme4, which is the R package used by GAMLj. I'm not sure, let's see what Jonathon says.
User avatar
jonathon
Posts: 2613
Joined: Fri Jan 27, 2017 10:04 am

Re: Error when running mixed model in GAMLj

Post by jonathon »

so there's two lme4's ... one inside jmv, which is installed when jamovi is installed, and one inside gamlj. depending on which module loads lme4 first, that's the one that remains loaded. i don't think R can cleanly unload packages.

so if jmv loads it's lme4 first (i.e. by running linear regression, or doing something in the Rj editor), then if gamlj runs, it will see that lme4 is already loaded and will just use the one from jmv.

this shouldn't be a problem, because both lme4's should be identical ...

one possibility is that they're not identical ... i'll have to investigate that. another possibility is ... so the error message seems to be indicative of the lme4 .dll failing to load ... it may be that there's some windows security policy that prevents the dll from being loaded from the user's AppData directory (where modules get installed) ... where as the jmv module is installed into the Program Files, so it would be allowed to load from there.

try navigating to your AppData folder ... it's in C:\users\username and it's hidden. once in there, navigate to roaming/jamovi/modules folder. try moving the gamlj folder from there, to c:\program files\jamovi x.x.x.x\Resources\modules

start up jamovi, and see if gamlj works.

with thanks
Post Reply