Skip to main content
deleted 56 characters in body; edited title
Source Link
kjetil b halvorsen
  • 82.8k
  • 32
  • 201
  • 663

regression Regression using circular variable  (hour from 0~23) as predictor

myMy question originally arises from reading this post Use of circular predictors in linear regression. Right

Right now, I'm trying construct linear regression using "Bike Sharing dataset" from https://archive.ics.uci.edu/ml/datasets/bike+sharing+dataset which basically tries to regression bike rental count on different variables

One of the predictor that I have question is on using "Hour" of when the rental occurred, which takes value from 0 to 23. The original post suggests transforming the circular data  (time of day) using Sine sine function to maintain the circular characteristic.

I was trying to apply to same methodology to my situation to transform the Hour variable. However,transforming 0~23 using sin(π hour/180) lets 00:00 and 12:00 to have 0. But I think people will certainly display different behavior when renting bike at midnight(00:00) and afternoon(12:00)

In this case, is it better to just use 23 dummy variables to account for hour or am I misunderstanding the concept of circular regression?

I really appreciate for your help in advance. Thank you.

regression using circular variable(hour from 0~23) as predictor

my question originally arises from reading this post Use of circular predictors in linear regression. Right now, I'm trying construct linear regression using "Bike Sharing dataset" from https://archive.ics.uci.edu/ml/datasets/bike+sharing+dataset which basically tries to regression bike rental count on different variables

One of the predictor that I have question is on using "Hour" of when the rental occurred, which takes value from 0 to 23. The original post suggests transforming the circular data(time of day) using Sine function to maintain the circular characteristic.

I was trying to apply to same methodology to my situation to transform the Hour variable. However,transforming 0~23 using sin(π hour/180) lets 00:00 and 12:00 to have 0. But I think people will certainly display different behavior when renting bike at midnight(00:00) and afternoon(12:00)

In this case, is it better to just use 23 dummy variables to account for hour or am I misunderstanding the concept of circular regression?

I really appreciate for your help in advance. Thank you.

Regression using circular variable  (hour from 0~23) as predictor

My question originally arises from reading this post Use of circular predictors in linear regression.

Right now, I'm trying construct linear regression using "Bike Sharing dataset" from https://archive.ics.uci.edu/ml/datasets/bike+sharing+dataset which basically tries to regression bike rental count on different variables

One of the predictor that I have question is on using "Hour" of when the rental occurred, which takes value from 0 to 23. The original post suggests transforming the circular data  (time of day) using sine function to maintain the circular characteristic.

I was trying to apply to same methodology to my situation to transform the Hour variable. However,transforming 0~23 using sin(π hour/180) lets 00:00 and 12:00 to have 0. But I think people will certainly display different behavior when renting bike at midnight(00:00) and afternoon(12:00)

In this case, is it better to just use 23 dummy variables to account for hour or am I misunderstanding the concept of circular regression?

Source Link
Yoosung
  • 101
  • 1
  • 3

regression using circular variable(hour from 0~23) as predictor

my question originally arises from reading this post Use of circular predictors in linear regression. Right now, I'm trying construct linear regression using "Bike Sharing dataset" from https://archive.ics.uci.edu/ml/datasets/bike+sharing+dataset which basically tries to regression bike rental count on different variables

One of the predictor that I have question is on using "Hour" of when the rental occurred, which takes value from 0 to 23. The original post suggests transforming the circular data(time of day) using Sine function to maintain the circular characteristic.

I was trying to apply to same methodology to my situation to transform the Hour variable. However,transforming 0~23 using sin(π hour/180) lets 00:00 and 12:00 to have 0. But I think people will certainly display different behavior when renting bike at midnight(00:00) and afternoon(12:00)

In this case, is it better to just use 23 dummy variables to account for hour or am I misunderstanding the concept of circular regression?

I really appreciate for your help in advance. Thank you.