Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Contrasts for interactions in repeated measures ANOVA

Hi there,

I'm planning to run a 2-factorial study with a sequential design and I want to analyse it using a Bayesian repeated measures ANOVA in R (the BayesFactor-package). The design is a 3 (A vs. B. vs. C) x 5 (Materials) full crossed design. I have a strong reasons to believe that the outcome for each material will be either A > B > C (if the one hypothesis 1 holds) or A > B = C (if the other hypothesis 2 holds) and I want my test to be as informative as possible to save lab resources. I'm not so much interested in possible variations of the differences (A vs. B or B vs. C) across the 5 materials; I want to know for each of the materials which of the two hypothesis is more likely. My question now is, what is the right way to run this test.

Thanks to Richard Morey's instructive blog posts I know how to specify the equality constraint and I also know how to impose order constraints. Following the example in the blog posts I can easily specify both of my hypotheses for the main effect of my first factor.

My first idea then was to run individual ANOVA for each material, but my intuition is that this might disregard dependencies between the tests and render the Bayes Factors uninterpretable. Is this correct?

My second idea was to fit a model according to hypothesis 2 (A > B = C) including an interaction with the material factor and compare it to 5 more flexible models in which I allow B > C for one of the 5 materials each. Something like this (disregarding the order constraints):

# Define equality constraint
data$equality <- as.character(data$condition)
data$equality[data$equality == "C"] <- "B"
data$equality <- factor(data$equality)

equality_model <- anovaBF(
  old ~ equality * material + id
  , data = data
  , whichRandom = "id"
)

# Relax equality constraint for first material
data$order_1 <- as.character(data$condition)
data$order_1[data$order_1 == "C" & data$material != "1"] <- "B"
data$order_1 <- factor(data$order_1)

order_1_model <- anovaBF(
  old ~ order_1 * material + id
  , data = data
  , whichRandom = "id"
)

c(equality_model, order_1_model)

While this works, I'm uncertain whether this model really does (or even could do) what I hope. When I look at the posterior samples, effects for the deviation of condition B and C are given for all materials (e.g. columns by the name of material:order_1-2.&.B and material:order_1-2.&.C), while these should be the same for all but the first material. So, I assume this way of specifying the contrast introduces a fully crossed factorial model, but because for most materials there is no condition C the model simply recovers the priors. Thus, I suspect that this model specification is consistent with hypothesis 1 (A > B > C) rather than limiting this flexibility to material 1. In consequence, if I understand the statistics correctly this unnecessary flexibility will be punished by the Bayes Factor and will thus bias my analyses against hypothesis 1.

Another option would be to go the other way and compare the most flexible model (A > B > C for all materials) with a slightly more restricted model (A > B = C for one of the materials). This would, however, lead to the same problem except that now I suspect my analyses will favor the more flexible hypothesis 1.

My last idea was to define the constraints for both hypotheses for all materials and compare those models. This way, however, I don't learn anything about individual materials and I suspect this comparison to be less informative (larger expected N in the sequential design) than the more specific comparisons outlined above.

In conclusion, I'm not sure how to test my hypotheses and if this is possible with the BayesFactor package. Any help would be greatly appreciated.

Comments

  • edited 6:10PM

    Hi Frederik, how strongly related are the materials? If you found that an order held for one material, would this lead you to strongly suspect the same ordering for another?

  • edited April 2016

    Hi Richard,

    sorry for the late response, I missed your reply.

    To answer your question: No, it is entirely possible that the flexible model holds for some materials but the restricted model for others. I don't necessarily assume that the outcome for one material is informative for the others.

    It is, however, conceivable to categorize the materials in two groups and within each group the relationship you suggest could hold, if this helps.

    Cheers,
    Frederik

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games