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]: #1993

Open thomask712001 opened 1 year ago

thomask712001 commented 1 year ago

JASP Version

0.17.0

Commit ID

No response

JASP Module

Mixed Models

What analysis are you seeing the problem on?

Bayesian Generalized Linear Mixed Models

What OS are you seeing the problem on?

Windows 11, macOS Intel, macOS Silicon

Bug Description

Error in rstan::summary(stanfit, probs = probs, digits = 10)$summary : $ operator is invalid for atomic vectors

Refuses to calculated generalized bayesian lmm; gaussian family with log link. Works with identity link. Same problem on Mac (both intel and M1) and with previous version of Jags (0.16.4).

Can't send zip since data involves patients.

I suspect that the error has to do with small n. Since I was prompted I report the error anyhow :-)

Script: jaspMixedModels::MixedModelsBGLMM( data = NULL, version = "0.17", formula = stroop ~ any.mutation.no.D90A.mz * Index1 + (1 | ordningsnr), ciLevel = 0.95, contrasts = NULL, dependentAggregation = "", estimateType = "marginalMeans", family = "gaussian", fixedEffectEstimate = FALSE, link = "log", marginalMeansCiLevel = 0.95, marginalMeansContrast = TRUE, marginalMeansResponse = TRUE, marginalMeansSd = 1, marginalMeansTerms = ~ Index1 + any.mutation.no.D90A.mz, mcmcAdaptDelta = 0.8, mcmcBurnin = 2000, mcmcChains = 3, mcmcDiagnosticsHorizontal = NULL, mcmcDiagnosticsType = "traceplot", mcmcDiagnosticsVertical = NULL, mcmcMaxTreedepth = 10, mcmcSamples = 4000, modelSummary = FALSE, plotBackgroundColor = "darkgrey", plotBackgroundData = "ordningsnr", plotBackgroundElement = "jitter", plotCiLevel = 0.95, plotCiType = "model", plotDodge = 0.3, plotElementWidth = 1, plotEstimatesTable = FALSE, plotHeight = 320, plotHorizontalAxis = ~ Index1, plotJitterHeight = 0, plotJitterWidth = 0.1, plotLegendPosition = "none", plotLevelsByColor = TRUE, plotLevelsByFill = FALSE, plotLevelsByLinetype = TRUE, plotLevelsByShape = FALSE, plotRelativeSizeData = 1, plotRelativeSizeText = 1.5, plotSeparateLines = ~ any.mutation.no.D90A.mz, plotSeparatePlots = NULL, plotTheme = "jasp", plotTransparency = 0.7, plotWidth = 480, randomEffectEstimate = FALSE, seed = 123, setSeed = TRUE, trendsCiLevel = 0.95, trendsContrast = FALSE, trendsContrasts = NULL, trendsSd = 1, trendsTrendVariable = NULL, trendsVariables = NULL, varianceCorrelationEstimate = FALSE)

Screenshot 2023-02-04 165931

Expected Behaviour

Results!

Steps to Reproduce

  1. other platform
  2. older version
  3. tested other analysis options (which works) ...

Log (if any)

JASP 2023-02-04 16_19_44 Engine 0.log

Final Checklist

FBartos commented 1 year ago

I have been looking into the logs and there seems to be a problem with the HMC chain initialization. It's not a completely trivial issue to solve -- we will be trying to look into some possible solutions though.

tomtomme commented 7 months ago

@thomask712001 Could you re-test with jasp 0.18.3? I would do for you, if you could share your jasp file by renaming to .zip and drag & dropping here.

@FBartos Can you recall if this was fixed?

thomask712001 commented 7 months ago

Sorry, same problem still. Works fine with Gaussian link.

tomtomme commented 4 months ago

@FBartos I guess this is now something for 0.20?

FBartos commented 3 months ago

Yes, same as the Frequentist version optimizer settings