Difference between revisions of "Goherr: Fish consumption study"

From Testiwiki
Jump to: navigation, search
m (Calculations)
(Data: bug fixed)
Line 167: Line 167:
  
 
==== Calculations ====
 
==== Calculations ====
Does not work!
 
  
 
This code calculates how much (g/day) Baltic herring and salmon are eaten based on the questionnaire data.
 
This code calculates how much (g/day) Baltic herring and salmon are eaten based on the questionnaire data.
  
 
<rcode name="calculate amount">
 
<rcode name="calculate amount">
 +
# This is code Op_en7749/ on page [[Goherr: Fish consumption study]]
  
 
library(OpasnetUtils)
 
library(OpasnetUtils)
Line 181: Line 181:
  
 
survey$Row <- 1:nrow(survey)
 
survey$Row <- 1:nrow(survey)
survey$Ages <- ifelse(as.numeric(levels(survey$V4))[survey$V4] < 46, "18-45",">45")
+
survey$Ages <- ifelse(as.numeric(as.character(survey$Age)) < 46, "18-45",">45")
short <- survey[c("V1", "V3", "Row", "Ages")]
+
short <- survey[c("Country", "Gender", "Row", "Ages")]
  
salmon_dishtimes <- Ovariable("salmon_dishtimes", data = data.frame(
+
salmon_dishtimes <- Ovariable(
                    short,
+
  "salmon_dishtimes",  
                    Value = survey$V46,
+
  data = data.frame(
                    Result = 1
+
    short,
)) #salmon with dish times / year
+
    Value = survey[[46]],
 +
    Result = 1
 +
  )
 +
) #salmon with dish times / year
  
salmon_dishamount <- Ovariable("salmon_dishamount", data = data.frame(
+
salmon_dishamount <- Ovariable(
                    short,
+
  "salmon_dishamount",  
                    Value = survey$V47,
+
  data = data.frame(
                    Result = 1
+
    short,
)) #salmon with dish amount per one serving
+
    Value = survey[[47]],
 +
    Result = 1
 +
  )
 +
) #salmon with dish amount per one serving
  
  
salmon_dishtimesassump <- Ovariable("salmon_dishtimesassump", data = assumptions[assumptions$Variable == "V46" , c("Value", "Result")])
+
salmon_dishtimesassump <- Ovariable(
 +
  "salmon_dishtimesassump",  
 +
  data = assumptions[assumptions$Variable == "V46" , c("Value", "Result")]
 +
)
  
salmon_dishamountassump <- Ovariable("salmon_dishamountassump", data = assumptions[assumptions$Variable == "V47" , c("Value", "Result")])
+
salmon_dishamountassump <- Ovariable(
 +
  "salmon_dishamountassump",  
 +
  data = assumptions[assumptions$Variable == "V47" , c("Value", "Result")]
 +
)
  
 
amount <- Ovariable("amount",  
 
amount <- Ovariable("amount",  
                    dependencies = data.frame(Name = c(
+
  dependencies = data.frame(Name = c(
                      "salmon_dishamount",
+
    "salmon_dishamount",
                      "salmon_dishamountassump",
+
    "salmon_dishamountassump",
                      "salmon_dishtimes",
+
    "salmon_dishtimes",
                      "salmon_dishtimesassump"
+
    "salmon_dishtimesassump"
                    )),
+
  )),
                    formula = function(...) {
+
  formula = function(...) {
                     
+
   
                      out <- ((salmon_dishamount * salmon_dishamountassump) * (salmon_dishtimes * salmon_dishtimesassump))/ 365
+
    out <- ((salmon_dishamount * salmon_dishamountassump) * (salmon_dishtimes * salmon_dishtimesassump))/ 365
                      # Per vuosi -> per d
+
    # Per vuosi -> per d
                     
+
   
                      #result(out)[result(out) == 0] <- 0.01 # Ei jätetä nollia saantiin
+
    #result(out)[result(out) == 0] <- 0.01 # Ei jätetä nollia saantiin
                      return(out)
+
    return(out)
                    }
+
  }
 
)
 
)
  
 
temp1 <- EvalOutput(amount, forceEval = TRUE, N = 3)
 
temp1 <- EvalOutput(amount, forceEval = TRUE, N = 3)
 +
oprint(head(temp1@output))
 +
</rcode>
  
</rcode>
+
==== Assumptions ====
  
 
The following assumptions are used:  
 
The following assumptions are used:  
Line 261: Line 275:
 
==== Questionnaire ====
 
==== Questionnaire ====
  
 +
{{hidden|
 
<t2b name="Questions in the Goherr questionnaire" index="Index,Full question" obs="Question" unit="-">
 
<t2b name="Questions in the Goherr questionnaire" index="Index,Full question" obs="Question" unit="-">
 
V1 |Country |Country
 
V1 |Country |Country
Line 419: Line 434:
 
V156 |2. How old are you? Age category SWE, DK, EST |Age category other
 
V156 |2. How old are you? Age category SWE, DK, EST |Age category other
 
</t2b>
 
</t2b>
 +
}}
  
 
=== Dependencies ===
 
=== Dependencies ===

Revision as of 09:31, 2 January 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

Calculations

This code calculates how much (g/day) Baltic herring and salmon are eaten based on the questionnaire data.

+ Show code

Assumptions

The following assumptions are used:

Assumptions for calculations(-)
ObsVariableValueExplanationResult
1V46Nevertimes per year0
2V465 or more times per weektimes per year260 - 364
3V462 - 4 times per weektimes per year104 - 208
4V46once a weektimes per year52
5V461 - 3 times per monthtimes per year12 - 36
6V46A few times a yeartimes per year2 - 5
7V46less than once a yeartimes per year0.5 - 0.9
8V46times per year0
9V471/6 plate or below (50 grams)grams / serving20 - 50
10V471/3 plate (100 grams)grams / serving 70 - 100
11V471/2 plate (150 grams)grams / serving 120 - 150
12V472/3 plate (200 grams)grams / serving170 - 200
13V475/6 plate (250 grams)grams / serving220 - 250
14V47full plate (300 grams)grams / serving270 - 300
15V47overly full plate (500 grams)grams / serving450 - 500
16V47Not able to estimategrams / serving20 - 500
17V47grams0
18salmon_ingridientfraction0.1 - 0.3
19V48Nevertimes per year0
20V485 or more times per weektimes per year260 - 364
21V482 - 4 times per weektimes per year104 - 208
22V48once a weektimes per year52
23V481 - 3 times per monthtimes per year12 - 36
24V48A few times a yeartimes per year2 - 5
25V48less than once a yeartimes per year0.5 - 0.9
26V48times per year 0
27V491/6 plate or below (50 grams)grams / serving20 - 50
28V491/3 plate (100 grams)grams / serving70 - 100
29V491/2 plate (150 grams)grams / serving120 - 150
30V492/3 plate (200 grams)grams / serving170 - 200
31V495/6 plate (250 grams)grams / serving220 - 250
32V49Not able to estimategrams / serving20 - 250
33V49grams0

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 . [1]. Accessed 17 May 2024.