Skip to content

Exam

EXAM 😱

The participants who need credits must answer the following questions and send the results as an R script with comments to rachel.marcone@sib.swiss until latest Friday 15th of September 2023.

Download exercise material

Birthwt dataset

  1. Load the birthwt dataset from the MASS package and describe the variables that are reported in this dataset Explore the variability in this dataset and the relationship between the variables

  2. Fit a model to predict birth weight using mother’s age

  3. Check the regression assumptions

  4. Get the confidence interval and the prediction interval of the regression model

  5. Fit a model to predict birth weight using mother’s age, mother’s weight and smoking status Is this new model providing a better fit to the data ?

  6. Check the regression assumptions

  7. Fit a model to predict the variable birth weight below 2500 g using mother’s age what is the type of the response variable ? Can you use a simple linear regression model ? Why ?

  8. Fit a model to find the parameters which explain the probability of birth weight below 2500 g ?

  9. Check the regression assumptions

Fossil dataset

  1. Load the fossil dataset from the SemiPar package and describe the variables that are reported in this dataset Explore the variability in this dataset and the relationship between the variables.

  2. Fit a polynomial model to predict strontium ratio using age Use different degrees of polynomial model which model better fit your data ? Why ?

  3. Fit a smoothing spline to predict strontium ratio using age Does it look better than the best polynomial model ? Why ?

  4. Fit a local regression model (for instance using LOESS) to predict strontium ratio using age Does it look better than the smoothing spline ? Why ?

  5. Load the dragons dataset from Gabriela K Hajduk and Liam Bailey Explore the variability in this dataset and the relationship between the variables

  6. Fit a simple linear model to predict test score from body length and check the regression assumptions What could be wrong with this model ?

  7. Fit a model that would be more appropriate for this dataset to predict test score from body length Interpret the results of your model Check the regression assumptions