Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

When fitting an ARIMA model using R, how do I get around the error Error in optim(init[mask], armafn, method = optim.method, hessian = TRUE, :

When fitting an ARIMA model using R, how do I get around the error "Error in optim(init[mask], armafn, method = optim.method, hessian = TRUE, : non-finite finite-difference value [12]"? This happens mostly in the for loops.

Code is below, if that helps:

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribedimage text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

IBM_data75x) INTC_data ) G5_data91113421.x75x ) HD_data75x ) COST_data ) AMZN_data15x ) AMD_data 1sx ) NVDA_data15 OKE_data75x ) #Ca \culating the returns for each sheet entered above. n[2:n,1]0XY _prices [1:(n1),1])/OXYprices[1:(n1),1]) KO_prices [2:n,1] - KO_prices [1:(n1),1])/KOprices 1 : 1:(n1),1]) NVDA_prices

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Audit Customer Satisfaction Marketing Added Value

Authors: Cindy E. Cosmas

1st Edition

089413373X, 978-0894133732

More Books

Students also viewed these Accounting questions

Question

Are members flexible in their roles to accommodate team goals?

Answered: 1 week ago