Re: [Rd] arima() bug

2008-06-15 Thread Prof Brian Ripley

On Thu, 12 Jun 2008, Prof Brian Ripley wrote:


On Thu, 12 Jun 2008, Antonio, Fabio Di Narzo wrote:


No segfault with my r-patched version on linux-i686:

set.seed(1); x <- ts(20*sin((1:731)*2*pi/365) + 10 + rnorm(731, 0, 4), 
freq=365)

arima(x, c(1, 0, 1), c(1, 0, 1))

Errore: cannot allocate vector of size 1010.9 Mb


Yes, you need a lot of memory to reproduce it.  It's a nonsensical 
calculation but nevertheless we need to track down the cause.


Which is an integer overflow in an integer calculation of a dimension. 
The current code is only able to code with lags up to 350, and this is 
attempting a fit with lag 366.  I've added an explicit check.






F.


R.version

  _
platform   i686-pc-linux-gnu
arch   i686
os linux-gnu
system i686, linux-gnu
status Patched
major  2
minor  7.0
year   2008
month  05
day29
svn rev45820
language   R
version.string R version 2.7.0 Patched (2008-05-29 r45820)


2008/6/12 Ray Brownrigg <[EMAIL PROTECTED]>:

I guess this is more r-devel than r-help.

Note, I am just the messenger - I have no idea what the user is trying to 
model here.


arima() crashes R (segfault) with Linux R-2.7.0, Solaris R-2.6.0:

 *** caught segfault ***
address 4240, cause 'memory not mapped'

Traceback:
 1: .Call(R_getQ0, phi, theta)
 2: makeARIMA(trarma[[1]], trarma[[2]], Delta, kappa)
 3: arima(x, c(1, 0, 1), c(1, 0, 1))

Under rw-2.7.0 or R version 2.8.0 Under development (unstable) (2008-06-10 
r45893)

it gets:
Error: cannot allocate vector of size 1010.9 Mb
In addition: Warning messages:
1: In makeARIMA(trarma[[1]], trarma[[2]], Delta, kappa) :
 Reached total allocation of 447Mb: see help(memory.size)
2: In makeARIMA(trarma[[1]], trarma[[2]], Delta, kappa) :
 Reached total allocation of 447Mb: see help(memory.size)
3: In makeARIMA(trarma[[1]], trarma[[2]], Delta, kappa) :
 Reached total allocation of 447Mb: see help(memory.size)
4: In makeARIMA(trarma[[1]], trarma[[2]], Delta, kappa) :
 Reached total allocation of 447Mb: see help(memory.size)

Reproduce by:

# 2 years of daily temperature data
set.seed(1); x <- ts(20*sin((1:731)*2*pi/365) + 10 + rnorm(731, 0, 4), 
freq=365)

arima(x, c(1, 0, 1), c(1, 0, 1))

Ray Brownrigg

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel





--
Antonio, Fabio Di Narzo
Ph.D. student at
Department of Statistical Sciences
University of Bologna, Italy

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel



--
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595



--
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] c.noquote() weirdness

2008-06-15 Thread Ray Brownrigg
I haven't been able to get anywhere tracking this down.  It seems that 
c.noquote() does 
something strange with its third (and subsequent) parameters:

R-2.7.0 under NetBSD, R-2.6.0 under Solaris, and R-2.8.0 (unstable) (2008-06-10 
r45893) 
under WinXP, I get:

> c(noquote('z'), 'y', 'x', '*')
[1] z y x * x *
> 

or:
> c(noquote('z'), 'y', '***', letters)
 [1] z   y   *** a   b   c   d   e   f   g   h   i   j   k   l   m   n   o   p
[20] q   r   s   t   u   v   w   x   y   z   *** a   b   c   d   e   f   g   h
[39] i   j   k   l   m   n   o   p   q   r   s   t   u   v   w   x   y   z
> 

Again, I am only the messenger (so don't shoot me :-)).

Regards,
Ray Brownrigg

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel