Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot Plot large BFlinearModel #81

Open
Nodragem opened this issue Nov 23, 2016 · 3 comments
Open

Cannot Plot large BFlinearModel #81

Nodragem opened this issue Nov 23, 2016 · 3 comments

Comments

@Nodragem
Copy link

Nodragem commented Nov 23, 2016

Hello,

Usually I have no problem to plot BFlinearModel, but in my last data analysis, I'm testing a model looking like that:

generalTestBF(initialDev ~ FixationSide*S1.Duration*Gap.Duration*Participant, 
                                 data=result, whichRandom="Participant")

on a dataset that uses trial-by-trial measures of initialDev on 11 participants (~65 measures by condition by Participant; that is 500-600 trials by participants).

R output is as follow when I plot the BFlinearModel:

Error in seq.default(floor(rng[1]), ceiling(rng[2]), 1) : 
  'from' cannot be NA, NaN or infinite
@Nodragem
Copy link
Author

I think that it is because the BF are reaching a too high value.
If I sort the BF and try to plot the 10 best (i.e. the 10 highest BF), it still throws the error.
If I divide the sorted BF by the maximum BF and then plot the 10 best, it works.

@richarddmorey
Copy link
Owner

The best I can do here is offer a better error message; when Bayes factors are that large, plotting them will be difficult.

@Nodragem
Copy link
Author

Yes, I was thinking about an error message that tells something like:

The list of models contains Bayes Factors too high to be plotted. 
One solution is to divide all the Bayes Factors by the Bayes Factor of a relevant model.
Examples:
modelBF / max(modelBF)
modelBF/ modelBF[8]

It probably needs some work to be more elegant but the idea is that the user knows what to do next.
Best.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants