Closed mebrooks closed 10 years ago
Hi Molly,
I think what you're looking for is DATA_IVECTOR isn't it?
Mark
Yep. That fixed the problem. Thanks!
So the modified issue is that it's not documented on page 11 of TMB.pdf
While on the topic of this pdf page, I was curious if max() and min() are allowable basic calculations.
Searching in the API I find max() and min(), also for Type. But, as with all AD, it is the user's responsibility to formulate a function that is differentiable, and min/max can create problems.
DATA_IVECTOR has been added to TMB.pdf with my last pull request
Hi,
I'm unable to compile a model and I believe it is because I'm trying to access elements of one vector using elements of a data vector that are not integers.
The reason is that data is missing on some integer dates
Lynx rufus, from Idaho, GPPD data set 212.
obs=c(346,675,802,1478,1173,756,861,972,854,1161,1318,901,901, 1173,608,811,903,584,1179,1020,1129,966) obsdates=c(1956,1957,1958,1959,1960,1961,1962,1963,1964,1965,1970,1971, 1972,1973,1974,1975,1976,1977,1978,1979,1980,1981)
I've narrowed the problem down to this line of cpp code
nll+= -dpois(obs(i), exp(x(obsdates(i))), 1);
Even just nll+= exp(x(obsdates(i))); gives the same error.
I can send you the cpp file if it helps.
The first error I get is