Hello - This may be a basic question, but I am at a loss after trying multiple fixes.

I am trying to fit a secrlinear model using groups. I have a covariate named "Class" which is a categorical covariate for individuals with 5 levels (I have tried 0 - 4 and 1 - 5).

When I try to run a model, such as:

fit.Dg<- secr.fit(classdata, mask = rivermask, trace = FALSE, groups = "Class",

model = D ~ g, details = list(userdist = networkdistance))

I get the error :

Error in names(grouping) <- groups :

'names' attribute [1] must be the same length as the vector [0]

> traceback()

2: secr.design.MS(capthist, model, timecov, sessioncov, groups,

hcov, dframe, ignoreusage = details$ignoreusage, naive = T,

bygroup = !CL, contrasts = details$contrasts)

1: secr.fit(classdata, mask = rivermask, trace = FALSE, groups = "Class",

model = D ~ g, details = list(userdist = networkdistance))

I gather that the lengths of the two are meant to be the same, but there are no missing fields in the "Class" column of the data.

What am I missing?

thanks in advance.