[R] Forecast
Patrick Connolly
p_connolly at slingshot.co.nz
Thu Mar 11 11:07:08 CET 2010
On Wed, 10-Mar-2010 at 10:58PM -0800, chinna wrote:
|>
|> sample report data that i want to forecast
|>
|> quarter quarter_index Revenue
|> 2007 Q1 1 $3,856,799
|> 2007 Q2 2 $4,243,328
|> 2007 Q3 3 $4,930,369
|> 2007 Q4 4 $5,443,579
|> 2008 Q1 5 $5,164,830
|> 2008 Q2 6 $5,104,413
|> 2008 Q3 7 $5,713,240
|> 2008 Q4 8 $6,509,331
|> 2009 Q1 9 $6,271,951
|> 2009 Q2 10 $6,657,190
|> 2009 Q3 11 $6,979,821
|> 2009 Q4 12 $7,581,619
|>
|>
|> (Using the first report i want to generate the below report using R) is it
|> possible?
|> forecasted report for the year 2010
|>
|> quarter Revenue Revenue Predictor
|> 2007 Q1 $3,856,799 $4,032,525
|> 2007 Q2 $4,243,328 $4,032,525
|> 2007 Q3 $4,930,369 $4,032,525
|> 2007 Q4 $5,443,579 $4,032,525
|> 2008 Q1 $5,164,830 $4,032,525
|> 2008 Q2 $5,104,413 $4,032,525
|> 2008 Q3 $5,713,240 $4,032,525
|> 2008 Q4 $6,509,331 $4,032,525
|> 2009 Q1 $6,271,951 $4,032,525
|> 2009 Q2 $6,657,190 $4,032,525
|> 2009 Q3 $6,979,821 $4,032,525
|> 2009 Q4 $7,581,619 $4,032,525
|> 2010 Q1 $4,032,525
|> 2010 Q2 $4,032,525
|> 2010 Q3 $4,032,525
|> 2010 Q4 $4,032,525
|>
|> This is the forecasted report that i get using the reporting tool cognos(BI
|> Reporting Tool).
|> is this is possible with the R project.
|> If possible can u please tell me the way.
So, you'd be happy with a single number that is the same prediction
for all 16 quarters, even though there's an almost continuous upward
trend? I can't imagine what use that could be to anyone, but I do
have an idea how to get it from the first value in your Revenue
column.
rep(rnorm(1, 3856799, 1000000), 16)
Of course, since it's a random number, you might get a different one,
but as far as I can tell, that would probably be just as good as what
you get from cognos.
If that's not what you want, you might care to do as you've been
advised to do a number of times yet you strenuously avoid doing so.
|> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
|> and provide commented, minimal, self-contained, reproducible code.
Failing that, you could consult an astrologer. I read somewhere once
that an astrologer told his client (which was verified to be correct)
where his stolen dog could be found -- including the fact that it was
tied to the leg of a table!! (I didn't invent that story.)
R is very good, but it's not THAT good.
HTH
--
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.
___ Patrick Connolly
{~._.~} Great minds discuss ideas
_( Y )_ Average minds discuss events
(:_~*~_:) Small minds discuss people
(_)-(_) ..... Eleanor Roosevelt
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.
More information about the R-help
mailing list