Friedman test unreplicated complete block design error

后端 未结 6 1993
北海茫月
北海茫月 2021-01-18 15:16

I\'m having trouble running a Friedman test over my data. I\'m trying to run a Friedman test using this command:

friedman.test(mean ~ isi | expId, data=monoS         


        
6条回答
  •  心在旅途
    2021-01-18 15:27

    I had this exact error too with my dataset. It turns out that the function friedman.test() accepts data frames (fx those created by data.frame() ) but not tibbles (those created by dplyr and other modern tools). The solution for me was to convert my dataset to a dataframe first.

    D_fri <- D_all %>% dplyr::select(FrustrationEpisode, Condition, Participant)
    D_fri <- as.data.frame(D_fri)
    str(D_fri) # confirm the object should now be a 'data.frame'
    friedman.test(FrustrationEpisode ~ Condition | Participant, D_fri)
    

提交回复
热议问题