Difference between revisions of "POPs in Baltic herring"
From Testiwiki
m (→Answer) |
(corrections to the model) |
||
Line 9: | Line 9: | ||
POP concentrations in Baltic sea fish have been measured from samples collected in EU-kalat project. | POP concentrations in Baltic sea fish have been measured from samples collected in EU-kalat project. | ||
+ | |||
+ | [http://en.opasnet.org/en-opwiki/index.php?title=Special:RTools&id=3f19VvkjoNHloJCn Model run 11.2.2016] | ||
<rcode graphics=1> | <rcode graphics=1> | ||
Line 22: | Line 24: | ||
mo <- textConnection("model{ | mo <- textConnection("model{ | ||
− | + | for( i in 1 : N ) { | |
− | TCDD[i] ~ dlnorm(muOfLogTCDD, 1/sigmaOfLogTCDD^2 ) | + | TCDD[i] ~ dlnorm(muOfLogTCDD, tau)#1/sigmaOfLogTCDD^2 ) |
− | + | } | |
− | + | tau ~ dunif(0.001, 1000) | |
− | muOfLogTCDD ~ dnorm(meanOfLogTCDD , (0.001*(1/sdOfLogTCDD^2))) | + | #sigmaOfLogTCDD ~ dunif( 0.001, 1000 ) #*sdOfLogTCDD , 1000*sdOfLogTCDD ) |
− | muOfTCDD <- (exp(muOfLogTCDD +sigmaOfLogTCDD^2/2)) | + | muOfLogTCDD ~ dnorm(0, 0.001) # dnorm(meanOfLogTCDD , (0.001*(1/sdOfLogTCDD^2))) |
− | modeOfTCDD <- (exp(muOfLogTCDD-sigmaOfLogTCDD^2)) | + | #muOfTCDD <- (exp(muOfLogTCDD +sigmaOfLogTCDD^2/2)) |
− | sigmaOfTCDD <- (sqrt(exp(2*muOfLogTCDD+sigmaOfLogTCDD^2)*(exp(sigmaOfLogTCDD^2)-1))) | + | #modeOfTCDD <- (exp(muOfLogTCDD-sigmaOfLogTCDD^2)) |
+ | #sigmaOfTCDD <- (sqrt(exp(2*muOfLogTCDD+sigmaOfLogTCDD^2)*(exp(sigmaOfLogTCDD^2)-1))) | ||
} | } | ||
") | ") | ||
− | N <- nrow(dat) | + | #N <- nrow(dat) |
− | LogTCDD <- log(dat$result+1) #+1 because of negative log values | + | #LogTCDD <- log(dat$result+1) #+1 because of negative log values |
− | TCDD <- 10^(LogTCDD-1) | + | #TCDD <- 10^(LogTCDD-1) |
+ | TCDD <- dat$Result + 0.0001 | ||
+ | N <- length(TCDD) | ||
dataList = list( | dataList = list( | ||
− | + | TCDD = dat$Result + 0.0001, | |
− | + | N = length(TCDD) | |
− | + | # meanOfLogTCDD = mean(LogTCDD), | |
− | + | # sdOfLogTCDD = sd(LogTCDD) | |
) | ) | ||
− | jags <- jags.model(mo, data = dataList, n.chains = 4, n.adapt = | + | jags <- jags.model(mo, data = dataList, n.chains = 4, n.adapt = 1000) |
close(mo) | close(mo) | ||
− | update(jags, | + | update(jags, 1000) |
− | out <- coda.samples(jags, c(' | + | out <- coda.samples(jags, c('tau', 'muOfLogTCDD'), nrow(dat)) # Stores a posterior sample |
plot(out) | plot(out) | ||
Revision as of 13:36, 11 February 2016
This page is a variable.
The page identifier is Op_en2583 |
---|
Moderator:Nobody (see all) Click here to sign up. |
Give your opinion to the peer rating of the content of this page. |
Upload data
|
Contents
Question
What are the concentrations of persistent organic pollutants (POPs) in Baltic sea fish.
Answer
POP concentrations in Baltic sea fish have been measured from samples collected in EU-kalat project.
Rationale
See also
References