For normality, minimum two graphs. Note: If using R, for Levene's test, install the R package "car". Does the response variable need any transformation? Why? e) Compare vitamin D levels for country A and country B at a significance level of 5% using a t- test, one-way ANOVA, and regression. Compare the results of all three techniques. For one-way ANOVA use t-test (LSD. test). Plot t-test and regression. Note: use the "Question_1_Country" dataset for this question. If you are using R, for the LSD. test function, install the package "agricolae". f) Write down the contrast and its related hypotheses to compare country A with country B for their vitamin D levels. Perform the contrast both by hand-calculation and using a statistical package and compare the answers. g) Change the variable Age from a numerical variable to a categorical variable with two levels. You need to select the criteria for this categorising. However, make sure you have enough observations in each group. Compare the variances of these two levels using Levene's test: You may need to change the criteria for Age group membership a few times, to get an appropriate spread of observations across groups. Before categorising, a summary of the variable "Age" might be useful: summary(Vitamin_DSAge) Min. 1st Qu. Median Mean 3rd Qu. 20.00 36.00 44.00 41.62 47.00 R code for solution: New Age
For normality, minimum two graphs. Note: If using R, for Levene's test, install the R package "car". Does the response variable need any transformation? Why? e) Compare vitamin D levels for country A and country B at a significance level of 5% using a t- test, one-way ANOVA, and regression. Compare the results of all three techniques. For one-way ANOVA use t-test (LSD. test). Plot t-test and regression. Note: use the "Question_1_Country" dataset for this question. If you are using R, for the LSD. test function, install the package "agricolae". f) Write down the contrast and its related hypotheses to compare country A with country B for their vitamin D levels. Perform the contrast both by hand-calculation and using a statistical package and compare the answers. g) Change the variable Age from a numerical variable to a categorical variable with two levels. You need to select the criteria for this categorising. However, make sure you have enough observations in each group. Compare the variances of these two levels using Levene's test: You may need to change the criteria for Age group membership a few times, to get an appropriate spread of observations across groups. Before categorising, a summary of the variable "Age" might be useful: summary(Vitamin_DSAge) Min. 1st Qu. Median Mean 3rd Qu. 20.00 36.00 44.00 41.62 47.00 R code for solution: New Age
MATLAB: An Introduction with Applications
6th Edition
ISBN:9781119256830
Author:Amos Gilat
Publisher:Amos Gilat
Chapter1: Starting With Matlab
Section: Chapter Questions
Problem 1P
Related questions
Question
Expert Solution
Step by step
Solved in 9 steps with 12 images
Recommended textbooks for you
MATLAB: An Introduction with Applications
Statistics
ISBN:
9781119256830
Author:
Amos Gilat
Publisher:
John Wiley & Sons Inc
Probability and Statistics for Engineering and th…
Statistics
ISBN:
9781305251809
Author:
Jay L. Devore
Publisher:
Cengage Learning
Statistics for The Behavioral Sciences (MindTap C…
Statistics
ISBN:
9781305504912
Author:
Frederick J Gravetter, Larry B. Wallnau
Publisher:
Cengage Learning
MATLAB: An Introduction with Applications
Statistics
ISBN:
9781119256830
Author:
Amos Gilat
Publisher:
John Wiley & Sons Inc
Probability and Statistics for Engineering and th…
Statistics
ISBN:
9781305251809
Author:
Jay L. Devore
Publisher:
Cengage Learning
Statistics for The Behavioral Sciences (MindTap C…
Statistics
ISBN:
9781305504912
Author:
Frederick J Gravetter, Larry B. Wallnau
Publisher:
Cengage Learning
Elementary Statistics: Picturing the World (7th E…
Statistics
ISBN:
9780134683416
Author:
Ron Larson, Betsy Farber
Publisher:
PEARSON
The Basic Practice of Statistics
Statistics
ISBN:
9781319042578
Author:
David S. Moore, William I. Notz, Michael A. Fligner
Publisher:
W. H. Freeman
Introduction to the Practice of Statistics
Statistics
ISBN:
9781319013387
Author:
David S. Moore, George P. McCabe, Bruce A. Craig
Publisher:
W. H. Freeman