Difference between revisions of "Goherr: Fish consumption study"
(→Bayes model) |
(→Bayes model) |
||
Line 224: | Line 224: | ||
* Model run 3.3.2017. p has more dimensions. [http://en.opasnet.org/en-opwiki/index.php?title=Special:RTools&id=ZmbNUuZeb7UOf8NP] | * Model run 3.3.2017. p has more dimensions. [http://en.opasnet.org/en-opwiki/index.php?title=Special:RTools&id=ZmbNUuZeb7UOf8NP] | ||
* Model run 25.3.2017. Several model versions: strange binomial+multivarnormal, binomial, fractalised multivarnormal [http://en.opasnet.org/en-opwiki/index.php?title=Special:RTools&id=pKe0s2Ldm1mbIVuO] | * Model run 25.3.2017. Several model versions: strange binomial+multivarnormal, binomial, fractalised multivarnormal [http://en.opasnet.org/en-opwiki/index.php?title=Special:RTools&id=pKe0s2Ldm1mbIVuO] | ||
+ | * Moddel run 27.3.2017 [http://en.opasnet.org/en-opwiki/index.php?title=Special:RTools&id=2hY9p2r8CTJi3Qwq] | ||
<rcode name="bayes" label="Initiate Bayes model (for developers only)" graphics=1> | <rcode name="bayes" label="Initiate Bayes model (for developers only)" graphics=1> | ||
Line 287: | Line 288: | ||
################################################# | ################################################# | ||
cat("Version with both binomial and multivariate normal.\n") | cat("Version with both binomial and multivariate normal.\n") | ||
+ | ggplot(data.frame(A=1:2, B=1:2), aes(A, y=B))+geom_point()+ | ||
+ | labs(title="Version with both binomial and multivariate normal.") | ||
mod <- textConnection(" | mod <- textConnection(" | ||
Line 340: | Line 343: | ||
j.Omega.melt <- melt(j.Omega) | j.Omega.melt <- melt(j.Omega) | ||
ggplot(j.Omega.melt, aes(x = Iter, y = value, colour = as.character(Seed)))+ | ggplot(j.Omega.melt, aes(x = Iter, y = value, colour = as.character(Seed)))+ | ||
− | geom_line()+facet_grid(Q1 ~ Q2) | + | geom_line()+facet_grid(Q1 ~ Q2, scales = "free_y") |
samps.c <- coda.samples(jags, c('Omega','p'), 1000) | samps.c <- coda.samples(jags, c('Omega','p'), 1000) | ||
Line 347: | Line 350: | ||
############################################################ | ############################################################ | ||
cat("Version with multivariate normal.\n") | cat("Version with multivariate normal.\n") | ||
+ | ggplot(data.frame(A=1:2, B=1:2), aes(A, y=B))+geom_point()+ | ||
+ | labs(title="Version with multivariate normal.") | ||
mod <- textConnection(" | mod <- textConnection(" | ||
Line 384: | Line 389: | ||
########################################################### | ########################################################### | ||
cat("Version with multivariate normal and fractile conversion.\n") | cat("Version with multivariate normal and fractile conversion.\n") | ||
+ | ggplot(data.frame(A=1:2, B=1:2), aes(A, y=B))+geom_point()+ | ||
+ | labs(title="Version with multivariate normal and fractile conversion.") | ||
+ | |||
# Assume linearity in the responses, but it is artificially binned into survey answers. | # Assume linearity in the responses, but it is artificially binned into survey answers. | ||
Line 415: | Line 423: | ||
mu[j] ~ dnorm(0, 3) | mu[j] ~ dnorm(0, 3) | ||
} | } | ||
− | Omega[1:4,1:4] ~ dwish(S3[1:4,1:4], | + | Omega[1:4,1:4] ~ dwish(S3[1:4,1:4],S) |
surv.pred[1:4] ~ dmnorm(mu[1:4], Omega[1:4,1:4]) | surv.pred[1:4] ~ dmnorm(mu[1:4], Omega[1:4,1:4]) | ||
− | Opri[1:4,1:4] ~ dwish(S3[1:4,1:4], | + | Opri[1:4,1:4] ~ dwish(S3[1:4,1:4],S) |
} | } | ||
") | ") | ||
Line 461: | Line 469: | ||
################################################################3 | ################################################################3 | ||
cat("MODEL WITH BINOMIAL DISTRIBUTION ASSUMPTION.\n") | cat("MODEL WITH BINOMIAL DISTRIBUTION ASSUMPTION.\n") | ||
+ | ggplot(data.frame(A=1:2, B=1:2), aes(A, y=B))+geom_point()+ | ||
+ | labs(title="Version with binomial distribution assumption.") | ||
+ | |||
# Interesting fish eating questions | # Interesting fish eating questions |
Revision as of 13:25, 27 March 2017
This page is a variable.
The page identifier is Op_en7749 |
---|
Moderator:Arja (see all) |
This page is a stub. You may improve it into a full page, and then a rating bar will appear here. |
Upload data
|
Contents
Question
How Baltic herring and salmon are used as human food in Baltic sea countries? Which determinants affect on people’s eating habits of these fish species?
Answer
Survey data will be analysed during winter 2016-2017 and results will be updated here.
Rationale
Survey of eating habits of Baltic herring and salmon in Denmark, Estonia, Finland and Sweden has been done in September 2016 by Taloustutkimus oy. Content of the questionnaire can be accessed in Google drive. The actual data will be uploaded to Opasnet base on Octobere 2016.
The R-code to analyse the survey data will be provided on this page later on.
Data
Original datafile File:Goherr fish consumption.csv
Preprocessing
This code is used to preprocess the original questionnaire data from the above .csv file and to store the data as a usable variable to Opasnet base.
Bayes model
- Model run 3.3.2017. All variables assumed independent. [1]
- Model run 3.3.2017. p has more dimensions. [2]
- Model run 25.3.2017. Several model versions: strange binomial+multivarnormal, binomial, fractalised multivarnormal [3]
- Moddel run 27.3.2017 [4]
Calculations
This code calculates how much (g/day) Baltic herring and salmon are eaten based on an Bayesian model build up based on the questionnaire data.
Assumptions
The following assumptions are used:
Obs | Variable | value | Explanation | Result |
---|---|---|---|---|
1 | freq | 6 | times per year | 260 - 364 |
2 | freq | 5 | times per year | 104 - 208 |
3 | freq | 4 | times per year | 52 |
4 | freq | 3 | times per year | 12 - 36 |
5 | freq | 2 | times per year | 2 - 5 |
6 | freq | 1 | times per year | 0.5 - 0.9 |
7 | freq | 0 | times per year | 0 |
8 | amdish | 0 | grams / serving | 20 - 50 |
9 | amdish | 1 | grams / serving | 70 - 100 |
10 | amdish | 2 | grams / serving | 120 - 150 |
11 | amdish | 3 | grams / serving | 170 - 200 |
12 | amdish | 4 | grams / serving | 220 - 250 |
13 | amdish | 5 | grams / serving | 270 - 300 |
14 | amdish | 6 | grams / serving | 450 - 500 |
15 | ingridient | fraction | 0.1 - 0.3 | |
16 | amside | 0 | grams / serving | 20 - 50 |
17 | amside | 1 | grams / serving | 70 - 100 |
18 | amside | 2 | grams / serving | 120 - 150 |
19 | amside | 3 | grams / serving | 170 - 200 |
20 | amside | 4 | grams / serving | 220 - 250 |
Questionnaire
Show details | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Dependencies
The survey data will be used as input in the benefit-risk assessment of Baltic herring and salmon intake, which is part of the WP5 work in Goherr-project.
Formula
See also
Keywords
References
Related files
<mfanonymousfilelist></mfanonymousfilelist>