Create data vectors x1 and x2 of length n 512 and with


The goal of this problem is to illustrate one of the most important features of the projection pursuit regression: its ability to detect interactions between the regressor variables. We first show that the function f(x1, x2) = x1x2 is easily written in the form used by the projection pursuit algorithm

1. Determine µ, β1 and β2 so that the identity:

holds for all xt = [x1, x2] with at 1 = [1, 1],  = [1, -1] and φ1(t) = t2 and φ2(t) = -t2.

2. Create data vectors X1 and X2 of length n = 512 and with entries forming independent samples from the uniform distribution U(-1, +1) over the interval [-1, 1]. Create the vector Y according to the formula:

Where ? = { ?j}j=1,...512 is a Gaussian white noise (i.e. a sequence of independent identically distributed normal random variables with mean zero) with standard deviation σ = .2. Give a scatterplot of Y against X1, and of Y against X2.

3. Run the projection pursuit algorithm to regress Y on X1 and X2 with a number of terms between min.term= 2 and max.term= 3. Produce scatterplots to visualize the graphs of the functions φj (t) found by the algorithm (if in doubt, read the on line help file for the function ppreg). Does that fit with the results of the computations done in question 1. above? Finally, do a scatterplot of Y versus Yˆ and another scatterplot of the residuals versus Yˆ and comment.

NB: recall that we use the notation t to denote the transpose of a vector or a matrix.

Request for Solution File

Ask an Expert for Answer!!
Financial Management: Create data vectors x1 and x2 of length n 512 and with
Reference No:- TGS01625668

Expected delivery within 24 Hours