Question

Coffee Prices 2013 Coffee is the worlds second largest legal export commodity (after oil) and is the second largest source of foreign exchange for developing nations.The Unite States consumes about one-fifth of the worlds coffee. The International Coffee Organization (ICO) computes a coffee price index using Colombian, Brazilian, and a mixture of other coffee data. Data are provided for the daily ICO price index (in US dollars) from January 2013 to April 2013. You can find the data file on Blackboard. Download it and put it in the same folder as your R program file. Then, use the following command to read the data coffee <-read.table(Coffee_prices-2013.txt, sep \t, header-TRUE) and daily ICO price ndex (in uS ila 1. Make a time series plot (not scatterplot) of price against time. Use Coffee Price and Time as label for y-axis and r-axis, respectively. Which time series components are evident from the plot? 2. Smooth the coffee price series using simple moving averages (SMA) of length 2 and 8. Add the two smoothed curves (one in red and one in green) to the plot made in (a) and compare them 3. Apply single exponential smoothing (SES) to the coffee price series with weights α 0.8 and α 0.2 respectively. Add the two smoothed curves (one in orange and one in purple) to the plot made in (a) and compare them. 4. Find autocorrelation between the original time series and each of the first 5 lags. Then, fit an autoregressive model with the lags whose autocorrelations are greater than 0.8. Write down the fitted model and add the smoothed curve in blue to the plot made in (a). Which lag does the model depend on most? Why? 5. Suppose we know that the next value in the series was, in fact, 138.90. Compute the corresponding absolute percentage error (APE) for each of the models you have fitted before. Which model gives us the best prediction?

price   time  month day year
149.3999939     1       01      02      13
146.5   2       01      03      13
147.3499908     3       01      04      13
150.3999939     4       01      07      13
148.1499939     5       01      08      13
147.8999939     6       01      09      13
149.6499939     7       01      10      13
153.3499908     8       01      11      13
153.3000031     9       01      14      13
152.5   10      01      15      13
153     11      01      16      13
155.5   12      01      17      13
156.3000031     13      01      18      13
148.5999908     14      01      22      13
150.3999939     15      01      23      13
146.5500031     16      01      24      13
148.3000031     17      01      25      13
149     18      01      28      13
149.8000031     19      01      29      13
147.6999969     20      01      30      13
146.9499969     21      01      31      13
147.9499969     22      02      01      13
144.3499908     23      02      04      13
144.0500031     24      02      05      13
142.0999908     25      02      06      13
140.3000031     26      02      07      13
141.0500031     27      02      08      13
140.1499939     28      02      11      13
140.6499939     29      02      12      13
138.75  30      02      13      13
138     31      02      14      13
136.9499969     32      02      15      13
136.5   33      02      19      13
141     34      02      20      13
141.75  35      02      21      13
143.0999908     36      02      22      13
142.5999908     37      02      25      13
142.8999939     38      02      26      13
142.3999939     39      02      27      13
142.6499939     40      02      28      13
142.8999939     41      03      01      13
145.9499969     42      03      04      13
140.5   43      03      05      13
140.5999908     44      03      06      13
142.4499969     45      03      07      13
143.3499908     46      03      08      13
143.0500031     47      03      11      13
141.6499939     48      03      12      13
140.0500031     49      03      13      13
138.8999939     50      03      14      13
136.5   51      03      15      13
133.1499939     52      03      18      13
133.0999908     53      03      19      13
133.5999908     54      03      20      13
133.75  55      03      21      13
135.3000031     56      03      22      13
135.5999908     57      03      25      13
137.5999908     58      03      26      13
136.5999908     59      03      27      13
137.1499939     60      03      28      13
138.3999939     61      04      01      13
136.1499939     62      04      02      13
139.4499969     63      04      03      13
139.5   64      04      04      13
140.1499939     65      04      05      13
135.8999939     66      04      08      13
135.3999939     67      04      09      13
136.0500031     68      04      10      13
136.8000031     69      04      11      13
135.25  70      04      12      13
134.4499969     71      04      15      13
135.8499908     72      04      16      13
136.0999908     73      04      17      13
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Rcode and explanation has been provided for Question 1,2,3Importing the data rawda ta <-read . csv (rawdata . csv, header T, stringsAs Factors F) - = Plot time series ts_data <- ts (rawdataSprice) plot (ts_data, xlab -Time, ylab-Price) 寸 - 10 20 30 40 50 6070 Time Downward Trend and seasonal pattern is evident in the time series plot.Moving average #insta 11. packages ( TTR ) library (TTR) ## Warning : package TTR was built under R version 3.5.1 SMA 2SMA (ts data, n-2) SMA 8- SMA (ts_data, n-8) ts.plot (ts-data, SMA 2,SMA 8, list(xlab-Time, ylabe Price, col-c(black,red, green))) = gpars 10 20 3040 506070 Time 2 weeks SMA follows the time series closely whereas 8 weeks SMA is smoother and follows the trend of the time series.Exponential Smoothing ses1 <-Holtwinters (ts data, alpha = 0.8, beta = F, gamma = F ) ses_2 < Holtwinters (ts_data, alpha0.2, betaF,gammaF ts.plot (ts_data, ses_1Sfitted, ses_2sfitted, gpars list (xlab-Time, ylab-Price, col-c(black, red, g - SES with alpha 0.2 fits the original 寸 0 10 20 30 40 50 60 70 Time time series better than SES wih alpha-0.8

Add a comment
Know the answer?
Add Answer to:
price time month day year 149.3999939 1 01 02 13 146.5 2 01 03 13 147.3499908...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Graph Worksheet 01 02 03 1. What is the price and quantity at the optimum level...

    Graph Worksheet 01 02 03 1. What is the price and quantity at the optimum level of production? Is this an economic profit, loss, or break-even? Should the firm produce? 2. If the industry model is monopolistic competition, what will happen to the industry? What will happen to the demand and marginal revenue curves for the individual firm? In the long run, where will the demand curve be? Will the firm achieve productive and/or allocative efficiency? 3. If the industry...

  • Need help with C++ assignment Assignment 1 and .txt files are provided at the bottom. PART...

    Need help with C++ assignment Assignment 1 and .txt files are provided at the bottom. PART A PART B Assignment 1 #include <iostream> #include <string> #include <fstream> #include <iomanip> #include <stdio.h> #include <ctype.h> #include <string.h> #include <algorithm> using namespace std; /** This structure is to store the date and it has three integer fields **/ struct Date{    int day;    int month;    int year; }; /** This structure is to store the size of the box and it...

  • 2. The Vice President of Marketing for your firm wants the firm’s sales representatives to be...

    2. The Vice President of Marketing for your firm wants the firm’s sales representatives to be able to directly view and edit customer details, but only for the state to which a particular sales representative is assigned. You have suggested that this need can be addressed with a view. For example, a view could be created for one particular state, and user account permissions for accessing that view granted only to sales representatives from that state. The VP has asked...

  • Only need 1-8 01-02 The post office uses a multiple channel queue, where customers wait in...

    Only need 1-8 01-02 The post office uses a multiple channel queue, where customers wait in a single line for the first ava lable window. If the average service time is I minute and the arrival rate is 6customers every five minutes, find for a 5 minutes perfermance time window, when two service windows are open Q1. the probability that both windows are idle (not busy). a. 0.1765 b. 0.2500 c. 0.5160 d 0.1976 02. the probability a customer will...

  • Answer the following fundamental questions for each time series (exercise 1-10): i. What is measured? (definition...

    Answer the following fundamental questions for each time series (exercise 1-10): i. What is measured? (definition of the time series) ii. How is it measured? (measurement units) iii. What is the periodicity? (frequency of the series) iv. What are the dominant features of the time series? (trends, non-seasonal cycles, seasonal cycles) We were unable to transcribe this image18 CHAPTER 1 Introduction and Context FIGURE E.2 Saving Rate (%). Monthly Data 1988/ ,m/i 01-2008/02 4 0 -2 01-88 01-90 01-92 01-94...

  • SIMPLIFIED NATIONAL INCOME ACCOUNTS MODEL OF MACROECONOMY 4011 Adapted from Bureau of Economic Analysis 03/12/2018 4th quarter/data in billions of U.S.$ (preliminary) 50 00. Statistical discrepan...

    SIMPLIFIED NATIONAL INCOME ACCOUNTS MODEL OF MACROECONOMY 4011 Adapted from Bureau of Economic Analysis 03/12/2018 4th quarter/data in billions of U.S.$ (preliminary) 50 00. Statistical discrepancy 01. Net foreign factor income N.F.F. by USA owned production abroad.228 2,421 02. U.S. ExportsX 03. U.S. Imports (M) .3,021 .914 04. Corporate Income Tax/Corporate Profits Tax (CPT . 05. Taxes on Production & Imports (TOP&M 06. Compensation of employees (Wages/Salaries) 07. Personal Consumption Expenditures (C) 08. Personal Income Tax (PIT) 09. Corporate Profits...

  • Complete Task 4, 5, 6 Instructions Page 3 of 3 query.sql 1 -- Write your query...

    Complete Task 4, 5, 6 Instructions Page 3 of 3 query.sql 1 -- Write your query below and then click "Run Query" to execute it. To save multiple queries, click the "+" icon above. VE Task 4: </> The InstantRide User Satisfaction team is a core team for Instant Ride, and they focus on increasing the customer satisfaction. They want to learn the travel time for each ride in the system. You need to return the USER_ID, and the TRAVEL_TIME...

  • Year Quarter Units 1 Q1 20 1 Q2 100 1 Q3 175 1 Q4 13 2...

    Year Quarter Units 1 Q1 20 1 Q2 100 1 Q3 175 1 Q4 13 2 Q1 37 2 Q2 136 2 Q3 245 2 Q4 26 3 Q1 75 3 Q2 155 3 Q3 326 3 Q4 48 4 Q1 92 4 Q2 202 4 Q3 384 4 Q4 82 5 Q1 176 5 Q2 282 5 Q3 445 5 Q4 181 Using this data: a. Plot this data on a line chart with quarters from years 1-5 on...

  • Journalise the transactions. MBB CATERING SUPPLIES Ply. Ltd. aen: 780 088 423 290 ABN: 42 088...

    Journalise the transactions. MBB CATERING SUPPLIES Ply. Ltd. aen: 780 088 423 290 ABN: 42 088 423 290 352 Boutique Boulevard Templestowe, 3107 SHARE CERTIFICATE This is to certify that Michael Bruce Brown is the holder of 12,000 ordinary shares in MBB Catering Supplies Pty. Ltd. on payment of $1 per share. Amount paid: $12,000 Date: 1 January 2020 OFFICE MEMORANDUM Date: 01/01/20 To: Michael Brown SUBJECT: 1.1 2. Michael Brown donated his motor vehicle to the firm. Original cost:...

  • 2011-07-02 Red Sox    7 Astros 5 Minute Maid Park 2011-07-03 Red Sox 2 Astros 1...

    2011-07-02 Red Sox    7 Astros 5 Minute Maid Park 2011-07-03 Red Sox 2 Astros 1 Minute Maid Park 2011-07-04 Red Sox 7 Blue Jays 9 Fenway Park 2011-07-05 Red Sox 3 Blue Jays 2 Fenway Park 2011-07-06 Red Sox 6 Blue Jays 4 Fenway Park 2011-07-07 Red Sox 10 Orioles 4 Fenway Park 2011-07-08 Red Sox 10 Orioles 3 Fenway Park 2011-07-09 Red Sox 4 Orioles 0 Fenway Park 2011-07-10 Red Sox 8 Orioles 6 Fenway Park 2011-07-15 Red...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT