[R] Saving predict

0 views
Skip to first unread message

Jose Narillos de Santos

unread,
Dec 4, 2009, 5:45:38 AM12/4/09
to r-h...@r-project.org
Hi all,,I´m using function arima()

I.e
series is my data

model<-arima(series,c(1,0,0))
forecast<-predict(model,80)
I want to create a variable:
b1<-forecast$pred - 1.96*forecast$se
and save in a txt file

but using this:

save(b1, file= "b1.txt")

creates afile butwith this inside:

‹ ]Ò{H“Q ðï~Ÿß|¦›ùÊÊLJI³Ôi ÍW*¥þ‘Í-l)˜%¤ )Šmæ#)­ ±, ›
ÉйRIñ¸ åœÈÊiS fµ d›bÒ ôGuážß¹çr9p9œø´ »4;‚ H‚´Å‘© ‰ " ¦­¥ž L ”#ÎR€ez´
ãÊÁ¹1ìy‡÷3pN8Ä®°{ ,IÚ6¡¢ ˜ÊW²–ížàôâ!ã“6 éúžù=­à
ê Ížó {·â6ƒ½ l?øß×OõƒMw_Ï ¬û—¯•5 ãëK÷ÖÝ©À Z+òÛ×
ô=é„ëæ ÉÊ(•Y V·‘÷Bç XùÔ(²E2 †ua Íz J
Yj±+P‘tSU[ Pt­ gí< ïOÆjS9@¶,ŠËx¹@Þ)k ¤$ ™ TìÜ $/¼ÈA˜ dôz®‡p ÈÀù¢iþ
½ÊW ™¡@²räÖO dœbë¤r@ c¾ ån€~ô™óW§ }û\M*g -¹w †û šÛŸìj<
hfEs ! 4 ¡»Q‘ h’Ë6%G Òö& J MHdIüt@ã­§‹ i<å¢ @ê>à Ç/@£2Ô º è ÜM³¡ ôV#
x=†Ý¥ l8 h¤jgɨ Kr¥¦ @õŽ|u=ö ¿Ùæ ¡Ånº2
ûÔEÙTŒÍ©ËÔ¬c õꙩX§(Õø,
Á/ë2óM¬š °â°JIÄŠ Û°¬ºjÂÞ­î•~ÄŠ—]êDØ|¹°¿ {9£tn Ë *‘âÿ äÈýõ\lr—oö*6a’Ǧ±1:e¨ {¢>Έû 'öî°Ü‡ { ZÎl^Bb<6ØËÌWb Gޤ¯a åÆeKÿƒ‰5ß—° > Ú®ü7™Ta c M*&ŸØZ1…Â-£Wˆ?ëŸ'ô%ÁÅ‚ œ0ÿžðBKeÓ² 7–å'

Can anyone help me to do it?

Do you know also a document wich expalin how works and calculates
modelpredictions?

[[alternative HTML version deleted]]

Paul Hiemstra

unread,
Dec 4, 2009, 11:09:52 AM12/4/09
to Jose Narillos de Santos, r-h...@r-project.org
?arima
?write.table

groet,
Paul

Jose Narillos de Santos wrote:
> Hi all,,I´m using function arima()


>
> I.e
> series is my data
>
> model<-arima(series,c(1,0,0))
> forecast<-predict(model,80)
> I want to create a variable:
> b1<-forecast$pred - 1.96*forecast$se
> and save in a txt file
>
> but using this:
>
> save(b1, file= "b1.txt")
>
> creates afile butwith this inside:
>

> ‹ ]Ò{H“Q ðï~Ÿß|¦›ùÊÊLJI³Ôi à W*¥þ‘à -l)˜%¤ )Šmæ#)­ ±, ›
> Éà ¹RIñ¸ åœÈÊiS fµ d›bÒ ôGuážß¹çr9p9œø´ »4;‚ H‚´Å‘© ‰ " ¦­¥ž L †#ÎR€ez´
> ãÊà ¹1ìy‡÷3pN8Ä®°{ ,IÚ6¡¢ ˜ÊW²–ížà ôâ!ã“6 éúžù=­Ã
> ê à žó {·â6ƒ½ l?øß×OõƒMw_à  ¬û—¯•5 ãëK÷Öà ©À Z+òÛ×
> ô=é„ëæ ÉÊ(•Y V·‘÷Bç XùÔ(²E2 †ua à z J
> Yj±+P‘tSU[ Pt­ gí< ïOÆjS9@¶,ŠËx¹@Þ)k ¤$ ™ TìÜ $/¼ÈA˜ dôz®‡p ÈÀù¢iþ
> ½ÊW ™¡@²räÖO  dœbë¤r@ c¾ ån€~ô™óW§ }û\M*g -¹w †û šÛŸìj<
> hfEs ! 4 ¡»Q‘ h’Ë6%G Òö& J MHdIüt@ã­§‹  i<å¢ @ê>àÇ/@£2Ô º è ÜM³¡ ôV#
> x=†à ¥ l8 h¤jgɨ Kr¥¦ @õŽ|u=ö ¿Ùæ ¡Ånº2
> ûÔEÙTŒà ©ËÔ¬c õꙩX§(Õø,
> à /ë2óM¬š °â°JIÄŠÛ°¬ºjÂÞ­î•~ÄŠ—]êDØ|¹°¿ {9£tn Ë *‘âÿ äÈýõ\lr—oö*6a’Ǧ±1:e¨ {¢>Έû 'öî°Ü‡ { ZÎl^Bb<6ØËÌWb Gޤ¯a åÆeKÿƒ‰5ß—° > Ú®ü7™Ta c M*&ŸØZ1…Â-£Wˆ?ëŸ'ô%à Å‚ œ0ÿžðBKeÓ² 7–å'

>
>
>
> Can anyone help me to do it?
>
> Do you know also a document wich expalin how works and calculates
> modelpredictions?
>
> [[alternative HTML version deleted]]
>
>

> ------------------------------------------------------------------------
>
> ______________________________________________
> R-h...@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>


--
Drs. Paul Hiemstra
Department of Physical Geography
Faculty of Geosciences
University of Utrecht
Heidelberglaan 2
P.O. Box 80.115
3508 TC Utrecht
Phone: +3130 274 3113 Mon-Tue
Phone: +3130 253 5773 Wed-Fri
http://intamap.geo.uu.nl/~paul

Reply all
Reply to author
Forward
0 new messages