jasp-stats / jasp-issues

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

bayes repeated anova error #598

Closed kornbrot closed 9 months ago

kornbrot commented 4 years ago

Tried to run Bayes repeated anova repeated factor analysis, 3 levels between factor level, 4 levels (grand, main, 1-way, 2-way ran perfectly well in standard repeated, gave error messages with BAYES see atached output and raw file. really grateful for help. Jaspo ahs such a beautiful interface and so good when itworks

IF JASP cannot do it would appreciate R code Many thanks Diana

DescriptiveWide proportionsminsav.xlsx JASPop.docx DescriptiveWide proportionsminsav.xlsx JASPop.docx

FransMeerhoff commented 4 years ago

Hi @JohnnyDoorn

Can you have a look at this issue?

Cheers Frans

JohnnyDoorn commented 4 years ago

Hi @kornbrot,

Can you please upload the .jasp file of the analyses where you get an error? Having the tables in a word document is a lot less informative. Unfortunately github does not allow uploading jasp files, so to do so, you can make a .zip first, and then upload that. When I have the file I can do some debugging and see why your analysis crashed.

Kind regards, Johnny

kornbrot commented 4 years ago

ASP file attached thanks for looking into it BayesRepeatedproblemArchive.zip

FransMeerhoff commented 4 years ago

Hi @kornbrot Thanks for sending us the JASP file.

Hi @JohnnyDoorn Can you have another look at this one? ( I reproduced the problem on the nightly 31-01 version and just found Error in jaspResultsCPP$send() : Type is not convertible to string ..... in the engine log )

kornbrot commented 4 years ago

what more infpormation do you need? were you able to unzip & get JASP file Thanks for your help

JohnnyDoorn commented 4 years ago

Strangely I only see a Bayesian and frequentist T-test in your jasp file and these are all OK.

If it only concerns the Bayesian ANOVA, then maybe @vandenman knows more about this. @FransMeerhoff did you see the Bayesian ANOVA on your computer with this JASP file?

FransMeerhoff commented 4 years ago

@JohnnyDoorn No only see the Paired Samples T-Test and Bayesian Paired Samples T-Test

@kornbrot Can you please explain. Did you send the wrong file?

Kind regards Frans Meerhoff

kornbrot commented 4 years ago

Thanks I have redone analyses and they checked oout on my mac os1O.14.6. In the .zip please find data as .csv results as .htm jasp as .jasp Have tried other repeated measures that worked fine. No idea what problem is with tis one. Sbhould I also post to jasp blog? KornbrotBayesRepeated21Feb2010.zip

kornbrot commented 4 years ago

should have apoligized for sending wrong file apologies files in last message should be correct really appreciate help

TimKDJ commented 4 years ago

@JohnnyDoorn could you have another look?

kornbrot commented 4 years ago

apologies for using wrong email address do I need to pu a pull request on this? want to do righ thing and appreciate help

JohnnyDoorn commented 4 years ago

Hi @kornbrot,

Could you maybe tell me more about your data and how you gathered it? There is a lot of anomalies going on, such as an extremely violated sphericity assumption (chi square of 1700), and barely any variation between the factor levels (see the descriptives plots). I think the frequentist RM ANOVA is still somewhat able to handle this, but I think the anomalies make the numerical algorithms crash, so JASP cannot compute any Bayes factors.

I will discuss this further with team members tomorrow.

Kind regards, Johnny

kornbrot commented 4 years ago

Thanks

The project aims to compare the effects of using standard ANOVA (normal level under analysis factor) as opposed to a Generalised Linear Mixed Model with either profit or login link on a response variable that is a proportion. It is well known that GLMM is recommended for proportions. So we took 21 data sets with proportion as response variable and in Stage 1 conducted ANOVA, GLMM profit and GLMM logo and obtained all means at grand, and main effect level and at interaction level if there were any interactions, 383 mean proportions in all The differences are small (as you point out)l, but we wanted to be able to document them, so as to advise whether GLMMs are worth the bother. Of course, since the means are in fact mean proportions we should be doing GLMMs for the Stage 2 analyses I am asking you about, which looks at effect of analysis and also at type of mean as a between factor [but problem are in repeated factor analysis as Bayes fails even without a between factor]. We performed frequentist GLMM on this data, it shows the same effect as frequentist repeated ANOVA. BUT I was curious to know how Bayes would work. Am still hoping for BAYES GLMM, but this is non-trivial as I discovered when I tried to implement in R using GLMER. Was hoping that JASP would be a 'simple' short cut. JASP does indeed work fine for at least 1 of the Stage 1 data sets.

You are right. Main problem is non-sphericity. In this design all 3 variables are extremely highly correlated.

I note that JASP frequentist repeated measures gets same results as SSPSS ‘within subject effects’. SPSS multivariate gives different F values and DOES take into account non-sphericity. In this data set there is no reason to expect sphericity, would expect different non-zero pairwise correlations, for each pair. If Bayes is assuming sphericity, then problems might be expected., Need to formulate problem as a repeated MANOVA, not available in JASP. Some people, seem to think repeated MANOVA is flawed, but don’t understand exactly why. SPSS GLMM with data in long form and unstructured covariance matrix, linear link, Satherwaite apromimation, gives EXACTLY same as SPSS repeated, multivariate on the wide format.

If Bayes repeated is assuming sphericity, then it is not worth pursuing further.

Would you like to see draft Ms?

So much appreciate your help. Have learnt a lot. Clearly, am going to have to struggle with R again Sorry if I wasted your time by not noting need for sphericity

Best

Diana

On 25 Feb 2020, at 16:50, JohnnyDoorn notifications@github.com<mailto:notifications@github.com> wrote:

Hi @kornbrothttps://github.com/kornbrot,

Could you maybe tell me more about your data and how you gathered it? There is a lot of anomalies going on, such as an extremely violated sphericity assumption (chi square of 1700), and barely any variation between the factor levels (see the descriptives plots). I think the frequentist RM ANOVA is still somewhat able to handle this, but I think the anomalies make the numerical algorithms crash, so JASP cannot compute any Bayes factors.

I will discuss this further with team members tomorrow.

Kind regards, Johnny

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/jasp-stats/jasp-issues/issues/598?email_source=notifications&email_token=ABF5WKSGFGTXWP4BLA4CTWDREVD5PA5CNFSM4KLYIB5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEM4UJ6A#issuecomment-590955768, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABF5WKSCKIK5GK25RKT23FDREVD5PANCNFSM4KLYIB5A.


University of Hertfordshire College Lane, Hatfield, Hertfordshire AL10 9AB, UK +44 (0) 170 728 4626 +44 (0) 7403 18 16 12 d.e.kornbrot@herts.ac.ukmailto:d.e.kornbrot@herts.ac.uk http://dianakornbrot.wordpress.com/ http://go.herts.ac.uk/Diana_Kornbrot/ skype: kornbrotme Save our in-boxes! http://emailcharter.org


kornbrot commented 4 years ago

Note JASP does not do multi-variate repeated measure, freuqentist or Bayes. Since multivariate is what I need, please do not spend any more time on this.

Suggestion: Warn users of rpearted ANOVA that mulitvariate is not avaialble should I put suggestion in separate request? will close as soon as reesponse to this quert

Thanks for all your help.

EJWagenmakers commented 4 years ago

Yes, suggesting the multivariate extension is a good idea! EJ

tomtomme commented 10 months ago

The original jasp-file still does not finish computation. JASP engine sees no progress on computing this, but also no error message or crash with 0.18.2 beta

@kornbrot - if you still agree that this issue should not be tackled anymore, can you close this issue?

RM MANOVA is already tracked here: https://github.com/jasp-stats/jasp-issues/issues/1660