turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- proc glmselect for time series data

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-29-2017 10:44 AM - edited 07-29-2017 10:45 AM

I just came accross this:

Here the author transforms the time (in days) using sin(2*pi*(day/365)) or cos(2*pi*(day/365)). Is this an acceptable way to model seasonality when using proc glmselect to model a dependent variable that depends on time and other factors (aka tim series prediction)?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to csetzkorn

07-29-2017 04:31 PM

This may be better posted on stats.stackexchange.com

The question is more statistical than how to program something in SAS type question. There are statisticians on here and you may get an answer, but more likely to get a response on the forum mentioned above.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Reeza

07-31-2017 06:31 PM

In your example, *DAY* is measured on a circular scale: *DAY* = 1 and *DAY* = 366 occupy the same position in an annual cycle.

*DAY* is converted into radian units by 2*pi*(*DAY*/365). If we define the angle *theta *as 2*pi*(*DAY*/365), then we convert from polar coordinates (assuming that radius = 1) to rectangular coordinates (x, y) as x = cos(*theta*) and y = sin(*theta*).

The prediction of a linear variable *X* from a circular variable *THETA* is known in the circular statistics area as "linear-circular association". From the text by N.I. Fisher https://www.amazon.com/Statistical-Analysis-Circular-Data-Fisher/dp/0521568900 (p 139):

"In the linear-circular case, we focus on measuring association between *X* and *THETA* with a (possible) view to predicting the mean value of *X* for a given value *theta* of *THETA*. A simple regression model for this type of association has the form ...

E(*X *| *THETA* = *theta) = a_*0* + a *cos*(theta)* + *b *sin(*theta*) .... it is a simple linear regression model (linear in the regression variables cos(*theta*) and sin(*theta*), that is) and can be fitted routinely by methods in any general statistical package, so we shall not discuss the regression aspect further."

I see the use of sin/cos variables applied in ecology to variables like aspect (the continuous version of north-east-south-west). Notably aspect is different than time, and what works for aspect may not be appropriate for time.

So it could be an acceptable way. If you have many years of data, then time series analysis might be an alternative, perhaps better approach. The paper you reference has observations over only two years.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to csetzkorn

07-31-2017 07:40 PM

I've seen Dave Dickey (an expert in time series analysis) take the sine transform of time in his papers/talks. See

the example in http://support.sas.com/resources/papers/proceedings14/1275-2014.pdf

He has a description similar to the one that @sld gave in

http://www2.sas.com/proceedings/sugi29/201-29.pdf