Error in defining groups

questions concerning anlysis/theory using program DENSITY and R package secr. Focus on spatially-explicit analysis.

Error in defining groups

Postby CHWarbington » Mon Sep 09, 2019 2:48 pm

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.
CHWarbington
 
Posts: 11
Joined: Fri Aug 09, 2019 5:40 pm

Re: Error in defining groups

Postby murray.efford » Sun Sep 29, 2019 5:43 am

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
murray.efford
 
Posts: 686
Joined: Mon Sep 29, 2008 7:11 pm
Location: Dunedin, New Zealand

Re: Error in defining groups

Postby CHWarbington » Sun Oct 06, 2019 1:40 pm

Thanks for the offer.
I am now going in a different direction with the data, so I don't anticipate trying groups again soon.
CHWarbington
 
Posts: 11
Joined: Fri Aug 09, 2019 5:40 pm


Return to analysis help

Who is online

Users browsing this forum: No registered users and 11 guests