Basic - T-Test -> Grouping Factor Must have Exactly 2 Levels

前端 未结 3 1827
误落风尘
误落风尘 2020-12-15 00:51

I am relatively new to R. For my assignment I have to start by conducting a T-Test by looking at the effect of a politician\'s (Conservative or Labour) wealth on their real

3条回答
  •  悲&欢浪女
    2020-12-15 01:47

    I was having a similar problem and did not realize given the size of my dataset that one of my y's had no values for one of my levels. I had taken a series of gene readings for two groups and one gene had readings only for group 2 and not group 1. I hadn't even noticed but for some reason this presented with the same error as what I would get if I had too many levels. The solution is to remove that y or in my case gene from my analysis and then the error is solved.

提交回复
热议问题