Hello. I am a beginner using INLA. I would greatly appreciate your help.
I am studying the relationship between "fish larvae count" and water temperature (°C). The larvae count in the samples was collected from various filtered volumes (m3). Instead of using relative abundance (larvae count/filtered volume), I am using the larvae count as the dependent variable to utilize known distributions like the Negative binomial or Poisson. The filtered volume was included as an "E".
1.- Is it correct to utilize the argument "E" in this case? Additionally, does "E" function effectively in a negative binomial distribution?
I am sharing with you the structure of my data and the model:
df <- data.frame(count_larvae = c(3,3,2,2,1,1,3,1,3,8,3,11,16,26,1,1,15),
filtrate_volume = c(237.0,256.0,259.2,232.3,262.2,189.6,210.3,
245.9,145.3,260.6,158.2,148.3,258.0,266.8,
237.5,192.8,116.0),
temperature = c(30.2,30.2,30.3,30.3,30.2,30.3,30.0,30.1,29.9,
29.6,29.8,29.6,29.7,29.3,29.9,29.9,29.7))
model <- inla(data = df,
E = filtrate_volume,
formula = count_larvae ~ temperature,
family = "nbinomial",
control.predictor = list(compute = TRUE,
link = 1),
quantiles = c(0.025, 0.5, 0.975),
control.compute = list(
return.marginals.predictor = TRUE,
mlik = TRUE,
config = TRUE))
2.- What units does the model output employ? The output is not in the form of larvae count, as they are continuous quantities even though link=1 is utilized. Consequently, I am unable to incorporate the observations (larvae count, discrete quantities) in the plot.
names(model$summary.fitted.values) <- paste("fit_",
names(model$summary.fitted.values),
sep = "")
df_output <- cbind(df, model$summary.fitted.values)
str(df_output)
'data.frame': 17 obs. of 9 variables:
$ count_larvae : num 3 3 2 2 1 1 3 1 3 8 ...Thanks in advance for your support.
Best regards,
Nadia L.
--
You received this message because you are subscribed to the Google Groups "R-inla discussion group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to r-inla-discussion...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/r-inla-discussion-group/ab81f445-4d57-4542-b49e-c6f49a07e0cdn%40googlegroups.com.