Displaying 12 results from an estimated 12 matches for "xtsp".
Did you mean:
tsp
1999 Jul 02
0
Bug in "[.ts" for multivariate ts {Problem with plot.ts, "[" (PR#217)
...izeOnDisk=1838
"[.ts" <- function (x, i, j, drop = TRUE)
{
y <- NextMethod("[")
if (missing(i))
ts(y, start = start(x), freq = frequency(x))
else y
}
"window.ts" <-
function (x, start, end, frequency, deltat)
{
x <- as.ts(x)
xtsp <- tsp(x)
xfreq <- xtsp[3]
xtime <- time(x)
ts.eps <- .Options$ts.eps
if (missing(frequency) && missing(deltat))
yfreq <- xfreq
else if (missing(deltat))
yfreq <- frequency
else if (missing(frequency))
yfreq <- 1/deltat...
1999 Jul 02
1
Bug in "[.ts" for multivariate ts {Problem with plot.ts, "["} (PR#216)
>>>>> On Fri, 02 Jul 1999, Adrian Trapletti <Adrian.Trapletti@wu-wien.ac.at> said:
Adrian> There seems to be a problem with plot.ts (R Version 0.64.2)
> x<-cbind(1:10,2:11)
> x<-as.ts(x)
> plot(x)
Adrian> Error: subscript (20) out of bounds, should be at most 10
This is definitely a bug
--> CC: R-bugs
ALL NOTE : This is *not* new
2000 Aug 24
1
Method dispatch fails for autoloaded methods (PR#642)
(As mentioned before, on R-devel)
This code snippet shows what the Subject above says :
> autoload("diff.ts", file="ts")
> diff(ts(1:10,freq=2))
Error in tsp<-(*tmp*, value = c(xtsp[1] + lag * differences * xtsp[3], :
invalid time series parameters specified
> traceback()
[1] "tsp<-(*tmp*, value = c(xtsp[1] + lag * differences * xtsp[3], "
[2] " xtsp[2], xtsp[3]))"
[3] "diff.default(ts(1:10, freq = 2))"
[4] "diff(ts(1:10, freq = 2)...
1997 Aug 25
0
R-alpha: ts problems
...unctions.
Some examples of what goes wrong...
> x <- ts(rnorm(100),start=1,deltat=2)
> start(x)
Error in ts[1] : object is not subsettable
> end(x)
Error in ts[2] : object is not subsettable
> y <- ts(matrix(rnorm(100),ncol=2))
> window(y,1,10)
Error in [.ts(x, (trunc((start - xtsp[1]) * freq + 1.5):trunc((end - xtsp[1]) *
: unused argument to function
The first two bugs propagate quite widely. You can't even print x.
Unlike S-PLUS, R does not allow you to take row subsets of a time series
object without unclassing it (Of course there is the window function, but
you ca...
2009 Feb 17
0
What's the predict procedure of ARIMA in R?
...als
xr <- object$call$xreg
xreg <- if (!is.null(xr))
eval.parent(xr)
else NULL
ncxreg <- myNCOL(xreg)
if (myNCOL(newxreg) != ncxreg)
stop("'xreg' and 'newxreg' have different numbers of columns")
class(xreg) <- NULL
xtsp <- tsp(rsd)
n <- length(rsd)
arma <- object$arma
coefs <- object$coef
narma <- sum(arma[1:4])
if (length(coefs) > narma) {
if (names(coefs)[narma + 1] == "intercept") {
xreg <- cbind(intercept = rep(1, n), xreg)
newx...
2013 Mar 22
0
predict.Arima error "'xreg' and 'newxreg' have different numbers of columns"
...duals
xr <- object$call$xreg
xreg <- if (!is.null(xr))
eval.parent(xr)
else NULL
ncxreg <- myNCOL(xreg)
if (myNCOL(newxreg) != ncxreg)
stop("'xreg' and 'newxreg' have different numbers of columns")
class(xreg) <- NULL
xtsp <- tsp(rsd)
n <- length(rsd)
arma <- object$arma
coefs <- object$coef
narma <- sum(arma[1L:4L])
if (length(coefs) > narma) {
if (names(coefs)[narma + 1L] == "intercept") {
xreg <- cbind(intercept = rep(1, n), xreg)
n...
2002 Apr 03
1
predict.Arima fails when x is not a time-series
...(20)
R> obj <- arima(x, c(2,0,0))
R> predict(obj)
Error in round(x, digits) : Non-numeric argument to mathematical function
Granted the documentation for arima says x should be a time-series, but why not
accommodate simple vectors? I think it would suffice to change this line:
xtsp <- tsp(data)
in predict.Arima to this:
xtsp <- tsp(hasTsp(data))
Also, a minor documentation typo: the help file for predict.Arima refers to the
function as "predict.arima" at one point.
--
-- David Brahm (brahm@alum.mit.edu)
-.-.-.-.-.-.-.-.-.-.-.-...
2000 Aug 21
2
diff.default / diff.ts in wrong package bug (PR#640)
...s not sufficient to just move diff.ts() to package base,
since it relies itself on lag & lag.default which are also only in package
ts.
----------------------------------------------------
A simple example :
> diff(ts(1:50, start= 1980, frequency = 12))
Error in tsp<-(*tmp*, value = c(xtsp[1] + lag * differences * xtsp[3], :
invalid time series parameters specified
> library(ts)
> diff(ts(1:50, start= 1980, frequency = 12))
Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
1980 1 1 1 1 1 1 1 1 1 1 1
1981 1 1 1 1 1 1 1 1 1 1...
2005 Nov 07
1
frequency() source code
Greetings:
I am looking for the source code for the frequency function. I
grepped the following dirs but no luck.
R-2.2.0/src/appl/*
R-2.2.0/src/main/*
R-2.2.0/src/nmath/*
R-2.2.0/src/library/stats/*
Does anybody know the file name??
Thanks,
Bob
---------------------------------
[[alternative HTML version deleted]]
2010 Mar 31
1
predict.Arima: warnings from xreg magic
...als
xr <- object$call$xreg
xreg <- if (!is.null(xr)) eval.parent(xr) else NULL
ncxreg <- myNCOL(xreg)
if (myNCOL(newxreg) != ncxreg)
stop("'xreg' and 'newxreg' have different numbers of columns")
class(xreg) <- NULL
xtsp <- tsp(rsd)
n <- length(rsd)
arma <- object$arma
coefs <- object$coef
narma <- sum(arma[1L:4L])
if (length(coefs) > narma) {
if (names(coefs)[narma + 1L] == "intercept") {
xreg <- cbind(intercept = rep(1, n), xreg)...
2009 Mar 06
0
modifying a built in function from the stats package (fixing arima) (CONCLUSIONS)
...der'")
if (is.null(seasonal$period) || is.na(seasonal$period) ||
seasonal$period == 0)
seasonal$period <- frequency(x)
arma <- as.integer(c(order[-2], seasonal$order[-2], seasonal$period,
order[2], seasonal$order[2]))
narma <- sum(arma[1:4])
xtsp <- tsp(x)
tsp(x) <- NULL
Delta <- 1
for (i in seq_len(order[2])) Delta <- Delta %+% c(1, -1)
for (i in seq_len(seasonal$order[2])) Delta <- Delta %+%
c(1, rep(0, seasonal$period - 1), -1)
Delta <- -Delta[-1]
nd <- order[2] + seasonal$order[2]...
2002 Sep 03
1
t(xmat)
...cept t(xmat) which gives the following error message. My question if "xmat" is a matrix why I can not execute this matrix function?? converting the time series and matrix into a data frame solves the problem
>dim(xmat)
[1] 98 7
> t(xmat)
Error in "tsp<-"(*tmp*, value = xtsp) : invalid time series parameters specified
> is.matrix(xmat)
[1] TRUE
> is.ts(xmat)
[1] TRUE
> is.data.frame(xmat)
[1] FALSE
Ahmad Abu Hammour
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://stat.ethz.ch/pipermail/r-help/attachments/20020902/31f45f...