I’ve tried using the function like this:
AUC(WM,time=Grand.trial,id=Feed,dv=Distance.moved)
but it results in this error message:
Error in (function(x, i, exact) if (is.matrix(i)) as.matrix(x)[[i]] else .subset2(x, :
object 'Feed' not found
I tried specifying the dataset for the object (WM$Feed instead of just Feed), but then I just get another error:
Error in .subset2(x, i, exact = exact) :
recursive indexing failed at level 2
Can anyone help? Other ways to compute the AUC (trapezoid method) are just as welcome
An example using the
ROCRpackage: