WRS2 ancova and duplicate 'row.names' error

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

WRS2 ancova and duplicate 'row.names' error

MatthewSmout
I'm trying to use the ANCOVA function in the WRS2 package.

The data has been read into the dataframe NewKDF via read.xlsx
The COND variable has been set as a factor (2 treatment groups) via the factor() command
HTAC is the covariate, and BDD is the outcome variable (both numeric)

head(NewKDF)
   COND   HTAC   BDD
1      1       10     2
2      2       10     6
3      1        8      0
4      1       15     2
5      1       10     1
6      2         7     2

ancova(BDD ~ COND + HTAC, data=NewKDF)

consistently produces the following error:

Error in 'row.names<-.data.frame'('*tmp*', value = value):
   duplicate 'row.names' are not allowed
In addition: Warning message:
non-unique value when setting 'row.names': 'HTAC = 11'

When I look at attributes(NewKDF)

$row.names
[1] 1 2 3 ... 37

All appear unique.

I don't understand why I'm getting the error above.

Any assistance appreciated, including alternative analysis options (Need a robust method to compare post-test means preferably controlling for baseline covariate).