Skip to content

Difficulties fitting uniform detection function with no adjustments #130

@lenthomas

Description

@lenthomas

This may be related to #129.

I tried to see if I could recreate the problem in #129 with the book.tee data. I tried

library(Distance)
data(book.tee.data)
tee.data <- subset(book.tee.data$book.tee.dataframe, observer==1)
ds.model <- ds(tee.data, 4,  key = "unif", nadj = 0)
summary(ds.model)

but the line ds.model <- ds(tee.data, 4, key = "unif", nadj = 0) reported Fitting uniform key function with cosine(1,0) adjustments which made me suspicious of what was being fitted, and the line summary(ds.model) gave me Error in t(partial) %*% vcov : non-conformable arguments. Using nadj = 0 works for hn key function.

I saw in the help under the adjustment argument that A value of NULL indicates that no adjustments are to be fitted. so tried

ds.model <- ds(tee.data, 4,  key = "unif", adj = NULL)

This seems to get it to fit the right function, but then there is an error message:

Fitting uniform key function
Key only model: not constraining for monotonicity.
Error in abs(x) : non-numeric argument to mathematical function


All models failed to fit!

Error in ds(tee.data, 4, key = "unif", adj = NULL) : 
  No models could be fitted.

(apologies if these are two separate issues).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions