BIOS 6618 Labs and Practice Problems
This page includes our class’ weekly labs and practice problems relating to the lecture material. The practice problems are meant to provide additional examples of methods and coding approaches that can be used in completing the homework assignments and projects. The BIOS 6618 Recitation page also includes responses to specific questions submitted by students that may provide additional examples and information.
Week/TopicsWeek 2 |
Lab and Practice Problem DescriptionThree ways you can create vectors, different examples of using for loops, and the derivation of E(X) for an exponential distribution. The practice problems examine estimating the sample mean and sample variance for a Poisson distribution across a range of sample sizes, the theoretical and asymptotic results for some distributions, and the central limit theorem for chi-squared distributed data. |
Links |
|
Week 3 Hypothesis Testing and Power |
An introduction to writing your own functions in R and using the apply family of functions in place of for loops. The practice problems work on subsetting a data frame of US states by various criteria, as well as an exercise identifying the relationship of how the various quantities in a power calculation change based on our lectures. |
Lab; Practice Problems; Solutions |
|
Week 4 Diagnostic Testing and 2x2 Tables |
Exploring power calculations with known and unknown SD and creating plots across a range of scenarios using ggplot2. Practice problems examine RD/RR/OR, categorical data hypothesis testing, ROC curves, and sensitivity/specificity. |
Lab; Practice Problems; Solutions |
|
Week 5 Bootstrap Sampling and Nonparametric Tests |
Subsetting data and if/else statements are covered before exploring a simulation study to evaluate the challenges of multiple comparisons. The practice problems give more exposure to bootstrap and permutation testing. |
Lab; Practice Problems; Solutions |
|
Week 6 Simple Linear Regression Intro and Derivations |
A visual example of bootstrap and permutation resampling, as well as for the distribution of the ratio of sampling variances. The practice problem focuses on the derivation of the sums of squares for our linear regression model. |
Lab; Practice Problems; Solutions |
|
Week 7 SLR Diagnostics, Confidence/Prediction Intervals |
Lab walks through the Midterm Simulation Project template files. Practice problems relate to simple linear regression modeling and interpretation. |
Practice Problems; Solutions |
|
Week 8 SLR Examples, Log(Y) Transformation |
PROC REG provides a beautiful ANOVA table in its output, but R’s lm and glm do not. We discuss the ANOVA table in lab and how to create a function to generate your own. The practice problems cover diagnostic plot interpretation and simple linear regression models with different data transformations. |
Lab; Practice Problems; Solutions |
|
Week 9 Multiple Linear Regression and Matrix Approaches |
Diagnostic plots can be one of the most efficient ways to evaluate if your model assumptions for regression are met. In this lab we dive into some examples of good (and bad) diagnostic plots. The practice problems focus on a multiple linear regression problem with two binary and one continuous predictors using both existing functions and by coding your own matrices. |
Lab; Practice Problems; Solutions |
|
Week 10 Categorical Predictors and ANOVA |
Lab introduces the Final Data Analysis Project. The practice problems are on the ANOVA lectures and including categorical variables in your regression models. |
Practice Problems; Solutions |
|
Week 11 Confounding, Mediation, Interactions, and Polynomials |
The partial F-test can be used for both an overall F-test of the model or to evaluate a single predictor (instead of the t-test), in lab we walk through an example contrasting these approaches. The practice problems touch on special topics relating to this week (confounding, mediation, interactions, polynomials, and GLHT). |
Lab; Practice Problems; Solutions |
|
Week 12 Model and Variable Selection, Outliers/Influential Points |
Interactions can be tricky to interpret, so we review an example using the FEV data set during lab. The practice problems examine influential points/outliers, model and variable selection, and a simulation study for model selection approaches. |
Lab; Practice Problems; Solutions |
|
Week 13 Segmented Regression, Quantile Regression, Splines, and Advanced Bootstraps |
There are so many cool things we can do with extensions to the topics we’ve covered this semester. This week we explore quantile regression, segmented regression, splines, and advanced bootstrap topics, with a focus on some of these topics during lab. The practice problems focus on quantile regression, splines, and segmented regression models. |
Lab TBD; Practice Problems; Solutions |
|
Week 14 Bayesian Linear Regression |
This week we introduce the Bayesian framework and see a linear regression example. Practice problems focus on re-analyzing data from our MLR examples with a Bayesian approach. |
Lab TBD; Practice Problems; Solutions |