Error in data.frame(object = as.numeric(names(model$fitted)), pdot = pdot) : arguments imply differing number of rows: 0, 85

9 views
Skip to first unread message

antom...@gmail.com

unread,
Mar 10, 2022, 3:51:52 PMMar 10
to distance-sampling
Hi! I am trying to do density estimates with the Distance package. The first model I tested seems to fit but with the second model, using the same data I get a warning. I copy and paste the output below. 

 ad16.hr<-ds(ad16, key="hr", truncation = 400, adjustment = NULL, formula = ~1
+             ,convert.units = 0.001)
Fitting hazard-rate key function
Key only model: not constraining for monotonicity.
AIC= 1013.593
> ad16.hr.s<-ds(ad16, key="hr", truncation = 400, adjustment = NULL, formula = ~size
+               ,convert.units = 0.001)
Fitting hazard-rate key function
  Model failed to converge.
Error in data.frame(object = as.numeric(names(model$fitted)), pdot = pdot) :
  arguments imply differing number of rows: 0, 85
Any ideas of the reason for this problem?
Regards
Antonela

Eric Rexstad

unread,
Mar 11, 2022, 2:26:42 AMMar 11
to antom...@gmail.com, distance-sampling
Antonela

The second model uses group size as a covariate in the detection function.  The software reports that estimates of the detection function parameters could not be computed because the maximum likelihood algorithm did not converge.

This often occurs when covariates are in the detection function.  One possible remedy might be to use log(size)​as the covariate in the detection function.

From: distance...@googlegroups.com <distance...@googlegroups.com> on behalf of antom...@gmail.com <antom...@gmail.com>
Sent: 10 March 2022 20:51
To: distance-sampling <distance...@googlegroups.com>
Subject: {Suspected Spam} [distance-sampling] Error in data.frame(object = as.numeric(names(model$fitted)), pdot = pdot) : arguments imply differing number of rows: 0, 85
 
--
You received this message because you are subscribed to the Google Groups "distance-sampling" group.
To unsubscribe from this group and stop receiving emails from it, send an email to distance-sampl...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/distance-sampling/3555e241-98f3-4a67-83c0-22cc87b88cf1n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages