[Statistical Analysis with R] Data Analysis
1. Metric(continous) variable of interest
- Is there association between diet and BMI
- in children (ie. in the KiGGs dataset)
- and consider the effect of SES, well-being, family size and status (# of siblings, parents married/divorced etc.), lab parameters.
What to do for the investigation of this study Q?
- Create documentation/analysis/report file (R Markdown) and structure it.
- Data: Look at data dictionary, choose variables of interest (match study question to data and variables)
- Analysis plan: data preparation/check, choose appropriate statistical methods/statistics to investigate study question.
- Report structure: choose what and how to report.
Data: KiGGS03 06.RData.
Data dictionary: codeplan Kiggsneu.pdf.
Set the path and/or working directory in the beginning of the R Markdown file.
Fix R version (e.g. update at start of analysis using updateR() function in the installr package)
Main steps of the data analysis:
-
1 Import dataset from an external file (e.g. xls, txt, SPSS file).
-
2 Import check: check if dataset has been read correctly.
-
3 Save dataset as R dataset (.Rdata), e.g. as dat raw.Rdata.
-
4 Data check: check if data is correct/missing, and e.g. remove probands/variables or decide for imputation. Save corrected dataset as new dataset, e.g. dat corrected.Rdata.
-
5 Transform variables, compute new variables, and/or select subset for final analysis. Save this again as new dataset, e.g. as dat final.Rdata, and use in all further steps.
-
6 Descriptives to describe main characteristics of study sample.
-
7 Main analyses.
-
8 Secondary analyses.
-
9 Sensitivity analyses.
Work on:
-
1 Create documentation/report file (R Markdown) and structure it.
-
2 Data: Look at variable dictionary, choose variables of interest
(match study question to data and variables)
-
3 Analysis plan: data preparation/check, choose appropriate statistical methods/statistics to investigate study question.
-
4 Report structure: choose what and how to report.
-
5 Data check: check if data is correct/missing, and e.g. remove
probands/variables or decide for imputation. Save corrected dataset.
-
6 Transform variables, compute new variables, and/or select subset for final analysis. Save this again as new dataset.
-
7 Descriptives to describe main characteristics of study sample.
-
8 Main analyses.
-
9 Secondary, sensitivity analyses.
in Markdown, note in the first part of the