# [R] help with R

From: Ed Wang <eymw_at_hotmail.com>
Date: Thu 01 Dec 2005 - 03:53:48 EST

Berton,

My usage of dummy variables is to identify seasonality on the daily level over
15 years with 246 days per year. I need to identify the day each month when an (expected) event is occuring. The date the event occurs does not occur on necessarily the same day each month. I don't know of another method that could identify these statistically significant seasonal events using R. Dummy variables with a LM is the only method I have experience with using R. If you or anyone has suggestions on what other methods to use I would appreciate some suggestions. Using 245 dummy variables is quite awkward.

I see lag() can be used to build a first- or multi-order differenced time series to extract any underlying trend in a time series.

Using STL() might be promising. It appears to be similar to other methods I've used with MINITAB but called something different.

Nor an ARIMA nor a BSM is really what I need as I'm not focused on performing predictions or modeling of the (possibly non-normal) properties of the residuals.

Ed

```       "A man is not old until regrets take the place of dreams."
Actor John Barrymore

```

From: Berton Gunter <gunter.berton@gene.com> To: "'Ed Wang'" <eymw@hotmail.com>, <r-help@stat.math.ethz.ch> Subject: RE: [R] help with R
Date: Tue, 29 Nov 2005 11:05:02 -0800

You're not telling us something or there's a problem with your R build: a 3960 element vectors of integer is tiny and will not cause R to crash.

Regarding your regression model. You do **not** need dummy variables in R. Please read the docs (e.g. AN INTRODUCTION TO R) and help files on lm() and factor() to see how to do linear modeling in R. lag() and diff() may also be relevant. OTOH, R has many better ways to model time series and seasonality, both in base R and numerous add-on packages. Try help.search('time series') and RSiteSearch('time series')

• Bert Gunter Genentech Non-Clinical Statistics South San Francisco, CA

"The business of the statistician is to catalyze the scientific learning process." - George E. P. Box

R-help@stat.math.ethz.ch mailing list