predict.oSCR error

38 views
Skip to first unread message

Asia Murphy

unread,
Jun 18, 2025, 3:42:18 PM6/18/25
to oSCR
Hello, I was using the predict.oSCR function on a multisession telemetry-dependent model and received this error:

Error in oSCR.fit2(scr.fit$model, scrFrame = sf, ssDF = ss, costDF = cs,  :
  Error: Grid cells for telemetry fixes do not match rsfDF

Looking at the telemetry part of the SCRframe, the amount of cells match up to the rsfdf (12660 for session 1, etc.). Is there any fix for this? Am I doing something wrong?

Thanks!

Daniel Linden

unread,
Jun 18, 2025, 3:46:44 PM6/18/25
to oscr_p...@googlegroups.com
Hi Asia, can you share the str() results from some of your objects?  Specifically the rsfDF list and the telemetry object.

That error comes from checking the number of columns in your fixes object (which is rows = individuals, columns = rsf grid cells) to the number of rows in your rsfDF.

--
You received this message because you are subscribed to the Google Groups "oSCR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to oscr_package...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/oscr_package/ca853c72-124d-4bc2-8605-49053366a10fn%40googlegroups.com.

Asia Murphy

unread,
Jun 18, 2025, 8:07:43 PM6/18/25
to oSCR
I can't tell if this went through the first time, so sending again.

Yes, here's the strs, with some of the covariates removed since I have a lot.

Thanks!

> str(mod29$rsfDF)
List of 3
 $ :'data.frame': 12660 obs. of  45 variables:
  ..$ X           : num [1:12660] 541 542 542 542 542 ...
  ..$ Y           : num [1:12660] 3655 3655 3655 3655 3655 ...
  ..$ Tr          : int [1:12660] 1 1 1 1 1 1 1 1 1 1 ...
  ..$ cont        : num [1:12660] 0.254 0.331 0.682 0.383 -0.507 ...
  ..$ ASPECT      : num [1:12660] 0.897 0.667 1.089 0.389 -1.521 ...
  ..$ ELEV        : num [1:12660] 1.52 1.52 1.54 1.69 1.69 ...
 $ :'data.frame': 10795 obs. of  45 variables:
  ..$ X           : num [1:10795] 543 543 543 543 544 ...
  ..$ Y           : num [1:10795] 3655 3655 3655 3655 3655 ...
  ..$ Tr          : int [1:10795] 2 2 2 2 2 2 2 2 2 2 ...
  ..$ cont        : num [1:10795] 0.398 -0.392 -0.281 0.715 0.508 ...
  ..$ ASPECT      : num [1:10795] -1.23 -1.04 -1.11 -1.6 -1.1 ...
  ..$ ELEV        : num [1:10795] 0.962 0.691 0.52 0.313 0.101 ...
$ :'data.frame': 10795 obs. of  45 variables:
  ..$ X           : num [1:10795] 543 543 543 543 544 ...
  ..$ Y           : num [1:10795] 3655 3655 3655 3655 3655 ...
  ..$ Tr          : int [1:10795] 3 3 3 3 3 3 3 3 3 3 ...
  ..$ cont        : num [1:10795] 0.164 0.604 0.483 0.869 0.195 ...
  ..$ ASPECT      : num [1:10795] -1.23 -1.04 -1.11 -1.6 -1.1 ...
  ..$ ELEV        : num [1:10795] 0.962 0.691 0.52 0.313 0.101 ...



> str(mod29$scrFrame$telemetry)
List of 3
 $ fixfreq:List of 3
  ..$ : num [1:24, 1:12660] 0 0 0 0 0 0 0 0 0 0 ...
  ..$ : num [1:24, 1:10795] 0 0 0 0 0 0 0 0 0 0 ...
  ..$ : num [1:29, 1:10795] 0 0 0 0 0 0 0 0 0 0 ...
 $ cap.tel:List of 3
  ..$ : int [1:2] 2 3
  ..$ : int 1
  ..$ : int 1
 $ indCovs:List of 3
  ..$ :'data.frame': 24 obs. of  1 variable:
  .. ..$ sex: num [1:24] 0 0 1 1 1 1 0 0 0 0 ...
  ..$ :'data.frame': 24 obs. of  1 variable:
  .. ..$ sex: num [1:24] 1 1 1 0 0 0 0 0 0 0 ...
  ..$ :'data.frame': 29 obs. of  1 variable:
  .. ..$ sex: num [1:29] 0 1 1 1 0 0 0 0 0 0 ...

Daniel Linden

unread,
Jun 20, 2025, 10:03:27 AM6/20/25
to oscr_p...@googlegroups.com
Hmm, you might need to share the data/code with me because I agree that this error should not be happening based on the object dimensions.

Reply all
Reply to author
Forward
0 new messages