CS代写 You have been allocated data on Moodle according to your UID.

You have been allocated data on Moodle according to your UID.

The file includes randomly generated data from an experiment where scientists assessed the
cognitive capacity of people in (through a CONCENTRATION test), after lunch

Copyright By PowCoder代写 加微信 powcoder

time. Scientists then want to assess whether the levels of glucose in the blood (which
usually go up after eating), have an influence in the level of concentration (Question 1). For
logistics and funding reasons, scientists did not sample everywhere in HK but only a
subsample of the HK population taking surveys in 8 randomly selected MTR Stations across
HK. Scientist recorded the gender of each participant in order to assess its influence on the
overall capacity for concentration after lunch in people living in HK. Scientists were not
particularly interested in the effect of the glucose or local geographic influences (Stations) on
Concentration, but the influence of gender (Question 2).

The following variables were measured for each participant:

• Concentration (it is represented as a score).
• Blood Glucose (mg/dL).
• Station (MTR station where the test was conducted)
• Gender (male or female)

Question 1: Do levels of glucose in the blood influence the concentration of people in HK
after lunch?

Question 2: Does gender influence concentration capacity of people in HK after lunch?

Download the data file, import it into R and complete the assignment.

• Create specific hypotheses based on the above questions and relevant variables
(you need to explore the data and consider the experimental design and nature of the
variables).

• Define the model used for each question and justify its selection.
• Analyse the data using the model/method described above and following your

hypothesis (do not run tests that are irrelevant to your hypothesis but remember the
ones that are always needed as part of any statistical test discussed in class/tutorials).

• Include the corresponding statistical tables for each question, including sources of
variance and components (Sum of squares, mean of squares, df, F, P, etc).

• Use ggplot to graph the main figure for each question (Q1: influence of glucose on
concentration based on your model; Q2: gender influence on concentration based on
your model). Graphs should be in a clean and clear format. Two graphs in 1 Fig

• Write a 1-2 page report using your analyses and graphs that includes your hypotheses
and a concise interpretation of your results. A template for a report (asking a different
question with different data) has been provided on Moodle.

IMPORTANT NOTE: To avoid confusion, and to help you with the coding part, I made a sheet
cheat for the different models discussed in class and tutorials (below). Please follow this
summary of models and adjust them based on your ideas and criteria.

Sheet cheat for statistical modelling

# This finds the correlation coefficient between the TV and Sales columns of the data frame named
# advertising.
coefficient <- cor.test(advertising$TV, advertising$Sales) coefficient$estimate # This will create a box plot of the sales column from a data frame named advertising plot <- advertising %>%

ggplot(aes(sales, sales)) +

geom_boxplot()

# This creates a simple linear regression model where sales is the outcome variable and podcast is the
predictor variable. The data used is a data frame named train.
model <- lm(sales ~ podcast, data = train) # This creates a multiple linear regression model where the predictor variables are podcast and TV. model2 <- lm(sales ~ podcast + TV, data = train) # This creates an ANOVA one-way model as described in Chapter 11 pg 508 The R Book anova <- aov(yield ~ soil, data = data) # This creates an ANOVA one-way model as described in class anova <- lm(yield ~ soil, data = data) # This creates an ANOVA factorial model as described in Chapter 11 pg 517 The R Book factorial <- aov(gain ~ diet * supplement, data = data) # This creates an ANOVA factorial model as described in class factorial <- lm(gain ~ diet * supplement, data = data) factorial <- lm(gain ~ diet + supplement + diet*supplement, data=data) # This creates an ANCOVA model as described in Chapter 12 pg 545, The R Book ancova <- lm(Fruit ~ Grazing * Root, data = data) # This creates an ANCOVA model as described in class ancova <- aov(Fruit ~ Grazing * Root, data = data) # This creates a linear mixed model as described in Chapter 19 pg 685-686, The R Book mixed <- lme(fixed= yield ~ irrigation, random= 1|block, data = data) # This creates a linear mixed model as described in class mixed <- lmer(yield ~ irrigation + (1|block), data = data) # This creates a nested model (B nested in A) as described in class and Chapter 11 pg 519-520, The R Book nested <- aov(response ~ factorA + factorA/factorB, data = data) # This creates a nested model as described in class nested <- lm(response ~ factorA + factorA/factorB, data = data) Hypothesis/Hypotheses 2 ● Hypothesis is clear, specific, unambiguous and appropriate to the question. 1 ● Slight ambiguity in the hypothesis. 0 ● Hypothesis is not relevant to the question OR hypothesis is ambiguous/unclear. 4-5 ● Graphs clearly visualise the variables of interest and the analysis. ● Captions provide sufficient context to understand the graph and include appropriate statistics. 2-3 ● Graphs include unnecessary or distracting elements, or ● Captions do not provide enough context to understand the graph or are missing the appropriate statistics. 1 ● Graphs include unnecessary or distracting elements, and ● Captions do not provide enough context to understand the graph or are missing the appropriate statistics. 0 ● Graphs are difficult or impossible to understand or interpret ● Graphs are unrelated to the variables of interest and/or analysis. 4 ● Analyses are appropriate for your hypothesis. ● Appropriate descriptive statistics are used on chosen variables. 2-3 ● Analyses/descriptive statistics are appropriate but include slight errors. 0-1 ● Analyses and descriptive statistics are not appropriate for your hypothesis or results are wrong. Interpretation 4 ● Clear, appropriate and concise interpretation of analysis output 2-3 ● Interpretation overstates or understates the results of analysis or ● Interpretation is slightly unclear or ambiguous or ● Interpretation is slightly verbose 0-1 ● Interpretation overstates or understates the results of analysis and ● Interpretation is unclear or ambiguous or ● Interpretation is highly verbose 程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com