# Bayes analysis for a linear trend.

Hi,

I'm trying to figure out the best way to test for a linear trend in a data-set I have.

the data consists of four variables, each represent an object size, and the dependent variables are reaction times for each object size.

My hypothesis is actually a null-hypothesis. I predict that reaction times will not increase as the object size increases (a linear trend). I could do a simple RM-ANOVA and test for a linear trend by using a comparison with linear weights (i.e. -3, -1, 1, 3) and see that the linear comparison is insignificant, but of course that is not a suitable way to support a null hypothesis, so a Bayesian analysis seems to me like a proper solution, by calculating the probability of receiving my data given that the null is correct.

Please advise me with a possible way to test for such a hypothesis using Bayes analysis in JASP, if there is one.

Thank you.

## Comments

Hi Zennie,

JASP does not do contrasts yet, but I think you should be able to compute what you want using Richard's BF package. I recall Richard also wrote a blogpost on this. Richard may be able to provide the details.

Cheers,

E.J.

"I predict that reaction times will not increase as the object size increases (a linear trend)"

Is the alternative really a

linearincrease? The first part of your hypothesis suggests an unstructured alternative (and do you meanaverageRT?), but you've couched it as a question about a linear trend. Are you sure that the linear trend is what you want to test, and not an ordinal hypothesis (eg, X1>X2>X3)?Thank you both.

Yes, I am sure that I want to test for a linear trend. As H1 states that the data should act linearly, H0 should be the lack of such trend.

Secondly, I am thinking that I can get away with a Bayesian linear regression. Can I use the RT data as the dependent variable, and the object size as the predictor and calculate the Bayes factor for the linear regression? A high BF(01) should indicate a high probability that the data does not align linearly. If not, why is it different from calculating a linear trend using contrasts?

Thank you again.

You can create the contrasts you want and define them as predictors, then use lmBF to test them.