- A toxicologist was interested in the effects of an insecticideon the mortality of a certain type of beetle. Six groups of beetleswere exposed to various concentrations (C) of the insecticide. Atthe end of the experiment dead beetles in each group werecounted.
concentration | 10.8 | 11.6 | 12.1 | 12.6 | 13.1 | 13.5 |
death | 15 | 24 | 26 | 24 | 29 | 29 |
group size | 50 | 49 | 50 | 50 | 50 | 49 |
Consider the logistic regression model
logit [P(death at concentration C)] = β0 + β1 ×C
- Write down the contribution to the likelihood function from theï¬rst group (that is, the group with death=15, size=50 and C =10.8).
- Re-write the above for the log-likelihood function.
- Write down the contribution to the likelihood function from thelast group (that is, the group with death=29, size=49 and C =13.5).
- Re-write the above for the log-likelihood function.
- Use proc fcmp to write a SAS program that computes thelog-likelihood function for the above application. In other words,your function accepts two numbers as values of β0 and β1, andoutputs the log-likelihood function evaluated at the prescribedinput values. Use the testing values β0 = 2 and β1 = 3 to make surethat you function works properly (it should give you a value of−5795.3).
- Use SAS proc logistic to ï¬nd the ML estimates and thecorresponding maximized log-likelihood function value. Use your ownfunction developed in part (5) to verify the SAS results.
- By adding or subtracting 10% from the ML estimates, you cancreate four pairs of (β0,β1). Compute the log-likelihood functionfor all these 4 pairs of parameter values. Can you ï¬nd a largerlog-likelihood function value than that evaluated at the MLestimates? Why?
2) Revisit the toxicology example: six groups of beetles wereexposed to various concentrations
(C) of the insecticide. At the end of the experiment deadbeetles in each group were counted.
concentration | 10.8 | 11.6 | 12.1 | 12.6 | 13.1 | 13.5 |
death | 15 | 24 | 26 | 24 | 29 | 29 |
group size | 50 | 49 | 50 | 50 | 50 | 49 |
Consider the logistic regression model
logit[P(death at concentration C)] = β0 + β1 X C
- Under the assumption β1 = 0, write down the log-likelihoodfunction (of _0 alone).
- Write a SAS program to draw the above log-likelihoodfunction.
- Use SAS to find the ML estimate β0 under the assumption β1 =0.
- Use your own SAS program to find the maximized log-likelihoodfunction value at the above ML estimate of _0. Compare your resultswith what SAS reports.
- Using results from Homework 2, calculate the likelihood ratiotest statistics for testing H0 : β1 = 0 vs. HA : β1 ≠0.
- What is the p-value of the above?
- Calculate the OR comparing two concentrations, one of which is0:4 units higher than the other.
- Calculate the estimated probability of beetle death atconcentration C = 12:4.
- Use SAS to draw a graph relating probability of beetle death toconcentration.