Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

STAT 426 – Categorical Data Analysis

Homework 12

2022

Please submit your HW in output file  of R  Markdown.  Your output file should include all the R codes.

The aim of this assignment is to compare two oral treatments for toenail infection. Patients were evaluated for the degree of separation of the nail.  Patients were randomized into two treatments and were followed over 7 visits: four in the first year and yearly thereafter. The patients were not treated prior to the first visit, so this should be regarded as baseline.

1.  Compare the distribution of the outcome variable at baseline between treatment groups A and B.

 

2. Fit an additive generalized linear mixed effects model to all observations after baseline, with predictors treatment and a factor variable visit.  Compare the treatment effects and com- ment on the effect of time.

 

3. Now refit the model allowing for interactions between treatment and visit.   Provide an interpretation.

 

4. Now replace visit with the numerical variable month, and decide whether you need an inter- action term with treatment or not. Interpret the results.

 

5. Using the same model as in 4 refit the data but with making the assumption that all rows in the dataset are independent (no random effects). Compare the results of 4 and 5.