racd installation

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

racd installation

Trung.BA
Hi,
I am trying to install 'racd' package of Alexios to R 3.3.1 and come up
with the following error messages.
-----
>  require(devtools)
Loading required package: devtools
> install_bitbucket("alexiosg/racd")

** preparing package for lazy loading
Warning in rgl.init(initValue, onlyNULL) :
  RGL: unable to open X11 display
Warning: 'rgl_init' failed, running with rgl.useNULL = TRUE
Error : object 'as.vector' is not exported by 'namespace:Matrix'
ERROR: lazy loading failed for package 'racd'
* removing '/gpfs/software/R/3.3.1/gcc/lib64/R/library/racd'
Error: Command failed (1)

-----
How could I solve for these errors? By the way, when will the 'racd' could
be downloaded directly from CRAN?

Regards,
Trung

        [[alternative HTML version deleted]]

_______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: racd installation

alexios
I'll upload a fix for that today.

Alexios


> On Sep 21, 2016, at 4:48 AM, Le Hai Trung KNH <[hidden email]> wrote:
>
> Hi,
> I am trying to install 'racd' package of Alexios to R 3.3.1 and come up
> with the following error messages.
> -----
>> require(devtools)
> Loading required package: devtools
>> install_bitbucket("alexiosg/racd")
>
> ** preparing package for lazy loading
> Warning in rgl.init(initValue, onlyNULL) :
>  RGL: unable to open X11 display
> Warning: 'rgl_init' failed, running with rgl.useNULL = TRUE
> Error : object 'as.vector' is not exported by 'namespace:Matrix'
> ERROR: lazy loading failed for package 'racd'
> * removing '/gpfs/software/R/3.3.1/gcc/lib64/R/library/racd'
> Error: Command failed (1)
>
> -----
> How could I solve for these errors? By the way, when will the 'racd' could
> be downloaded directly from CRAN?
>
> Regards,
> Trung
>
>    [[alternative HTML version deleted]]
>
> _______________________________________________
> [hidden email] 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.
>

_______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: racd installation

Dirk Eddelbuettel
In reply to this post by Trung.BA

On 21 September 2016 at 10:48, Le Hai Trung KNH wrote:
| Hi,
| I am trying to install 'racd' package of Alexios to R 3.3.1 and come up
| with the following error messages.
| -----
| >  require(devtools)
| Loading required package: devtools
| > install_bitbucket("alexiosg/racd")
|
| ** preparing package for lazy loading
| Warning in rgl.init(initValue, onlyNULL) :
|   RGL: unable to open X11 display
| Warning: 'rgl_init' failed, running with rgl.useNULL = TRUE
| Error : object 'as.vector' is not exported by 'namespace:Matrix'
| ERROR: lazy loading failed for package 'racd'
| * removing '/gpfs/software/R/3.3.1/gcc/lib64/R/library/racd'
| Error: Command failed (1)

There are two errors here.

One comes from the rgl package noticing that you have no X11 display, and
recovering nicely (thanks, Duncan).

The other comes from racd which wants to import as.vector from Matrix, but
Matrix no longer exports it.  Clone the repo, and make this change:

diff --git a/NAMESPACE b/NAMESPACE
index 45b3765..4c146fb 100644
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -6,7 +6,7 @@ importFrom(numDeriv, jacobian, hessian, grad)
 importFrom(xts, xts, as.xts, is.xts, axTicksByTime)
 importFrom(zoo, coredata, index)
 importFrom(Rsolnp, solnp, gosolnp, startpars)
-importFrom(Matrix, Matrix, crossprod, t, as.matrix, as.vector)
+importFrom(Matrix, Matrix, crossprod, t, as.matrix)
 importFrom(parallel, makeForkCluster, makePSOCKcluster, stopCluster, clusterEvalQ, clusterExport, clusterMap, parLapply, parSapply)
 exportClasses("ACDspec", "ACDfit", "ACDfilter", "ACDforecast", "ACDsim", "ACDpath", "ACDroll")
 exportClasses("ACDmultispec", "ACDmultifit", "ACDmultifilter", "ACDmultiforecast")

ie remove ", as.vector" from the end of the importFrom line for package
Matrix.  Now you can install.

| -----
| How could I solve for these errors? By the way, when will the 'racd' could
| be downloaded directly from CRAN?


|
| Regards,
| Trung
|
| [[alternative HTML version deleted]]
|
| _______________________________________________
| [hidden email] 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.

--
http://dirk.eddelbuettel.com | @eddelbuettel | [hidden email]

_______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: racd installation

Open Business Management Solutions JSC
In reply to this post by Trung.BA
It looks like an issue with X display. If you're installing this on a
server through a x-terminal, make sure you export the DISPLAY environment,
e.g.

export DISPLAY=0.0

2016-09-21 16:48 GMT+07:00 Le Hai Trung KNH <[hidden email]>:

> Hi,
> I am trying to install 'racd' package of Alexios to R 3.3.1 and come up
> with the following error messages.
> -----
> >  require(devtools)
> Loading required package: devtools
> > install_bitbucket("alexiosg/racd")
>
> ** preparing package for lazy loading
> Warning in rgl.init(initValue, onlyNULL) :
>   RGL: unable to open X11 display
> Warning: 'rgl_init' failed, running with rgl.useNULL = TRUE
> Error : object 'as.vector' is not exported by 'namespace:Matrix'
> ERROR: lazy loading failed for package 'racd'
> * removing '/gpfs/software/R/3.3.1/gcc/lib64/R/library/racd'
> Error: Command failed (1)
>
> -----
> How could I solve for these errors? By the way, when will the 'racd' could
> be downloaded directly from CRAN?
>
> Regards,
> Trung
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> [hidden email] 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.
>



--
OpenBMS - *Unlock your potentials*

Level 6, Master Building
41-43 Tran Cao Van Street
Ward 6, District 3, Hochiminh City

        [[alternative HTML version deleted]]

_______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: racd installation

Vis Chen
Dear Alexios,

I have tested "rmgarch.test4.R" in the rmgarch package, and when I run the
rmgarch.test4b commands:

> data(dji30retw)
> Dat = dji30retw[, 1:15, drop = FALSE]
> spec2 = gogarchspec(mean.model = list(model = "AR", lag = 2),
+ variance.model = list(model = "gjrGARCH", garchOrder = c(1,1)),
+ distribution.model = c("mvnorm", "manig", "magh")[2],
+ ica = "fastica")
> M.gg = fmoments(spec2, Data = dji30retw[,1:15], n.ahead = 1, roll = 2,
+ solver = "solnp", cluster = cluster, gfun = "tanh", maxiter1=20000,
+ A.init = diag(15))
There were 15 warnings (use warnings() to see them)
> warnings()
Warning messages:
1: unidentified option(s) in fit.control:
 eval.se

I tried to solve this by adding:
M.gg = fmoments(spec3x, Data = P, n.ahead = 1, roll = 8,  *fit.control =
list(fixed.se <http://fixed.se> = FALSE, stationarity = TRUE, scale =
FALSE)*,
                solver = "solnp", cluster = cluster, gfun = "tanh",
maxiter1=20000,
                A.init = diag(10))

But I have difficulties interpreting how this fit.control affect the model.

Lastly, I tried to apply my own data to the same script and I received
these warnings:
> M.gg = fmoments(spec3x, Data = P, n.ahead = 1, roll = 8,  fit.control =
list(fixed.se = FALSE, stationarity = TRUE, scale = FALSE),
+                 solver = "solnp", cluster = cluster, gfun = "tanh",
maxiter1=20000,
+                 A.init = diag(10))
Warning messages:
1: In sqrt(ans$h) : NaNs produced
2: In sqrt(ans$h) : NaNs produced
3: In sqrt(ans$h) : NaNs produced
4: In sqrt(ans$h) : NaNs produced

I have some returns that equal to 0 can this be a problem? Would M.gg be
invalid as a consequence of these warnings?

Regards,
Vis



On Wed, Sep 21, 2016 at 1:26 PM, Open Business Management Solutions JSC <
[hidden email]> wrote:

> It looks like an issue with X display. If you're installing this on a
> server through a x-terminal, make sure you export the DISPLAY environment,
> e.g.
>
> export DISPLAY=0.0
>
> 2016-09-21 16:48 GMT+07:00 Le Hai Trung KNH <[hidden email]>:
>
> > Hi,
> > I am trying to install 'racd' package of Alexios to R 3.3.1 and come up
> > with the following error messages.
> > -----
> > >  require(devtools)
> > Loading required package: devtools
> > > install_bitbucket("alexiosg/racd")
> >
> > ** preparing package for lazy loading
> > Warning in rgl.init(initValue, onlyNULL) :
> >   RGL: unable to open X11 display
> > Warning: 'rgl_init' failed, running with rgl.useNULL = TRUE
> > Error : object 'as.vector' is not exported by 'namespace:Matrix'
> > ERROR: lazy loading failed for package 'racd'
> > * removing '/gpfs/software/R/3.3.1/gcc/lib64/R/library/racd'
> > Error: Command failed (1)
> >
> > -----
> > How could I solve for these errors? By the way, when will the 'racd'
> could
> > be downloaded directly from CRAN?
> >
> > Regards,
> > Trung
> >
> >         [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > [hidden email] 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.
> >
>
>
>
> --
> OpenBMS - *Unlock your potentials*
>
> Level 6, Master Building
> 41-43 Tran Cao Van Street
> Ward 6, District 3, Hochiminh City
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> [hidden email] 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.
>

        [[alternative HTML version deleted]]

_______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: racd installation

alexios
Vis,

1. You've switched from a topic related to racd to one relating to rmgarch.
Please start a new thread with an appropriate title (i.e. rmgarch in title).

2. I know that this list may have shrunk over time, but I am not the
only person on it.
Please address the question to the group, not me personally.

3. I recently added a dispatch function function for gogarchsim to accept
goGARCHfilter as well as goGARCHfit classes. This will allow easier
fitting,
filtering with new data, and then simulating the n-ahead predictive
density.
When I find time I will add some examples and clean up the warnings.


Alexios

On 22/09/2016 02:11, Vis Chen wrote:

> Dear Alexios,
>
> I have tested "rmgarch.test4.R" in the rmgarch package, and when I run
> the rmgarch.test4b commands:
>
> > data(dji30retw)
> > Dat = dji30retw[, 1:15, drop = FALSE]
> > spec2 = gogarchspec(mean.model = list(model = "AR", lag = 2),
> + variance.model = list(model = "gjrGARCH", garchOrder = c(1,1)),
> + distribution.model = c("mvnorm", "manig", "magh")[2],
> + ica = "fastica")
> > M.gg = fmoments(spec2, Data = dji30retw[,1:15], n.ahead = 1, roll = 2,
> + solver = "solnp", cluster = cluster, gfun = "tanh", maxiter1=20000,
> + A.init = diag(15))
> There were 15 warnings (use warnings() to see them)
> > warnings()
> Warning messages:
> 1: unidentified option(s) in fit.control:
>  eval.se <http://eval.se>
>
> I tried to solve this by adding:
> M.gg = fmoments(spec3x, Data = P, n.ahead = 1, roll = 8,  *fit.control
> = list(fixed.se <http://fixed.se> = FALSE, stationarity = TRUE, scale
> = FALSE)*,
>                 solver = "solnp", cluster = cluster, gfun = "tanh",
> maxiter1=20000,
>                 A.init = diag(10))
>
> But I have difficulties interpreting how this fit.control affect the
> model.
>
> Lastly, I tried to apply my own data to the same script and I received
> these warnings:
> > M.gg = fmoments(spec3x, Data = P, n.ahead = 1, roll = 8,
>  fit.control = list(fixed.se <http://fixed.se> = FALSE, stationarity =
> TRUE, scale = FALSE),
> +                 solver = "solnp", cluster = cluster, gfun = "tanh",
> maxiter1=20000,
> +                 A.init = diag(10))
> Warning messages:
> 1: In sqrt(ans$h) : NaNs produced
> 2: In sqrt(ans$h) : NaNs produced
> 3: In sqrt(ans$h) : NaNs produced
> 4: In sqrt(ans$h) : NaNs produced
>
> I have some returns that equal to 0 can this be a problem? Would M.gg
> be invalid as a consequence of these warnings?
>
> Regards,
> Vis
>
>
>
> On Wed, Sep 21, 2016 at 1:26 PM, Open Business Management Solutions
> JSC <[hidden email] <mailto:[hidden email]>> wrote:
>
>     It looks like an issue with X display. If you're installing this on a
>     server through a x-terminal, make sure you export the DISPLAY
>     environment,
>     e.g.
>
>     export DISPLAY=0.0
>
>     2016-09-21 16:48 GMT+07:00 Le Hai Trung KNH <[hidden email]
>     <mailto:[hidden email]>>:
>
>     > Hi,
>     > I am trying to install 'racd' package of Alexios to R 3.3.1 and
>     come up
>     > with the following error messages.
>     > -----
>     > >  require(devtools)
>     > Loading required package: devtools
>     > > install_bitbucket("alexiosg/racd")
>     >
>     > ** preparing package for lazy loading
>     > Warning in rgl.init(initValue, onlyNULL) :
>     >   RGL: unable to open X11 display
>     > Warning: 'rgl_init' failed, running with rgl.useNULL = TRUE
>     > Error : object 'as.vector' is not exported by 'namespace:Matrix'
>     > ERROR: lazy loading failed for package 'racd'
>     > * removing '/gpfs/software/R/3.3.1/gcc/lib64/R/library/racd'
>     > Error: Command failed (1)
>     >
>     > -----
>     > How could I solve for these errors? By the way, when will the
>     'racd' could
>     > be downloaded directly from CRAN?
>     >
>     > Regards,
>     > Trung
>     >
>     >         [[alternative HTML version deleted]]
>     >
>     > _______________________________________________
>     > [hidden email] <mailto:[hidden email]>
>     mailing list
>     > https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>     <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.
>     >
>
>
>
>     --
>     OpenBMS - *Unlock your potentials*
>
>     Level 6, Master Building
>     41-43 Tran Cao Van Street
>     Ward 6, District 3, Hochiminh City
>
>             [[alternative HTML version deleted]]
>
>     _______________________________________________
>     [hidden email] <mailto:[hidden email]>
>     mailing list
>     https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>     <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.
>
>

_______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: racd installation

Trung.BA
Hi,
Thank you Alexios for fixing the installation error.
I successfully installed the racd package. However, in the estimation I
cannot use the solver "msucminf" and "mssolnp" although the solver "msoptim"
and "uncminf"; "solnp" itself (without multi start strategy) still work.
The error message is follow:
---
Error in xsol[[best]] : no such index at level 3
Calls: acdfit -> acdfit -> .acdfit -> .acdsolver -> .msucminfsolver
Execution halted
---
How is that error?

Best,
Trung

-----Original Message-----
From: R-SIG-Finance [mailto:[hidden email]] On Behalf
Of alexios galanos
Sent: Thursday, September 22, 2016 3:53 PM
To: Vis Chen <[hidden email]>; [hidden email]
Subject: Re: [R-SIG-Finance] racd installation

Vis,

1. You've switched from a topic related to racd to one relating to rmgarch.
Please start a new thread with an appropriate title (i.e. rmgarch in title).

2. I know that this list may have shrunk over time, but I am not the only
person on it.
Please address the question to the group, not me personally.

3. I recently added a dispatch function function for gogarchsim to accept
goGARCHfilter as well as goGARCHfit classes. This will allow easier fitting,
filtering with new data, and then simulating the n-ahead predictive density.
When I find time I will add some examples and clean up the warnings.


Alexios

On 22/09/2016 02:11, Vis Chen wrote:

> Dear Alexios,
>
> I have tested "rmgarch.test4.R" in the rmgarch package, and when I run
> the rmgarch.test4b commands:
>
> > data(dji30retw)
> > Dat = dji30retw[, 1:15, drop = FALSE]
> > spec2 = gogarchspec(mean.model = list(model = "AR", lag = 2),
> + variance.model = list(model = "gjrGARCH", garchOrder = c(1,1)),
> + distribution.model = c("mvnorm", "manig", "magh")[2], ica =
> + "fastica")
> > M.gg = fmoments(spec2, Data = dji30retw[,1:15], n.ahead = 1, roll =
> > 2,
> + solver = "solnp", cluster = cluster, gfun = "tanh", maxiter1=20000,
> + A.init = diag(15))
> There were 15 warnings (use warnings() to see them)
> > warnings()
> Warning messages:
> 1: unidentified option(s) in fit.control:
>  eval.se <http://eval.se>
>
> I tried to solve this by adding:
> M.gg = fmoments(spec3x, Data = P, n.ahead = 1, roll = 8,  *fit.control
> = list(fixed.se <http://fixed.se> = FALSE, stationarity = TRUE, scale
> = FALSE)*,
>                 solver = "solnp", cluster = cluster, gfun = "tanh",
> maxiter1=20000,
>                 A.init = diag(10))
>
> But I have difficulties interpreting how this fit.control affect the
> model.
>
> Lastly, I tried to apply my own data to the same script and I received
> these warnings:
> > M.gg = fmoments(spec3x, Data = P, n.ahead = 1, roll = 8,
>  fit.control = list(fixed.se <http://fixed.se> = FALSE, stationarity =
> TRUE, scale = FALSE),
> +                 solver = "solnp", cluster = cluster, gfun = "tanh",
> maxiter1=20000,
> +                 A.init = diag(10))
> Warning messages:
> 1: In sqrt(ans$h) : NaNs produced
> 2: In sqrt(ans$h) : NaNs produced
> 3: In sqrt(ans$h) : NaNs produced
> 4: In sqrt(ans$h) : NaNs produced
>
> I have some returns that equal to 0 can this be a problem? Would M.gg
> be invalid as a consequence of these warnings?
>
> Regards,
> Vis
>
>
>
> On Wed, Sep 21, 2016 at 1:26 PM, Open Business Management Solutions
> JSC <[hidden email] <mailto:[hidden email]>> wrote:
>
>     It looks like an issue with X display. If you're installing this on a
>     server through a x-terminal, make sure you export the DISPLAY
>     environment,
>     e.g.
>
>     export DISPLAY=0.0
>
>     2016-09-21 16:48 GMT+07:00 Le Hai Trung KNH <[hidden email]
>     <mailto:[hidden email]>>:
>
>     > Hi,
>     > I am trying to install 'racd' package of Alexios to R 3.3.1 and
>     come up
>     > with the following error messages.
>     > -----
>     > >  require(devtools)
>     > Loading required package: devtools
>     > > install_bitbucket("alexiosg/racd")
>     >
>     > ** preparing package for lazy loading
>     > Warning in rgl.init(initValue, onlyNULL) :
>     >   RGL: unable to open X11 display
>     > Warning: 'rgl_init' failed, running with rgl.useNULL = TRUE
>     > Error : object 'as.vector' is not exported by 'namespace:Matrix'
>     > ERROR: lazy loading failed for package 'racd'
>     > * removing '/gpfs/software/R/3.3.1/gcc/lib64/R/library/racd'
>     > Error: Command failed (1)
>     >
>     > -----
>     > How could I solve for these errors? By the way, when will the
>     'racd' could
>     > be downloaded directly from CRAN?
>     >
>     > Regards,
>     > Trung
>     >
>     >         [[alternative HTML version deleted]]
>     >
>     > _______________________________________________
>     > [hidden email] <mailto:[hidden email]>
>     mailing list
>     > https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>     <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.
>     >
>
>
>
>     --
>     OpenBMS - *Unlock your potentials*
>
>     Level 6, Master Building
>     41-43 Tran Cao Van Street
>     Ward 6, District 3, Hochiminh City
>
>             [[alternative HTML version deleted]]
>
>     _______________________________________________
>     [hidden email] <mailto:[hidden email]>
>     mailing list
>     https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>     <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.
>
>

_______________________________________________
[hidden email] 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.

_______________________________________________
[hidden email] 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.