Goherr: Fish consumption study: Difference between revisions

From Opasnet
Jump to navigation Jump to search
(→‎Bayes model: version where p has more dimensions)
m (→‎Calculations: updated to take in latest eating predictions from Bayes model)
Line 434: Line 434:
# This is code Op_en7749/calculate_amount on page [[Goherr: Fish consumption study]]
# This is code Op_en7749/calculate_amount on page [[Goherr: Fish consumption study]]


library(OpasnetUtils)
objects.latest("Op_en7749", code_name = "bayes") #: pcd.pred, ans.pred, mu.pred
library(ggplot2)
library(reshape2)
library(rjags)
objects.latest("Op_en7748", code_name = "bayes") #: pcd.pred, ans.pred, mu.pred


pl <- melt(pcd.pred)
mul <- melt(mu.pred)
ql <- melt(ans.pred)
ql <- melt(ans.pred)


Line 461: Line 455:


salmon_dishtimes <-  Ovariable("salmon_dishtimes", data = data.frame(
salmon_dishtimes <-  Ovariable("salmon_dishtimes", data = data.frame(
                      subset(ql, ql$Question == "How often Baltic salmon" & ql$Seed == "S1"),
  subset(ql, ql$Fish == "Salmon" & ql$Question == "How often" & ql$Seed == "S1"),
                      Result = 1
  Result = 1
))
))


Line 468: Line 462:


salmon_dishamount <- Ovariable("salmon_dishamount", data = data.frame(
salmon_dishamount <- Ovariable("salmon_dishamount", data = data.frame(
                    subset(ql, ql$Question == "How much Baltic salmon" & ql$Seed == "S1"),
  subset(ql, ql$Fish == "Salmon" & ql$Question == "How much" & ql$Seed == "S1"),
                    Result = 1
  Result = 1
)) #salmon with dish amount per one serving
)) #salmon with dish amount per one serving


Line 475: Line 469:


salmon_sidetimes <- Ovariable("salmon_sidetimes", data = data.frame(
salmon_sidetimes <- Ovariable("salmon_sidetimes", data = data.frame(
                    subset(ql, ql$Question == "How often side Baltic salmon" & ql$Seed == "S1"),
  subset(ql, ql$Fish == "Salmon" & ql$Question == "How often side" & ql$Seed == "S1"),
                    Result = 1
  Result = 1
)) #salmon as such times / year
)) #salmon as such times / year


salmon_sidetimes@data$Question <- NULL
salmon_sidetimes@data$Question <- NULL
 
 
salmon_sideamount <- Ovariable("salmon_sideamount", data = data.frame(
salmon_sideamount <- Ovariable("salmon_sideamount", data = data.frame(
                      subset(ql, ql$Question == "How much side Baltic salmon" & ql$Seed == "S1"),
  subset(ql, ql$Fish == "Salmon" & ql$Question == "How much side" & ql$Seed == "S1"),
                      Result = 1
  Result = 1
)) #salmon as whole amount per one serving
)) #salmon as whole amount per one serving


Line 529: Line 523:


herring_dishtimes <-  Ovariable("herring_dishtimes", data = data.frame(
herring_dishtimes <-  Ovariable("herring_dishtimes", data = data.frame(
   subset(ql, ql$Question == "How often Baltic herring" & ql$Seed == "S1"),
   subset(ql, ql$Fish == "Herring" & ql$Question == "How often" & ql$Seed == "S1"),
   Result = 1
   Result = 1
))
))
Line 536: Line 530:


herring_dishamount <- Ovariable("herring_dishamount", data = data.frame(
herring_dishamount <- Ovariable("herring_dishamount", data = data.frame(
   subset(ql, ql$Question == "How much Baltic herring" & ql$Seed == "S1"),
   subset(ql, ql$Fish == "Herring" & ql$Question == "How much" & ql$Seed == "S1"),
   Result = 1
   Result = 1
)) #herring with dish amount per one serving
)) #herring with dish amount per one serving
Line 543: Line 537:


herring_sidetimes <- Ovariable("herring_sidetimes", data = data.frame(
herring_sidetimes <- Ovariable("herring_sidetimes", data = data.frame(
   subset(ql, ql$Question == "How often side Baltic herring" & ql$Seed == "S1"),
   subset(ql, ql$Fish == "Herring" & ql$Question == "How often side" & ql$Seed == "S1"),
   Result = 1
   Result = 1
)) #herring as such times / year
)) #herring as such times / year
Line 550: Line 544:


herring_sideamount <- Ovariable("herring_sideamount", data = data.frame(
herring_sideamount <- Ovariable("herring_sideamount", data = data.frame(
   subset(ql, ql$Question == "How much side Baltic herring" & ql$Seed == "S1"),
   subset(ql, ql$Fish == "Herring" & ql$Question == "How much side" & ql$Seed == "S1"),
   Result = 1
   Result = 1
)) #herring as whole amount per one serving
)) #herring as whole amount per one serving

Revision as of 10:28, 13 March 2017


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.

+ Show code

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.

+ Show code

Bayes model

  • Model run 3.3.2017. All variables assumed independent. [1]
  • Model run 3.3.2017. p has more dimensions. [2]

+ Show code

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.

+ Show code

Assumptions

The following assumptions are used:

Assumptions for calculations(-)
ObsVariablevalueExplanationResult
1freq6times per year260 - 364
2freq5times per year104 - 208
3freq4times per year52
4freq3times per year12 - 36
5freq2times per year2 - 5
6freq1times per year0.5 - 0.9
7freq0times per year0
8amdish0grams / serving20 - 50
9amdish1grams / serving70 - 100
10amdish2grams / serving120 - 150
11amdish3grams / serving170 - 200
12amdish4grams / serving220 - 250
13amdish5grams / serving270 - 300
14amdish6grams / serving450 - 500
15ingridientfraction0.1 - 0.3
16amside0grams / serving20 - 50
17amside1grams / serving70 - 100
18amside2grams / serving120 - 150
19amside3grams / serving170 - 200
20amside4grams / serving220 - 250

Questionnaire


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>

Goherr: Fish consumption study. Opasnet . [3]. Accessed 23 Nov 2024.