Answered step by step
Verified Expert Solution
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:
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started