Getting rejected initial values running bmgarch in R

I’m running a bayesian DCC-mgarch model. Right now its just 2 variables. This is the function call in R for the model.

library(bmgarch)
cols = c('Free.Cash.Flow', 'Revenue')
model <- bmgarch(dataset[,cols],
                parameterization = "DCC",
                iterations = 1000,
                P = 1, Q = 1,
                chains = 1,
                init_r = 1,
                enable_random_init = FALSE,
                distribution = "Student_t",
                meanstructure = "arma")

Sample rows of the data…the numbers are quite large if that matters at all.

  Free.Cash.Flow    Revenue
1      331510000  972360000
2      331510000  700356000
3      331510000  667625000
4      331510000  639281000
5      331510000 1115171000
6      331510000  847422000

I keep getting these error messages running the basic model.

Chain 1: Rejecting initial value:
Chain 1: Error evaluating the log probability at the initial value.
Chain 1: Exception: validate transformed params: H[i_0__] is not symmetric. H[i_0__][1,2] = 1.15446e+17, but H[i_0__][2,1] = 1.15446e+17 (in ‘model_DCCMGARCH’ at line 62)

Chain 1: Rejecting initial value:
Chain 1: Error evaluating the log probability at the initial value.
Chain 1: Exception: validate transformed params: H[i_0__] is not symmetric. H[i_0__][1,2] = -3.59349e+15, but H[i_0__][2,1] = -3.59349e+15 (in ‘model_DCCMGARCH’ at line 62)

Chain 1:
Chain 1: Initialization between (-0.05, 0.05) failed after 100 attempts.
Chain 1: Try specifying initial values, reducing ranges of constrained values, or reparameterizing the model.
[1] “Error in sampler$call_sampler(args_list[[i]]) : Initialization failed.”
[1] “error occurred during calling the sampler; sampling not done”
Stan model ‘DCCMGARCH’ does not contain samples.

I have tried fiddling with the function call like setting init_r = 0 but to no avail.

Can someone please help me out?

EDIT: added data

1 Like

That would be a question for the creators of bmgarch - pretty hard to say anything without understanding what the underlying model is doing. If I get it right, both authors are active here on Discourse, so tagging @Stephen_Martin @ph-rast , hope they have time to respond.

This appears to be first bmgarch-related inquiry here. Stephen & Phillipe - do you want Stan Discourse to be the place where people seek help with your package? Or should we redirect them somewhere else?

Hi @FuzzyWuzzyWasABull, in the data header you posted it looks like the Free.Cash.Flow variable is constant? Will the numbers change at all after line 6?

@martinmodrak Somehow I did not get notified once you tagged me. I think for now we should be fine addressing any issues revolving around usage etc. here on discourse. Bugs and feature requests would be better placed at Issues · ph-rast/bmgarch · GitHub

Great. There is now bmgarch tag: Topics tagged bmgarch which you can watch to be notified of any new posts regarding the package. Thanks for all your effort.