[rugarch] ugarchroll returns objects structures differently
Here are some hints: 1. The non-converged entries can be found in: >roll at model$noncidx 2. If you want to try and obtain a fully converged object before extracting the data use the 'resume' method on the returned object: >resume(roll, ....) Where "..." allows a number of options (i.e. try solver="gosolnp" or even an alternative specification). I'm not sure what you mean when you say your routine fail to deal with the different format "coming from the first scenario". As regards a uniform approach, I don't see how the results obtained from the call to method "as.data.frame(roll)" are NOT uniform. If you have followed the documentation and used xts, then you will get uniform "looking" results as far as I've checked (...but not fully for the intraday data case). Beyond that, I really can comment without a MINIMALLY reproducible example. Alexios
On 08/11/2014 17:24, Ivan Popivanov wrote:
Hello, The problem I am facing seems to come down to two different scenarios. The first scenario is a short, 15 steps. The second is long - about 15,000. In the first cases all fits are successful, and the result contains (in roll at forecast$density) a data frame. In the second case, there were some failed fits. Now, roll at forecast is a list with 15,000 entries (the number of forecasts) and each of them contains a few slots. The slot which is set for all is "converge". Since there are failed fits (some "converge" == FALSE), as.data.frame(roll, "density") fails. Thus, I wrote my own routine to extract the data (by walking the list), but my routine fails to deal with the different format coming from the the first scenario. My feeling is that there should be a uniform way to get the forecasts (if it failed date+NA in the data.frame) OR a uniform format of the results. Let me know if you need a repro. Thanks in advance, Ivan [[alternative HTML version deleted]]
_______________________________________________ R-SIG-Finance at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-finance -- Subscriber-posting only. If you want to post, subscribe first. -- Also note that this is not the r-help list where general R questions should go.