Difference between revisions of "Goherr: Fish consumption study"

From Testiwiki
Jump to: navigation, search
(Bayes model)
(Preprocessing: surv preprocessing added)
Line 85: Line 85:
 
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. The code stores a data.frame named survey.
 
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. The code stores a data.frame named survey.
 
* Model run 13.4.2017 [http://en.opasnet.org/en-opwiki/index.php?title=Special:RTools&id=1QsyOMpBHrvY0H2o]
 
* Model run 13.4.2017 [http://en.opasnet.org/en-opwiki/index.php?title=Special:RTools&id=1QsyOMpBHrvY0H2o]
 +
* Model run 20.4.2017 [http://en.opasnet.org/en-opwiki/index.php?title=Special:RTools&id=JuLynAzoCuvu0U3g] (contains surv and helping vectors)
  
 
<rcode name="preprocess2" label="Preprocess (only for developers)">
 
<rcode name="preprocess2" label="Preprocess (only for developers)">
Line 174: Line 175:
 
oprint(head(survey))
 
oprint(head(survey))
  
objects.store(survey)
+
agel <- as.character(unique(survey$Ages))
cat("Data.frame survey was stored.\n")
+
countryl <- sort(as.character(unique(survey$Country)))
 +
genderl <- sort(as.character(unique(survey$Gender)))
 +
fisl <- c("Salmon", "Herring")
 +
 
 +
# Interesting fish eating questions
 +
surv <- survey[c(1,3,158,16,29,30,31,46:49,86,95:98)]
 +
colnames(surv)
 +
#[1] "Country"                      "Gender"                     
 +
#[3] "Ages"                          "Fish eating"                 
 +
#[5] "How often eat fish"            "Salmon eating"               
 +
#[7] "Baltic salmon"                "How often Baltic salmon"     
 +
#[9] "How much Baltic salmon"        "How often side Baltic salmon"
 +
#[11] "How much side Baltic salmon"  "Eat Baltic herring"         
 +
#[13] "How often Baltic herring"      "How much Baltic herring"     
 +
#[15] "How often side Baltic herring" "How much side Baltic herring"
 +
 
 +
# For estimating distributions, we should
 +
#1 remove people with Fish eating = No (142)
 +
#2 merge Eat Baltic herring = I don't know with No (How often BH = NA always)
 +
#3 merge Baltic salmon = NA with No (because they usually have answered BH questions)
 +
 
 +
oprint(table(is.na(rowSums(sapply(surv[4:16], as.numeric)))))
 +
# BUT: there are so many missing values, that we just model BH and BS separately now.
 +
 
 +
surv <- as.data.frame(lapply(surv, FUN = function(x) as.integer(x))) # Coerce to integers
 +
surv[is.na(surv[[12]]) | surv[[12]] == 3 , 12] <- 1 # Eat Baltic herring: I don't know --> No
 +
 
 +
# Row numbers for respondents that have eaten fish, Baltic salmon, and Baltic herring
 +
eatfish <- surv[[4]] %in% 1
 +
eatsalm <- !(surv[[7]] %in% 0 | is.na(rowSums(surv[7:11])))
 +
eatherr <- surv[[12]] %in% 1 & !is.na(rowSums(surv[13:16]))
 +
 
 +
# Oletetaan, että covarianssimatriisi on vakio kaikille maille ja sukupuolille yms
 +
# mutta keskiarvo on spesifi näille ja kysymykselle.
 +
 
 +
#qlen <-  c(4,2,2,2,6,2,2,7,7,7,5,2,7,7,7,5) # Number of options in each question
 +
# qlen not needed when dbinom is not used.
 +
 
 +
agel
 +
countryl
 +
genderl
 +
fisl
 +
 
 +
objects.store(survey, surv, agel, countryl, genderl, fisl, eatfish, eatsalm, eatherr)
 +
cat("Data.frames survey and surv, and vectors agel, countryl, genderl, fisl, eatfish, eatsalm, eatherr were stored.\n")
 
</rcode>
 
</rcode>
  

Revision as of 13:33, 20 April 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. The code stores a data.frame named survey.

  • Model run 13.4.2017 [1]
  • Model run 20.4.2017 [2] (contains surv and helping vectors)

+ Show code

Analyses

Error creating thumbnail: Unable to save thumbnail to destination
Correlation matrix of all questions in the survey (answers converted to numbers).

Model must contain predictors such as country, gender, age etc. Maybe we should first study what determinants are important? Model must also contain determinants that would increase or decrease fish consumption. This should be conditional on the current consumption. How? Maybe we should look at principal coordinates analysis with all questions to see how they behave.

Also look at correlation table to see clusters.

Some obvious results:

  • If reports no fish eating, many subsequent answers are NA.
  • No vitamins correlates negatively with vitamin intake.
  • Unknown salmon correlates negatively with the types of salmon eaten.
  • Different age categories correlate with each other.

However, there are also meaningful negative correlations:

  • Country vs allergy
  • Country vs Norwegian salmon and Rainbow trout
  • Country vs not traditional.
  • Country vs recommendation awareness
  • Allergy vs economic wellbeing
  • Baltic salmon use (4 questions) vs Don't like taste and Not used to
  • All questions between Easy to cook ... Traditional dish

Meaningful positive correlations:

  • All questions between Baltic salmon ... Rainbow trout
  • How often Baltic salmon/herring/side salmon/side herring
  • How much Baltic salmon/herring/side salmon/side herring
  • Better availability ... Recommendation
  • All questions between Economic wellbeing...Personal aims
  • Omega3, Vitamin D, and Other vitamins

Study plan:

  • Determinants

+ Show code

Bayes model

  • Model run 3.3.2017. All variables assumed independent. [3]
  • Model run 3.3.2017. p has more dimensions. [4]
  • Model run 25.3.2017. Several model versions: strange binomial+multivarnormal, binomial, fractalised multivarnormal [5]
  • Model run 27.3.2017 [6]
  • Other models except multivariate normal were archived and removed from active code 29.3.2017.
  • Model run 29.3.2017 with raw data graphs [7]
  • Model run 29.3.2017 with salmon and herring ovariables stored [8]
  • Model run 13.4.2017 with first version of coordinate matrix and principal coordinate analysis [9]

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