[R] problem with HoltWinters

Luis Miguel Almeida da Silva lsilva at fc.up.pt
Wed Sep 3 18:32:19 CEST 2003


The data goes in attachment. I used ts to create data.ts
 
data.ts<-ts(data=data,start=c(2001,1),frequency=12)


	-----Original Message----- 
	From: David Meyer [mailto:david.meyer at ci.tuwien.ac.at] 
	Sent: Wed 03/09/2003 17:21 
	To: Luis Miguel Almeida da Silva 
	Cc: r-help at stat.math.ethz.ch 
	Subject: Re: [R] problem with HoltWinters
	
	

	How did you construct `data.ts'? Can you send me the file?
	
	best,
	David
	
	On 2003.09.03 15:57, Luis Miguel Almeida da Silva wrote:
	> Dear helpers
	>
	> I'm having a problem with function HoltWinters from package ts. I have
	> a time series that I want to fit an Holt-Winters model and make
	> predictions for the next values. I've already built an object of class
	> ts to serve as input to HoltWinters. But then I get an error; I've
	> used HoltWinters a lot of times and this never hapened
	>
	> > data.HW<-HoltWinters(data.ts)
	> Error in model.frame(formula, rownames, variables, varnames, extras,
	> extranames,  :
	>         variable lengths differ
	>
	> This is the data
	>
	> > data.ts
	>          Jan     Feb     Mar     Apr     May     Jun     Jul     Aug
	>   Sep
	> 2001 1117001 1017287 1195142 1049729 1409147 1267002 1579907 1563127
	> 1195597
	> 2002 1228333 1062520 1080117 1171998 1383951 1141008 1604061 1446024
	> 1276017
	> 2003 1068221 1045052 1164273 1091765 1272330 1305676
	>
	>          Oct     Nov     Dec
	> 2001 1290688 1104137 1027022
	> 2002 1262232 1048522 1174157
	> 2003
	>
	> Do you know what is happening?
	>
	> Thank you
	> Luis
	>
	> ______________________________________________
	> R-help at stat.math.ethz.ch mailing list
	> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
	>
	>
	

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: data.txt
Url: https://stat.ethz.ch/pipermail/r-help/attachments/20030903/9dfa9419/data.txt


More information about the R-help mailing list