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


STAT6083 Generalised Linear Modelling

Assignment


Task 1 [Total 65 marks, max. 9 pages]

Household income is a key variable in socio-economic studies.  Amongst others, it allows us to measure poverty and inequality, and to formulate policies aiming to reduce them. Unfortunately, collecting high quality data is particularly difficult. Non-response rates for this variable are typically higher than for other socio-economic variables, such as expen- diture.  Furthermore, even in the cases where a response is obtained, individuals tend to under report their income, particularly those in the right-tail of the distribution.  Given this scenario, a special survey has been designed to collect high quality data on income, expenditure and other socio-economic variables.  You have been given the task of using these data to develop a model to predict the income of a household. A description of the available variables is presented below. The data (1 200 observations) is included in the file income.txt.

 



id                     Household identifier

income             Gross weekly average household income (GBP)

expenditure     Total household expenditure (GBP) [Includes food, clothing, transport, housing, education, etc.]

type.inc           Type of income: 1 = Earned income, 2 = Other income

house.ten        Household tenure: 1 = Public rented, 2 = Private rented, 3 = Owned 

sex.hh            Sex of the household head: 1 = Male, 2 = Female

lab.force         Type of income: 1 = Full time working, 2 = Part time working,

3 = Unemployed, 4 = Economically inactive


 

hh.size           Household size: 1 = 1 person, 2 = 2 persons, 3 = 3 persons,

4 = 4 persons, 5 = 5 persons or more


hh.adults          Number of adults in the household: 1 = 1 adult, 2 = 2 adults,

3 = 3 adults, 4 = 4 adults or more



 

1. Produce and briefly discuss appropriate tables or plots to assess the distribution of  income and the relationship between income and expenditure, type.inc, house.ten, sex.hh, lab.force, hh.size and hh.adults.

[12 marks]

2. Regress  income on expenditure and present the estimated coefficients and their standard errors. Assess the regression assumptions using appropriate plots.

[4 marks]

3. Regress income on expenditure and expenditure squared, and present the esti- mated coefficients and their standard errors. Assess the regression assumptions using appropriate plots.

[4 marks]

4. Regress income on the natural logarithm of expenditure, and present the estimated coefficients and their standard errors.  Assess the regression assumptions using ap- propriate plots.

[4 marks]

5. Which of the above three models best describe the relationship between income and expenditure? Justify your answer and summarise the relationship between income and expenditure based on your preferred model.

[4 marks]

6. By considering the addition of the other variables and interactions to your preferred model from question 5, propose a suitable regression model for income.  Document your model building process and use diagnostic tools to assess the fit of your model.

[20 marks]

7. Describe the relationship between  income  and the explanatory variables in your model.

[12 marks]

8. Up to 5 marks will be allocated for general presentation of the results in the report. [5 marks]

 


Task 2 [Total 30 marks, max. 5 pages]

 

Using the data from Task 2:

 

1. Produce a scatterplot of income against expenditure and add a non-parametric estimate of the relationship between these two variables using local averages. Clearly state and justify your choice of bin width.

[4 marks]

2. Produce a scatterplot of income against expenditure and add a non-parametric estimate of the relationship between these two variables using kernel smoothing with a normal kernel. Clearly state and justify your choice of bandwidth.

[4 marks]

3. Produce a scatterplot of income against expenditure and add loess curves with degrees 1 and 2. For each degree, clearly state and justify your choice of span. Which of the two loess curves do you think better represents the relationship between these two variables? Justify your answer.

[6 marks]

4. Produce a scatterplot of income against expenditure and add a non-parametric estimate of the relationship between these two variables using natural splines. Clearly state and justify your choice of degrees of freedom.

[4 marks]

5. Produce a scatterplot of income against expenditure and add a non-parametric esti- mate of the relationship between these two variables using penalised splines. Clearly state and justify your choice of degrees of freedom.

[4 marks]

6. Which of the curves you have plotted do you think best represents the relationship between income and expenditure? Justify your answer and summarise in words the relationship between these two variables?

[4 marks]

7. Up to 4 marks will be allocated for general presentation of the results in the report. [4 marks]

 


Task 3 [Total 35 marks, max. 1 page]

 

The data file bmd.csv contains 169 records of bone densitometries (measurement of bone mineral density). The following variables were collected:

fracture   Hip fracture (1 = fracture, 0 = no fracture)

bmd             Bone mineral density measure in the hip

 

Using the theoretical results in the lecture notes and the Fisher-scoring algorithm, write your own R code to estimate a model to study the impact of bone mineral density in the hip on the probability of hip fracture. You are not allowed to use existing R functions that t models.  However, you are allowed to use other R functions, for example, those

required for matrix algebra computations.

Use your code to compute and present:

 

1. Point estimates of the model parameters.                                                   [10 Marks]

2. Estimates of the standard errors of the model parameters.

[5 marks]

3. Wald statistics and p-values for hypothesis testing.

[5 marks]

4. The value of the model deviance.

[5 marks]

5.  Compare the empty model to the model that controls for the effect of bmd.  Decide whether adding bmd improves the fit of the model. Present the results.

[5 marks]

6. Up to 5 marks will be allocated for presenting a well-structured code.

[5 marks]