Generalised Linear Models essay writing services

GLM Coursework 2014/15

 

 

Deadline Friday 20th March 3pm (not 4pm)

 

 

Twenty  tobacco budworm  moths  of each sex were  exposed to different  doses of the  insecticide trans-cypermethrin. The numbers of budworm moths killed during a 3-day exposure were as follows for each sex (male,  female) and dose level in mg’s.

 

num.killed sex dose
1 1 male 1
2 4 male 2
3 9 male 4
4 13 male 8
5 18 male 16
6 20 male 32
7 0 female 1
8 2 female 2
9 6 female 4
10 10 female 8
11 12 female 16
12 16 female 32

 

Type the data  into R as follows. Press Enter at the end of each line including blank lines.

 

num.killed <-  scan()

1     4      9  13  18  20      0     2      6  10  12  16

 

 

sex   <-  scan()

0  0  0  0  0  0  1  1  1  1  1  1

 

 

dose   <-  scan()

1     2      4      8  16  32      1     2      4      8  16  32

 

Fit two models by doing the following.

 

ldose <-  log(dose)/log(2)  #convert to base-2 log   dose ldose      #have  a  look

y  <-  cbind(num.killed,  20-num.killed)                    #add  number  survived fit1 <-  glm(y  ~  ldose *  sex, family=binomial(link=probit))

fit2 <-  glm(y  ~  sex   + ldose,  family=binomial(link=probit))

 

You may also run the following lines and refer to the chi-square distribution table.

 

anova(fit1,test=”Chisq”)

 

 

summary(fit2)

 

No other R commands are allowed.

 

 

 

 

Hand in your answers to the following for assessment.

 

 

  1. What model is fitted in fit1? Write it formally and define all the terms. [4]

 

  1. How is the model in fit2 differ from that in fit1? [2]

 

  1. Does the model in fit1 fit the data  adequately? Use deviance to answer this question.                 [2]

 

  1. Can the  model  in fit1 be  simplified to the  model  in fit2?  Use  change in deviance to answer this question.                                                                                                                         [2]

 

  1. Can sex be  removed from the  model  in fit2?  Use  change in deviance to answer this ques- tion.               [2]

 

  1. What are the maximum  likelihood estimates of the parameters of the additive  model?   What are  their standard errors?  Test  the  significance of each parameter using  its estimate and standard error.                                                                                                                                     [4]

 

  1. How does the probability of a kill change with log dose and sex of the budworm moth accord- ing to the additive model?                                                                                                                  [4]

 

 

 

Warning.   The  coursework must  be  your  own.   Handing  in an  edited version of  someone else’s answers may result  in zero marks for all parties and even disciplinary action.

 

———————————————————————————————————————————-

 

 

SA Coursework 2014/15

 

Deadline Friday 20 March 3pm (not 4pm)

 

(a)  Derive the survival function S (t ) of a lifetime T E x p (λ). Find log S (t ) and comment on it. (b)  Calculate the Kaplan-Meier  estimate for each group in the following.

 

Treatment  Group:

6,6,6,6*,7,9*,10,10*,11*,13,16,17*,19*,20*,22,23,25*,32*,32*,34*,35

 

 

Control Group  (no   treatment):

1,1,2,2,3,4,5,5,8,8,8,8,11,11,12,15,17,22,23

 

Note that * indicates right censored data.

 

(c)  Use the log rank test to compare the two groups of lifetimes.

 

 

All the answers should  be obtained by hand.   Calculators may be used. Some intermediate steps should  be included.  You may check  your answers using R, but do not hand  in any R output.

 

Warning.   The  coursework must  be  your  own.   Handing  in an  edited version of  someone else’s answers may result  in zero marks for all parties and even disciplinary action.

Is this the question you were looking for? If so, place your order here to get started!