Question: We simulate an example to demonstrate the strength of the LTS procedure in isolating outliers. Suppose your student number contains the numbers XXXXXXX, in order

We simulate an example to demonstrate the strength of the LTS procedure in isolating outliers. Suppose your student number contains the numbers XXXXXXX, in order that you generate data that is unique to your student number, include the student number in the starting seed for random number generation as shown below. After setting the initial seed, generate pairs of observations (ri, y, i = 1,2, ... .100) of which 75% are scattered around the line y = a + 2 and 25% are clustered around (6,4). set . seed (round (log (5230567) ) ) x75<-runif (75, 0.5,4) @75<-rnorm(75, mean=0, sd=0. 2) y75<-2+x75+e75 x25<-rnorm (25, mean=6, sd=0.5) y25<-rnorm (25, mean=4, ad=0.5) x<-c (x75, x25) y<-c(y75, y25) simuldata<-data. frame (x,y) Using the above commands as a starter and the help of R. produce and include in your assignment the following graphs and comment on your findings. i) Graph 1. Plot the x, y data to produce a scatterplot. Study the help and examples of the abline command to superimpose three regression lines: the ordinary least squares line, the default M-estimate line and the default LTS line using the 1qs function. Label the lines. ii) Graph 2. Using the instructions from the Computing exercise on robust regression you can override the default value using the quantile statement. Modify the default LTS regression by asking that only 75 residuals be included in the calculation. Redraw the graph with the new LTS regression line replacing the old one. iii) Graph 3. Suppose however that you did not know the amount of contamination and used 85 residuals instead of 75 in ii) (i.e., some outliers are still influencing the LTS fit). Try the LTS estimator again. Does it deliver a good fit? Attach the graph

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!