pls help me
question 1
The econs data set contains monthly economic data collected from July 1967*April 2015. The data tracks personal consumption expenditure, savings, total population etc. and can be used as to understand the relationship between the US economy and how people participate in it. Variable Description date Date pce personal consumption expenditures, in billions of dollars pop total population, in thousands psavert personal savings rate unempmed median duration of unemployment, in weeks unemploy number of unemployed in thousands For this exercise, focus on the personal savings rate (psavert) variable in the econs data set and use it to do the following: a. Read the required data into R and convert the data to a time series. . Your time series data should be named psavert. b. Plot the psavert series and discuss the main features of the data. c. Compute and plot the 1, 3, and 10 year moving average for psavert and discuss the plots. d. What Box-Cox transformation would you select for the psavert series. Demonstrate and discuss the options you considered and how your reached a decision. ***Note: Three (3) seperate functions are required. Please use the function body and names for the input and returned variable(s) provided after each question. Please test all functions using the psavert series and provide the relevant codes demonstrating your tests. Function 1: Write your own function to implement simple exponential smoothing. The function should take arguments y (the time series), alpha (the smoothing parameter a) and so (the level at time 0). Your function should be called ts_ses() and it should return the forecast of the next observation in the series in a list. ts_ses - function(y, alpha, so) { # Your work here. # yjmt = forecast of the nest observation in the series return(list(y_hat = )) } Function 2: Modify Function 1 to return the sum of squared errors rather than the forecast of the next observation. Then use the optim function to nd the optimal values of a and so. You can nd help about the optim function in R by typing help (optim) or '?optim. Your function should be called ts_ses_sse() and it should return the required calculation(s) as demonstrated below. ts_ses_sse = functionCpar-s = C(alpha, 50), y) { # Your work here. # SSE = sum of squared errors return(list(SSE = )) } # Your optimization call for finding the optimal values of $\\alpha$ and $s_0$ using # optimO should be as follows: # To execute, please set alpha = 0, and s_0 = the first observation value # of the 'psaoert' series opt1m_pa;rams