Page 1 of 1

Error in defining groups

PostPosted: Mon Sep 09, 2019 2:48 pm
by CHWarbington
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.

Re: Error in defining groups

PostPosted: Sun Sep 29, 2019 5:43 am
by murray.efford
I'm unsure what's going on here. If it's still a problem maybe send the data to me offline so I can troubleshoot.
Murray

Re: Error in defining groups

PostPosted: Sun Oct 06, 2019 1:40 pm
by CHWarbington
Thanks for the offer.
I am now going in a different direction with the data, so I don't anticipate trying groups again soon.