jasp-stats / jasp-issues

This repository is solely meant for reporting of bugs, feature requests and other issues in JASP.
58 stars 29 forks source link

[Bug]: Mixed models bayesian LMM failed #2869

Open CherylPain opened 1 month ago

CherylPain commented 1 month ago

JASP Version

0.19.0

Commit ID

No response

JASP Module

Mixed Models

What analysis are you seeing the problem on?

Bayesian Linear Mixed Models

What OS are you seeing the problem on?

Windows 11

Bug Description

I have entered the same variables as attempted in the classical version of LMM, however, the analysis isn't running, and gives me the following output: This analysis terminated unexpectedly.

Error in ref_grid(object = NULL, data = structure(list(PreAcc = c(2, : Can't handle an object of class 'NULL' Use help('models', package = 'emmeans') for information on supported models.

Stack trace tryCatchOne(expr, names, parentenv, handlers[[1]])

doTryCatch(return(expr), name, parentenv, handler)

withCallingHandlers(expr = analysis(jaspResults = jaspResults, dataset = dataset, options = options), error = .addStackTrace)

analysis(jaspResults = jaspResults, dataset = dataset, options = options)

.mmRunAnalysis(jaspResults, dataset, options, 'BLMM')

.mmTrends(jaspResults, dataset, options, type)

emmeans::emtrends(object = trendsModel, data = trendsDataset, specs = unlist(options$trendsVariables), var = unlist(options$trendsTrendVariable), at = trendsAt, options = list(level = trendsCI), lmer.df = if (trendsType = 'LMM') trendsDf)

do.call('ref_grid', c(rgargs))

ref_grid(object = NULL, data = list(PreAcc = c(2, 4, 2, -20, -25, 2, -30, -9, -3, 9, -5, -3, 41, -36, 3, 17, 22, -15, -55, 5, -5, 15, -8, -6, -3, -3, -3, 6, 0, 0, -70, 35, -15, -83, 14, 25, -11, -24, 30, 15, 3, -22, 25, -13, -36, 25, 25, -30, 0, -12, 5, 5, 50, -55, -40, -73, 15, -11, -7, -2, -60, 3, -10, 20, -10, -20, 8, -6, -10, -3, -5, 6, 10, 11, 7, -45, 0, -10, 22, -18, 13, -6, -22, 2, -26, 29, -2, -35, -5, 0), Expectation = c(0, 0, 0, 110, 95, 57, 40, 11, 3, 10, 17, 10, 66, 108, 73, 80, 90, 110, 70, 20, 25, 20, 15, 10, 10, 7, 3, 14, 14, 14, 100, 50, 50, 107, 30, 46, 155, 154, 115, 10, 20, 22, 55, 65, 71, 35, 50, 95, 60, 50, 10, 35, 50, 80, 105, 120, 30, 70, 65, 71, 120, 17, 20, 40, 50, 70, 70, 76, 65, 126, 36, 26, 10, 12, 10, 125, 60, 60, 86, 107, 89, 25, 25, 10, 69, 48, 74, 90, 60, 45), PARTICIPANT = c(2, 2, 2, 5, 5, 5, 10, 10, 10, 13, 13, 13, 15, 15, 15, 19, 19, 19, 20, 20, 20, 23, 23, 23, 25, 25, 25, 28, 28, 28, 1, 1, 1, 3, 3, 3, 6, 6, 6, 8, 8, 8, 11, 11, 11, 14, 14, 14, 17, 17, 17, 21, 21, 21, 26, 26, 26, 27, 27, 27, 4, 4, 4, 7, 7, 7, 9, 9, 9, 12, 12, 12, 16, 16, 16, 18, 18, 18, 22, 22, 22, 24, 24, 24, 29, 29, 29, 30, 30, 30), TRIAL = c(1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3), PRIME = 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, 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, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3)), at = list(Expectation = c(14.5625687591264, 53.3222222222222, 92.081875685318)), options = list(level = 0.95, just.data = TRUE), lmer.df = NULL)

stop(data)

To receive assistance with this problem, please report the message above at: https://jasp-stats.org/bug-reports

Expected Behaviour

The analysis should have run

Steps to Reproduce

1.Bayesian Linear Mixed Model

  1. Enter PreAcc as DV 3.Fixed effects: Expectation, Trial, Prime
  2. Random effects as participant
  3. Interactions added between expectation trial, expectation prime, trial * prime
  4. I added contrasts, although removed them and the same error occurred.
  5. Analysis just doesn't run.

Log (if any)

I have emailed this to you as I can't seem to upload it. My email is cheryl.williams@port.ac.uk. Thank you.

More Debug Information

This analysis terminated unexpectedly.

Error in ref_grid(object = NULL, data = structure(list(PreAcc = c(2, : Can't handle an object of class 'NULL' Use help('models', package = 'emmeans') for information on supported models.

Stack trace tryCatchOne(expr, names, parentenv, handlers[[1]])

doTryCatch(return(expr), name, parentenv, handler)

withCallingHandlers(expr = analysis(jaspResults = jaspResults, dataset = dataset, options = options), error = .addStackTrace)

analysis(jaspResults = jaspResults, dataset = dataset, options = options)

.mmRunAnalysis(jaspResults, dataset, options, 'BLMM')

.mmTrends(jaspResults, dataset, options, type)

emmeans::emtrends(object = trendsModel, data = trendsDataset, specs = unlist(options$trendsVariables), var = unlist(options$trendsTrendVariable), at = trendsAt, options = list(level = trendsCI), lmer.df = if (trendsType = 'LMM') trendsDf)

do.call('ref_grid', c(rgargs))

ref_grid(object = NULL, data = list(PreAcc = c(2, 4, 2, -20, -25, 2, -30, -9, -3, 9, -5, -3, 41, -36, 3, 17, 22, -15, -55, 5, -5, 15, -8, -6, -3, -3, -3, 6, 0, 0, -70, 35, -15, -83, 14, 25, -11, -24, 30, 15, 3, -22, 25, -13, -36, 25, 25, -30, 0, -12, 5, 5, 50, -55, -40, -73, 15, -11, -7, -2, -60, 3, -10, 20, -10, -20, 8, -6, -10, -3, -5, 6, 10, 11, 7, -45, 0, -10, 22, -18, 13, -6, -22, 2, -26, 29, -2, -35, -5, 0), Expectation = c(0, 0, 0, 110, 95, 57, 40, 11, 3, 10, 17, 10, 66, 108, 73, 80, 90, 110, 70, 20, 25, 20, 15, 10, 10, 7, 3, 14, 14, 14, 100, 50, 50, 107, 30, 46, 155, 154, 115, 10, 20, 22, 55, 65, 71, 35, 50, 95, 60, 50, 10, 35, 50, 80, 105, 120, 30, 70, 65, 71, 120, 17, 20, 40, 50, 70, 70, 76, 65, 126, 36, 26, 10, 12, 10, 125, 60, 60, 86, 107, 89, 25, 25, 10, 69, 48, 74, 90, 60, 45), PARTICIPANT = c(2, 2, 2, 5, 5, 5, 10, 10, 10, 13, 13, 13, 15, 15, 15, 19, 19, 19, 20, 20, 20, 23, 23, 23, 25, 25, 25, 28, 28, 28, 1, 1, 1, 3, 3, 3, 6, 6, 6, 8, 8, 8, 11, 11, 11, 14, 14, 14, 17, 17, 17, 21, 21, 21, 26, 26, 26, 27, 27, 27, 4, 4, 4, 7, 7, 7, 9, 9, 9, 12, 12, 12, 16, 16, 16, 18, 18, 18, 22, 22, 22, 24, 24, 24, 29, 29, 29, 30, 30, 30), TRIAL = c(1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3), PRIME = 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, 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, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3)), at = list(Expectation = c(14.5625687591264, 53.3222222222222, 92.081875685318)), options = list(level = 0.95, just.data = TRUE), lmer.df = NULL)

stop(data)

To receive assistance with this problem, please report the message above at: https://jasp-stats.org/bug-reports

image

Final Checklist

tomtomme commented 1 week ago

To reproduce and understand this error: Could you share your .jasp-file by renaming to .zip and drag and dropping it here? thx

I am from the issue-collaborator team, but without access to the eMail you send the file to.

CherylPain commented 4 days ago

Hi sorry for the delay, I have just handed in my masters dissertation (yesterday), so have lost track of emails. I'm not sure which file it was now, and can't find a trace of the email I sent you, Maybe thats because it was through the website, I'm not sure. I'm also not sure if the issue was resolved when I updated the software, or how I got around it. From the name of this file I just found, I think it may be this one.

Thank you.

Cheryl LMM data - sent to JASP.zip https://drive.google.com/file/d/1XmOqV51XqNmD2NvVl29QJgtJsdQKAbuQ/view?usp=drive_web

On Mon, Sep 2, 2024 at 10:09 AM Thomas Langkamp @.***> wrote:

To reproduce and understand this error: Could you share your .jasp-file by renaming to .zip and drag and dropping it here? thx

I am from the issue-collaborator team, but without access to the eMail you send the file to.

— Reply to this email directly, view it on GitHub https://github.com/jasp-stats/jasp-issues/issues/2869#issuecomment-2324220010, or unsubscribe https://github.com/notifications/unsubscribe-auth/BKODL3IAMGOMVTJS7MNRXTLZUQTNVAVCNFSM6AAAAABMJVSDHCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRUGIZDAMBRGA . You are receiving this because you authored the thread.Message ID: @.***>