IT代写 MATH 523 Assignment 4 due on April 8 at noon.

Johanna G. Nešlehová Mc , Winter Term 2022
Generalized Linear Models MATH 523 Assignment 4 due on April 8 at noon.
Q1 The data
refer to a clinical trial for the treatment of small-cell lung cancer. Patients were randomly assigned to two treatment groups. The sequential therapy administered the same combination of chemotherapeutic agents in each treatment cycle; the alternating therapy had three different combinations, alternating from cycle to cycle. The response Y contains counts at each setting of the predictors therapy (“S” for sequential and “A” for alternating) and gender (“M” for male and “F” for female). The response categories are “Progressive Disease”, “No Change”, “Partial Remission”, “Complete Remission”. Open Assignment4.R and read in Y, therapy and gender into your own R script and proceed from there.

Copyright By PowCoder代写 加微信 powcoder

(1) Fit the baseline category logit model Y∼therapy to these data. Calculate the fitted probabilities for the four response categories and the two types of therapy. Calculate the odds ratio of a “Progressive Disease” vs. “No Change” for the two types of therapy along with a 95% confidence interval. Use these calculations to interpret the therapy effect.
(2) Fit the cumulative logit model Y∼therapy to these data. Calculate the cumu- lative odds ratio for the effect of therapy, along with a 95% confidence interval. Use it to interpret the therapy effect.
(3) Should gender be included in the model when (i) the baseline category logit model and (ii) the cumulative logit model is used?
Q2 The following data set describes the number of insolvent firms in Berlin between 1994 and 1996 (36 months):
(1) Consider time as an integer between 1 and 35 (variable case in the dataset) and fit a Poisson GLM with the intercept, case, and (case)2 as predictors. Display the residual plot and comment on whether you suspect overdispersion is present.
(2) How would the parameter estimates and the standard errors change if you were to fit a quasi-Poisson model with the same predictors instead?
Y<- cbind(c(28,4,41,12),c(45,12,44,7),c(29,5,20,3),c(26,2,20,1)) colnames(Y)<-c("ProgressiveDisease","NoChange", "PartialRemission","CompleteRemission") therapy <- c("S","S","A","A") gender <- rep(c("M","F"),2) library(catdata) data(insolvency) attach(insolvency) Johanna G. Nešlehová Mc , Winter Term 2022 Generalized Linear Models MATH 523 Assignment 4 due on April 8 at noon. (3) Using a suitable statistical test, assess whether there is evidence for overdisper- (4) Do you think that the number of insolvent firms changes over time? Use a suitable statistical test to answer this. Q3 (bonus question for extra marks) Load the data "BritishDoctors.txt", available on MyCourses under Assignments: read.table("BritishDoctors.txt",header=TRUE) The data records the number of coronary deaths for smokers and nonsmokers of various ages. For each age group and smoking status, the number of person-years (person) is also recorded (years of observation time for all persons in the study). (1) Fit a main-effects Poisson GLM using age and smoking as factors, accounting for person-years in an appropriate way. In discussing the lack of fit, show that this model assumes a constant ratio of nonsmokers to smokers coronary death rates over age, and evaluate how the sample ratio depends on age. (2) Explain why it is sensible to add a quantitative interaction of age and smoking. For this model, show that the log ratio of coronary death rates changes linearly with age. Assign suitable scores to age, fit the model and interpret. Due on April 8 at noon. 程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com