[R] Delete all object except some particular ones

2010-03-20 Thread bogaso.christofer
Dear all, in my working project, I have created huge number of different kind of objects including "AA" and "BB". Now I want to delete all objects except that "AA" and "BB". Is there any procedure in R to do that ? Thanks, [[alternative HTML version deleted]]

Re: [R] Average regions of non-zeros

2010-03-08 Thread bogaso.christofer
Hi Jim I was following this thread and found that your answer is perfect there. However I could not comprehend the meaning of the expression " cumsum(x == 0)". If I paste it in R window, I get following : > cumsum(x == 0) [1] 1 2 2 2 2 3 4 4 4 4 I gone through the help page of cumsum() function

[R] Problem on plotting TS using GGPLOT

2009-09-25 Thread bogaso.christofer
Hi, I have following codes : library(zoo); library(ggplot2); library(plyr) dat <- rnorm(306); vv <- letters[1:6]; dat1 <- data.frame(dat, vv) dat2 = zooreg(rnorm(51), as.yearmon(as.Date("2000-01-01")), frequency=12) ggplot(dat1) + geom_line(aes(y=dat, x=index(dat2),

Re: [R] Predict GARCH

2009-06-10 Thread bogaso.christofer
Suppose the GARCH(1,1) equation is : Sigma[t]^2 = w + a* Sigma[t-1]^2 + b*r[t-1]^2 One step ahead forecast : Sigma[t+1]^2 = w + a* Sigma[t]^2 + b*r[t]^2 All informations are available here Two step ahead forecast : Sigma[t+2]^2 = w + a* Sigma[t+1]^2 + b*r[t+1]^2 Here r[t+1] is not known at ti

[R] How this addition works?

2009-05-28 Thread bogaso.christofer
I have following addition : > 1:2 + 1:10 [1] 2 4 4 6 6 8 8 10 10 12 I could not understand how R adding those two unequal vector? Any help? [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.

[R] "1L" and "0L"

2009-05-28 Thread bogaso.christofer
Hi, Recently I come through those R-expressions and understood that "1L" means "1" and "0L" means "0". Why they are so? I mean, what the excess meanings they carry, instead writing simple "1" or "0"? Is there any more this kind of expressions in R? Regards [[alternative HTML version

Re: [R] Decomposition of time series with forecast package

2009-04-15 Thread bogaso.christofer
If I am right then you must get the seasonal factor etc (if any) out before fitting ant ARIMA (or statistical model) i.e. fit ARIMA on residual series not original series. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of djhurio Sent:

Re: [R] [R-SIG-Finance] forecasting earnings, sales and gross margin of a company...

2008-10-23 Thread bogaso.christofer
You can fit a VAR model and then, test for Granger Causality -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Sent: 24 October 2008 01:10 To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [R] [R-SIG-Finance] forecasting ear