[R] Re: Package tseries: crash for Windows version (PR#2302)

Adrian Trapletti adrian.trapletti at lmttrading.com
Fri Nov 22 12:14:19 CET 2002


Kurt Hornik wrote:

> >>>>> Duncan Murdoch writes:
>
> > The problem is in the .C call to pred_garch, which is short by one
> > parameter.  In the garch.c file, the header is
>
> > void pred_garch (double *y, double *h, int *n, double *par, int *p,
> > int *q, int *genuine)
>
> > but in garch.R, the call is coded as
>
> >     pred <- .C("pred_garch",
> >                as.vector(x, mode = "double"),
> >                e = as.vector(e, mode = "double"),
> >                as.integer(n),
> >                as.vector(fit$coef, mode = "double"),
> >                as.integer(order[1]),
> >                as.integer(order[2]),
> >                PACKAGE = "tseries")
>
> > missing the "genuine" parameter.  According to a comment:
>
> > genuine      logical indicating if a genuine prediction is computed
>
> > and I think it's supposed to be FALSE in this call, but I'm not sure.

> I think it needs to be as.integer(genuine) but let's ask the expert:
> Adrian?
>
> -k

Sorry for the delay (I was working abroad).

Yes. It is a bug, and the last argument to .C("pred_garch",...) should be
as.integer(FALSE). I saw that Kurt already corrected it and putted the new
version on CRAN. Hopefully this should be ok now.

Thanks and best
Adrian


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list