Dear all,
I'm trying to fit a dataset with multiple non-zero count data time series. About 250 locations, sampled once a month (6 winter months) during 30 years. About 34% of the design has a non-zero count. Every location has at least 5 years (8 observations) with non-zero counts, the median location as 18 years (49 observations) with non-zero counts.
The full model has a binomial component to fit the probability of non-zero counts. The idea is to fit a type 0 zero inflated distribution with a variable point mass of zero's.
The model (below the text) runs fine when I include a global trend (cyear), global seasonal effect (imonth), average location effect (location) and a change in season effect by year (imonth2).
I'd like to allow for a changing trend by location (cyear2). That model fails to fit. I get a bunch of "GMRFLib_2order_approx: rescue NAN/INF values in logl for idx=46787". After some time the model is killed.
Any suggestions?
Best regards,
Thierry
inla(
count ~ 0 + intercept +
f(
cyear, model = "rw1", scale.model = TRUE,
hyper = list(theta = list(prior = "pc.prec", param = c(1, 0.01)))
) +
f(
cyear2, model = "rw1", constr = TRUE, replicate = ilocation,
hyper = list(theta = list(prior = "pc.prec", param = c(1, 0.01)))
) +
f(
imonth, model = "rw1", constr = TRUE,
hyper = list(theta = list(prior = "pc.prec", param = c(0.5, 0.01)))
) +
f(
imonth2, model = "rw1", constr = TRUE, replicate = cyear,
hyper = list(theta = list(prior = "pc.prec", param = c(0.5, 0.01)))
) +
f(
location, model = "iid", constr = TRUE,
hyper = list(theta = list(prior = "pc.prec", param = c(1, 0.01)))
),
data = truncated_count, family = "zeroinflatednbinomial0",
control.compute = list(config = TRUE, waic = TRUE),
control.predictor = list(link = 1),
control.family = list(
list(hyper = list(theta2 = list(initial = -20, fixed = TRUE)))
)
)
ir. Thierry Onkelinx
Statisticus / Statistician
Vlaamse Overheid / Government of Flanders
INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RESEARCH INSTITUTE FOR NATURE AND FOREST
Team Biometrie & Kwaliteitszorg / Team Biometrics & Quality Assurance
thierry....@inbo.beHavenlaan 88 bus 73, 1000 Brusselwww.inbo.be///////////////////////////////////////////////////////////////////////////////////////////
To call in the statistician after the experiment is done may be no more than asking him to perform a post-mortem examination: he may be able to say what the experiment died of. ~ Sir Ronald Aylmer Fisher
The plural of anecdote is not data. ~ Roger Brinner
The combination of some data and an aching desire for an answer does not ensure that a reasonable answer can be extracted from a given body of data. ~ John Tukey
///////////////////////////////////////////////////////////////////////////////////////////