0

I tried to use the "SimComp" package to perform a Williams test using :

SimTestDiff(data=data, grp="Groups", resp = NULL, type = "Williams", base = 1, ContrastMat = NULL, alternative = "two.sided", Margin = NULL, covar.equal = FALSE)

My data:

'data.frame':   20 obs. of  6 variables:
 $ Evian: num  4781 2745 3097 5072 4135 ...
 $ X1   : num  4154 4532 4136 4352 4018 ...
 $ X3   : num  4307 2220 3725 3576 5026 ...
 $ X10  : num  4307 2220 3725 3576 5026 ...
 $ X30  : num  4307 2220 3725 3576 5026 ...
 $ X100 : num  4307 2220 3725 3576 5026 ...

Where $Evian is the control.

I get as a result "unexpected input in "SimTestRat(data=data, grp=”" What's wrong?

I'm a beginner in R... Thank you in advance

  • While I don't have experience with this function/package, it's evident from the docs that your `grp` argument is wrong. There is no such column in your data.frame. There may be other problems down the road, but [without a reproducible example](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) it's hard to test it. – Roman Luštrik Sep 28 '16 at 13:02
  • In the description of the SimComp package it is written that grp is "a character string with the name of the grouping variable". One of the examples I can find : data(iris) comp <- SimTestDiff(data=iris, grp="Species", alternative="greater", Margin=1) summary(comp) – Heloise Oct 03 '16 at 15:27
  • Thinking a bit more about this - there may be an "illegal" quote somewhere. Make sure it's a regular `"` or `'`. Sometimes happens that people copy&paste the code from somewhere and they have some fancy quotes (`“`). – Roman Luštrik Oct 04 '16 at 13:31

0 Answers0