Skip to content

Myrle13/R-Studio

Repository files navigation

R Studio Assignment

Question 1:

surg.dat will be used. A medical research team wants to investigate the survival time of patients that have a particular type of liver operation as part of their treatment.

blood Blood clotting Index prognosis Prognosis Index enzyme Enzyme function Index liver Liver function Index age Age of the patient, in years gender Gender of the patient, (Male of Female) survival Survival time of the patient after surgery (in days)

  • Produce a scatterplot of the data and comment on the features of the data and possible relationships between the response and predictors and relationships between the predictors themselves.
  • Compute the correlation matrix of the dataset and comment.
  • Fit a model using all the predictors to explain the survival response. Conduct an F-test for the overall regression
  • Write down the mathematical multiple regression model for this situation, defining all appropriate parameters and the Hypotheses for the Overall ANOVA test of multiple regression.
  • Produce an ANOVA table for the overall multiple regression model (One combined regression SS source is sufficient).
  • Using model selection procedures discussed in the course, find the best multiple regression model that explains the data.
  • Validate your final model and comment why it is not appropriate to use the multiple regression model to explain the survival time.
  • Re-fit the model using log(survival) as the new response variable.
  • Validate your final model with the log(survival) response.

Question 2:

kml.dat will be used. A car manufacturer wants to study the fuel efficiency of a new car engine. It wishes to account for any differences between the driver and production variation. The manufacturer randomly selects 5 cars from the production line and recruits 4 different test drivers.

kmL The observed efficiency of the car in km/L over a standard course car The specific car (labelled 1, 2, 3, 4 or 5) driver The driver of the car (labelled A, B, C, D)

  • Is the design balanced or unbalanced?
  • Construct two different preliminary graphs that investigate different features of the data and comment.
  • Analyse the data, stating null and alternative hypothesis for each test, and check assumptions.
  • State your conclusions about the effect of driver and car on the efficiency kmL. These conclusions are only required to be at the qualitative level and can be based off the outcomes of the hypothesis tests in and the preliminary plots in b.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors