STA4809_2022_TL_016_0_B - 6th Assessment

pdf

School

University of South Africa *

*We aren’t endorsed by this school

Course

4809

Subject

Statistics

Date

Nov 24, 2024

Type

pdf

Pages

3

Uploaded by ChancellorFang8501

Report
Define tomorrow. university of south africa Tutorial letter 016/0/2022 Nonparametric Regression STA4809 Year module Department of Statistics ASSESSMENT 06 STA4809/016/0/2022
ASSESSMENT 06 Unique Nr.: 893542 Fixed closing date: 14 November 2022 Instructions (1) Use R Markdown to compile your solutions. (2) Your solutions must have the full R codes and outputs of all questions. (3) Discuss the relevant R outputs that are related to a specific question. QUESTION 1 [15 marks] The Bissell data reported by (Bissell, 1972) 1 , which is also available in sm R package as a data frame bissell , contains the length (in metres) and the number of observed flaws in each of 32 rolls of cloth. Write the R script to perform PLRT via simulations to assess linearity in the relationship between number of flaws detected (Flaws) and length of each roll (Length). Consider a maximum of three values of h in a reasonable range and, for each of them, execute your R script. Plot the correspond- ing significance trace. Do these curves provide a consistent view of the evidence on linearity? Why? Explain. QUESTION 2 [35 marks] The forest-sub.dta data is on environmental degradation across countries. The dataset contains a measure of deforestation, a measure of democracy (-10 to 10) and a measure of GDP per capita. Scholars in international relations often debate whether the effect of this democracy scale is constant. As a result, some analysts recode the scale to dummy variables for democracy (6 to 10) and autocracy (-6 to -10). The main objective here is to investigate whether splines can capture the effect of democracy on deforestation. (a) Use a scatterplot to examine the relationship between democracy and deforestation. What model do you recommend to describe this relationship? Why? (4) (b) Fit a spline model to the data and discuss the results. (8) (c) Add confidence bands to the scatterplot and discuss the result. (3) 1 Bissell, A. F. (1972). A negative binomial model with varying element sizes. Biometrika , 59, 435-41. 2
STA4809/016/0/2022 (d) Compare the spline model that you fitted in part (b) with a (i) linear, (4) (ii) quadratic and (4) (iii) logarithmic models. (4) (e) Which model do you prefer from the four models fitted in parts (b) and (d)? Substantiate your answer using model comparison criteria or conducting statistical tests. (4) (f) Does the spline model that you have fitted in part (b) reveal anything substantive about the effect of democracy? (2) (g) What does it imply if the effect of democracy on deforestation is linear as opposed to nonlin- ear? (2) Note : The forest-sub.dta data is available on the module web-site under ”Additional Resources”. Once you have downloaded and saved it on your computer, say in C: derive in folder STA4809, you can open it in R using the following R code: library(haven) forest <- read_dta(’C:/STA4809/forest-sub.dta’) If you do not have the R package haven you must install it before using the above R code. [50] 3
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help