1

I tried to generate M-estimators for my data with the WRS2 package:

mcp2a(formula = SCORES ~ SCHOOL * METHOD, data = x, est = "median")

However, I keep getting the following error, and I don't know how to fix it. Any help is appreciated.

Error in x[[j]] : attempt to select less than one element in integerOneIndex

My code:

slamballais
  • 3,161
  • 3
  • 18
  • 29
Fahu
  • 11
  • 2
  • 1
    Hi, welcome to StackOverflow. It is generally a good idea to provide some data (see [here](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example)), and to make sure the code produces the error on that dataset. Your error arises from the way your data is set up, but without an idea of what your data looks like, it is hard to give any advice. – slamballais May 18 '21 at 18:25
  • SCHOOL consists of S and A, METHOD consists of Physical and Online, and SCORES are numeric data – Fahu May 19 '21 at 04:42

0 Answers0