+ Reply to Thread
Results 1 to 4 of 4

Thread: Selecting Variables in Regression Analysis

  1. #1
    Points: 1,058, Level: 17
    Level completed: 58%, Points required for next Level: 42

    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Selecting Variables in Regression Analysis




    Hello, I am working on generating a regression analysis, but I am not sure if my setup is accurate.

    I would like to predict how long it will take to preheat my oven based on certain variables. My dependent variable will be time it takes for oven to preheat. For my independent variables, I have the temperature I wish to preheat the oven to, the ambient temperature in my home, and the time of day.

    I have my data collected, however I am not sure how to quantify "time of day" as a value for the analysis. I played around with it, and for one analysis I used the value 1 for tests run between 8am and 12pm, value 2 for tests run between 12pm and 4pm, and value 3 for runs between 4pm and 8pm.

    Can anyone tell me if this is a good way to use "time of day" as an effective variable when running a regression analysis?

    Thank you much!

  2. #2
    TS Contributor
    Points: 12,287, Level: 72
    Level completed: 60%, Points required for next Level: 163
    rogojel's Avatar
    Location
    I work in Europe, live in Hungary
    Posts
    1,471
    Thanks
    160
    Thanked 332 Times in 312 Posts

    Re: Selecting Variables in Regression Analysis

    hi,
    coding time of the day as 1,2,3 is deinitely a bad idea as it is a completely arbitrary scale. You could try dummy variables instead.
    regards

  3. #3
    Points: 3,457, Level: 36
    Level completed: 72%, Points required for next Level: 43

    Posts
    156
    Thanks
    42
    Thanked 43 Times in 40 Posts

    Re: Selecting Variables in Regression Analysis

    I am not sure why you want time of day in the model at all.... But since you do: Try the sin(hour).

    1. Don't categorize. Categorizing continuous variables loses information and invokes magical thinking
    2. Time as a linear predictor makes no sense because time of day is not linear: 23:59 is very close to 00:01.
    3. So, use trigonometry which also has a repeat quality.

    You could divide the 24 hours into 360 degrees (so, 00:00 = 0, 12:00 = 180 etc. Then take sine and put that in your model.

  4. #4
    Points: 1,058, Level: 17
    Level completed: 58%, Points required for next Level: 42

    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Selecting Variables in Regression Analysis


    Thanks for the reply! My idea is to see how time of day effects an experiment. I suppose in my oven example, time would not show much variability. In another example, say, commuting time, I think this would show more significance. For example, if I left my house for work 10 minutes later, how would this effect a normal commute? It's not for any real study, I am just curious of the concept more than anything.

    I'll give it a try, thanks for the advice!

+ Reply to Thread

           




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts






Advertise on Talk Stats