The Amahiki example dataset runs into numerical problems if you don't scale the MAS covariate in the following analysis. This seems strange to me as I thought mrds did its own internal scaling. I believe the issue of covariate scaling was looked into and changed in the recent work on the MCDS optimizer. The following example is likely indicative of a wider issue.
library(Distance)
data(amakihi)
trunc <- 82.5
conv <- convert_units("meter", NULL, "hectare")
#Seems to run OK with scaling
aukhn2 <- ds(data=amakihi, transect = "point", convert_units = conv,
key="hn", formula=~OBs+scale(MAS), truncation = trunc)
#Numerical problems without scaling
aukhn2 <- ds(data=amakihi, transect = "point", convert_units = conv,
key="hn", formula=~OBs+MAS, truncation = trunc)
On mrds 2.2.6 the last line gives
Model contains covariate term(s): no adjustment terms will be included.
Fitting half-normal key function
AIC= -Inf
Some variance-covariance matrix elements were NA, possible numerical problems; only estimating detection function.
The Amahiki example dataset runs into numerical problems if you don't scale the
MAS
covariate in the following analysis. This seems strange to me as I thoughtmrds
did its own internal scaling. I believe the issue of covariate scaling was looked into and changed in the recent work on the MCDS optimizer. The following example is likely indicative of a wider issue.On
mrds
2.2.6 the last line gives