From ripley at stats.ox.ac.uk  Wed Aug 27 10:45:45 2003
From: ripley at stats.ox.ac.uk (Prof Brian D Ripley)
Date: Wed Aug 27 10:45:18 2003
Subject: (PR#3990) Re: [Rd] Problem in StructTS() when the first element of
	the serie is NA ( (PR#3990)
In-Reply-To: <200308270832.h7R8WeJH021987@pubhealth.ku.dk>
Message-ID: <Pine.WNT.4.44.0308270941230.276-100000@petrel>

What is the point of supplying a time series with the first value missing?
You might as well omit the first point.

I'll add a `you cannot be serious, man!' error message.

On Wed, 27 Aug 2003 Andrea.Capodicasa@albacom.it wrote:

> Hi all,
> I've experienced this problem using StructTS(x) when the *first* element of
> x is a NA (R:R1.7.0, os: w2ksp4).
>
> Please look at the following code:
>
> 		a=rep(1:7,10)
> 		library(ts)
>
> 		#this works
> 		StructTS(a)
>
> 		#this works
> 		x=a
> 		x[2]=NA
> 		StructTS(x)
>
> 		#this doesn't work
> 		x=a
> 		x[1]=NA
> 		StructTS(x)
>
> The last command returns this error
> "Error in optim(init[mask], getLike, method = "L-BFGS-B", lower = rep(0,  :
>         L-BFGS-B needs finite values of fn"
>
> These are my R.version() and Sys.info() relevant infos.
> > R.Version()
> $platform
> [1] "i386-pc-mingw32"
>
> $arch
> [1] "i386"
>
> $os
> [1] "mingw32"
>
> $system
> [1] "i386, mingw32"
>
> $status
> [1] ""
>
> $major
> [1] "1"
>
> $minor
> [1] "7.0"
>
> $year
> [1] "2003"
>
> $month
> [1] "04"
>
> $day
> [1] "16"
>
> $language
> [1] "R"
>
> > Sys.info()
>                       sysname                       release
> version
>                     "Windows"                      "NT 5.0" "(build 2195)
> Service Pack 4"
>                       machine
>                         "x86"
>
> ______________________________________________
> R-devel@stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-devel
>
>

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
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, UK                Fax:  +44 1865 272595


(PR#3990) Re: [Rd] Problem in StructTS() when the first element of the serie is NA ( (PR#3990)
Prof Brian D Ripley