Difference between revisions of "EU-kalat"
(→Bayes model for dioxin concentrations) |
(→Bayes model for dioxin concentrations) |
||
Line 164: | Line 164: | ||
::{{comment|# |Maybe we should just estimate TEQs until the problem is fixed.|--[[User:Jouni|Jouni]] ([[User talk:Jouni|talk]]) 19:37, 19 May 2017 (UTC)}} | ::{{comment|# |Maybe we should just estimate TEQs until the problem is fixed.|--[[User:Jouni|Jouni]] ([[User talk:Jouni|talk]]) 19:37, 19 May 2017 (UTC)}} | ||
* Model run 22.5.2017 with TEQdx and TEQpcb as the only Compounds [http://en.opasnet.org/en-opwiki/index.php?title=Special:RTools&id=2vTgALXXTzLgd4l1] | * Model run 22.5.2017 with TEQdx and TEQpcb as the only Compounds [http://en.opasnet.org/en-opwiki/index.php?title=Special:RTools&id=2vTgALXXTzLgd4l1] | ||
− | * Model run 23.5.2017 debugged [http://en.opasnet.org/en-opwiki/index.php?title=Special:RTools&id=rMSAZy6PSKzKhHwp] | + | * Model run 23.5.2017 debugged [http://en.opasnet.org/en-opwiki/index.php?title=Special:RTools&id=rMSAZy6PSKzKhHwp] [http://en.opasnet.org/en-opwiki/index.php?title=Special:RTools&id=1P7ZPBbghEfisEcH] |
<rcode name="bayes" label="Sample Bayes model (for developers only)" graphics=1> | <rcode name="bayes" label="Sample Bayes model (for developers only)" graphics=1> | ||
Line 176: | Line 176: | ||
library(car) # scatterplotMatrix | library(car) # scatterplotMatrix | ||
− | objects.latest("Op_en3104", code_name = "preprocess") # [[EU-kalat]] | + | objects.latest("Op_en3104", code_name = "preprocess") # [[EU-kalat]] eu, euRatio, indices |
+ | |||
+ | eu2 <- eu <- EvalOutput(eu) | ||
conl <- indices$Compound.TEQ2 | conl <- indices$Compound.TEQ2 | ||
Line 186: | Line 188: | ||
fisl | fisl | ||
− | |||
− | |||
replaces <- list( | replaces <- list( | ||
c("Chlorinated dibenzo-p-dioxins", "TEQdx"), | c("Chlorinated dibenzo-p-dioxins", "TEQdx"), | ||
Line 196: | Line 196: | ||
for(i in 1:length(replaces)) { | for(i in 1:length(replaces)) { | ||
− | + | levels(eu2$Compound)[levels(eu2$Compound)==replaces[[i]][1]] <- replaces[[i]][2] | |
− | |||
− | levels( | ||
} | } | ||
− | + | eu2 <- unkeep(eu2, prevresults = TRUE, sources = TRUE) | |
+ | eu2 <- oapply(eu2, cols = "TEFversion", FUN = "sum") # This goes wrong if > 1 TEFversion | ||
# Hierarchical Bayes model. | # Hierarchical Bayes model. | ||
# PCDD/F concentrations in fish. | # PCDD/F concentrations in fish. | ||
− | # It uses the sum of PCDD/F ( | + | # It uses the TEQ sum of PCDD/F (TEQdx) as the total concentration |
− | # | + | # of dioxin and TEQpcb respectively for PCB in fish. |
− | + | # TEQdx depends on age of fish, fish species and catchment area, | |
− | + | # but we only have species now so other variables are omitted. | |
− | # | + | # cong depends on fish species. |
− | + | eu3 <- eu2[eu2$Compound %in% conl & eu2$Fish %in% fisl & eu2$Matrix == "Muscle" , ] | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
eu3 <- reshape( | eu3 <- reshape( | ||
− | eu3, | + | eu3@output, |
v.names = "euResult", | v.names = "euResult", | ||
idvar = "THLcode", | idvar = "THLcode", | ||
Line 301: | Line 237: | ||
mod <- textConnection(" | mod <- textConnection(" | ||
model{ | model{ | ||
− | + | for(i in 1:S) { # s = fish sample | |
− | + | # below.LOQ[i,j] ~ dinterval(-cong[i,j], -LOQ[j]) | |
− | + | cong[i,1:C] ~ dmnorm(mu[fis[i],], Omega[fis[i],,]) | |
− | + | } | |
− | + | for(i in 1:Fi) { # Fi = fish species | |
− | + | for(j in 1:C) { | |
− | + | mu[i,j] ~ dnorm(mu1[j], tau1[j]) | |
− | |||
− | |||
− | |||
} | } | ||
+ | Omega[i,1:C,1:C] ~ dwish(Omega0[1:C,1:C],S) | ||
+ | pred[i,1:C] ~ dmnorm(mu[i,], Omega[i,,]) # Model prediction | ||
+ | } | ||
for(i in 1:C) { # C = Compound | for(i in 1:C) { # C = Compound | ||
mu1[i] ~ dnorm(0, 0.0001) | mu1[i] ~ dnorm(0, 0.0001) | ||
Line 317: | Line 253: | ||
pred1[i] ~ dnorm(mu1[i], tau1[i]) | pred1[i] ~ dnorm(mu1[i], tau1[i]) | ||
} | } | ||
− | + | Omega1[1:C,1:C] ~ dwish(Omega0[1:C,1:C],S) | |
} | } | ||
") | ") | ||
Line 328: | Line 264: | ||
Fi = Fi, | Fi = Fi, | ||
cong = log(cong), | cong = log(cong), | ||
− | |||
− | |||
fis = match(eu3$Fish, fisl), | fis = match(eu3$Fish, fisl), | ||
Omega0 = diag(C)/100000 | Omega0 = diag(C)/100000 | ||
Line 341: | Line 275: | ||
samps.j <- jags.samples( | samps.j <- jags.samples( | ||
jags, | jags, | ||
− | c('mu', 'Omega', 'pred', 'mu1', 'Omega1', 'tau1', 'pred1'), | + | c( |
+ | 'mu', # mean by fish and compound | ||
+ | 'Omega', # precision matrix by fish and compound | ||
+ | 'pred', # predicted concentration by fish and compound | ||
+ | # 'mu1', # mean prior for mu by compound | ||
+ | 'Omega1', # precision matrix by compound | ||
+ | # 'tau1', # precision for prior of all mu | ||
+ | 'pred1' # predicted concentration by compound | ||
+ | ), | ||
N | N | ||
) | ) | ||
dimnames(samps.j$mu) <- list(Fish = fisl, Compound = conl, Iter = 1:N, Chain = 1:4) | dimnames(samps.j$mu) <- list(Fish = fisl, Compound = conl, Iter = 1:N, Chain = 1:4) | ||
− | dimnames(samps.j$mu1) <- list(Compound = conl, Iter = 1:N, Chain = 1:4) | + | #dimnames(samps.j$mu1) <- list(Compound = conl, Iter = 1:N, Chain = 1:4) |
dimnames(samps.j$pred) <- list(Fish = fisl, Compound = conl, Iter = 1:N, Chain = 1:4) | dimnames(samps.j$pred) <- list(Fish = fisl, Compound = conl, Iter = 1:N, Chain = 1:4) | ||
− | + | #dimnames(samps.j$tau1) <- list(Compound = conl, Iter = 1:N, Chain = 1:4) | |
− | dimnames(samps.j$tau1) <- list(Compound = conl, Iter = 1:N, Chain = 1:4) | ||
dimnames(samps.j$pred1) <- list(Compound = conl, Iter = 1:N, Chain = 1:4) | dimnames(samps.j$pred1) <- list(Compound = conl, Iter = 1:N, Chain = 1:4) | ||
dimnames(samps.j$Omega) <- list(Fish = fisl, Compound = conl, Compound2 = conl, Iter=1:N, Chain=1:4) | dimnames(samps.j$Omega) <- list(Fish = fisl, Compound = conl, Compound2 = conl, Iter=1:N, Chain=1:4) | ||
Line 359: | Line 300: | ||
pred.mean = apply(samps.j$pred[,,,1], MARGIN = 1:2, FUN = mean), | pred.mean = apply(samps.j$pred[,,,1], MARGIN = 1:2, FUN = mean), | ||
pred.sd = apply(samps.j$pred[,,,1], MARGIN = 1:2, FUN = sd), | pred.sd = apply(samps.j$pred[,,,1], MARGIN = 1:2, FUN = sd), | ||
− | + | # mu1 = apply(samps.j$mu1[,,1], MARGIN = 1, FUN = mean), | |
− | + | # tau1 = apply(samps.j$tau1[,,1], MARGIN = 1, FUN = mean), | |
pred1.mean = apply(samps.j$pred1[,,1], MARGIN = 1, FUN = mean), | pred1.mean = apply(samps.j$pred1[,,1], MARGIN = 1, FUN = mean), | ||
pred1.sd = apply(samps.j$pred1[,,1], MARGIN = 1, FUN = sd) | pred1.sd = apply(samps.j$pred1[,,1], MARGIN = 1, FUN = sd) | ||
) | ) | ||
+ | |||
objects.store(conc.param, samps.j) | objects.store(conc.param, samps.j) | ||
Line 372: | Line 314: | ||
cat("Descriptive statistics:\n") | cat("Descriptive statistics:\n") | ||
− | + | # Leave only the main fish species and congeners and remove others | |
− | |||
− | |||
conl <- indices$Compound.PCDDF14 | conl <- indices$Compound.PCDDF14 | ||
− | |||
− | |||
eu <- eu[eu$Compound %in% conl & eu$Fish %in% fisl , ] | eu <- eu[eu$Compound %in% conl & eu$Fish %in% fisl , ] | ||
− | + | euRatio <- EvalOutput(euRatio) | |
− | |||
− | + | ggplot(eu@output, aes(x = euResult, colour=Compound))+geom_density()+ | |
+ | facet_wrap( ~ Fish, scales = "free_y")+scale_x_log10() | ||
+ | #stat_ellipse() | ||
ggplot(euRatio@output, aes(x = euRatioResult, colour = Fish))+geom_density()+ | ggplot(euRatio@output, aes(x = euRatioResult, colour = Fish))+geom_density()+ | ||
facet_wrap(~ Compound, scales = "free_y") | facet_wrap(~ Compound, scales = "free_y") | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
ggplot(melt(exp(samps.j$pred[,,,1])), aes(x=value, colour=Compound))+geom_density()+ | ggplot(melt(exp(samps.j$pred[,,,1])), aes(x=value, colour=Compound))+geom_density()+ | ||
facet_wrap( ~ Fish,scales = "free_y")+scale_x_log10() | facet_wrap( ~ Fish,scales = "free_y")+scale_x_log10() | ||
− | ggplot( | + | |
− | + | ggplot(melt(exp(samps.j$pred1[,,1])), aes(x=value, colour=Compound))+geom_density()+ | |
− | + | scale_x_log10() | |
+ | |||
+ | |||
+ | scatterplotMatrix(t(samps.j$pred[1,,,1]), main = "Predictions for all compounds for Baltic herring") | ||
+ | ## scatterplotMatrix(t(samps.j$mu1[,,1]), main = "Means for all compounds of the generic fish") | ||
+ | scatterplotMatrix(t(samps.j$pred1[,,1]), main = "Prediction for all compounds of the generic fish") | ||
+ | scatterplotMatrix(t(samps.j$pred[,1,,1]), main = "Predictions for all fish species for TEQdx") | ||
+ | scatterplotMatrix(t(samps.j$Omega[6,2,,,1]), main = "Predictions of Omega for pike and TEQpcb") | ||
coda.j <- coda.samples( | coda.j <- coda.samples( |
Revision as of 16:02, 23 May 2017
This page is a study.
The page identifier is Op_en3104 |
---|
Moderator:Arja (see all) |
Give your opinion to the peer rating of the content of this page. |
Upload data
|
EU-kalat is a study, where concentrations of PCDD/Fs, PCBs, PBDEs and heavy metals have been measured from fish
Contents
Question
The scope of EU-kalat study was to measure concentrations of persistent organic pollutants (POPs) including dioxin (PCDD/F), PCB and BDE in fish from Baltic sea and Finnish inland lakes and rivers. [1] [2] [3].
Answer
The original sample results can be acquired from Opasnet base. The study showed that levels of PCDD/Fs and PCBs depends especially on the fish species. Highest levels were on salmon and large sized herring. Levels of PCDD/Fs exceeded maximum level of 4 pg TEQ/g fw multiple times. Levels of PCDD/Fs were correlated positively with age of the fish.
Mean congener concentrations as WHO2005-TEQ in Baltic herring can be printed out with the Run code below.
Rationale
Data
Data was collected between 2009-2010. The study contains years, tissue type, fish species, and fat content for each concentration measurement. Number of observations is 285.
There is a new study EU-kalat 3, which will produce results in 2016.
Calculations
- Preprocess model 22.2.2017 [4]
- Objects used in Benefit-risk assessment of Baltic herring and salmon intake
- Model run 25.1.2017 [5]
- Model run 22.5.2017 with new ovariables euRaw, euAll, euMain, and euRatio [6]
- Model run 23.5.2017 with adjusted ovariables euRaw, eu, euRatio [7]
Bayes model for dioxin concentrations
- Model run 28.2.2017 [8]
- Model run 28.2.2017 with corrected survey model [9]
- Model run 28.2.2017 with Mu estimates [10]
- Model run 1.3.2017 [11]
- Model run 23.4.2017 [12] produces list conc.param and ovariable concentration
- Model run 24.4.2017 [13]
- Model run 19.5.2017 without ovariable concentration [14] ⇤# : The model does not mix well, so the results should not be used for final results. --Jouni (talk) 19:37, 19 May 2017 (UTC)
- Model run 22.5.2017 with TEQdx and TEQpcb as the only Compounds [15]
- Model run 23.5.2017 debugged [16] [17]
Initiate concentration
- Model run 19.5.2017 [18]
See also
References
- ↑ A. Hallikainen, H. Kiviranta, P. Isosaari, T. Vartiainen, R. Parmanne, P.J. Vuorinen: Kotimaisen järvi- ja merikalan dioksiinien, furaanien, dioksiinien kaltaisten PCB-yhdisteiden ja polybromattujen difenyylieettereiden pitoisuudet. Elintarvikeviraston julkaisuja 1/2004. [1]
- ↑ E-R.Venäläinen, A. Hallikainen, R. Parmanne, P.J. Vuorinen: Kotimaisen järvi- ja merikalan raskasmetallipitoisuudet. Elintarvikeviraston julkaisuja 3/2004. [2]
- ↑ Anja Hallikainen, Riikka Airaksinen, Panu Rantakokko, Jani Koponen, Jaakko Mannio, Pekka J. Vuorinen, Timo Jääskeläinen, Hannu Kiviranta. Itämeren kalan ja muun kotimaisen kalan ympäristömyrkyt: PCDD/F-, PCB-, PBDE-, PFC- ja OT-yhdisteet. Eviran tutkimuksia 2/2011. ISSN 1797-2981 ISBN 978-952-225-083-4 [3]