Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Paula
 
Posts: n/a
Default How do I put days of the week into a multiple regression model?

I am building a multiple linear regression model to predict peak power demant
using maximum daily temerature (in degrees) and the day of the week as
independent variables. I am unsure how to code the days of the week in order
to get the result I want. (when I use the days - the regression add-in tool
states that I'm not using the correct type of data, its non-numeric). I
believe this model will have 7 seperate independent variables, but am unsure
on how to get there.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld
 
Posts: n/a
Default How do I put days of the week into a multiple regression model?

On Sun, 5 Feb 2006 15:43:26 -0800, "Paula"
wrote:

I am building a multiple linear regression model to predict peak power demant
using maximum daily temerature (in degrees) and the day of the week as
independent variables. I am unsure how to code the days of the week in order
to get the result I want. (when I use the days - the regression add-in tool
states that I'm not using the correct type of data, its non-numeric). I
believe this model will have 7 seperate independent variables, but am unsure
on how to get there.


Sunday = 1
Monday = 2

etc.

or, if you have actual dates, use the WEEKDAY worksheet function.


--ron
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dav
 
Posts: n/a
Default How do I put days of the week into a multiple regression model?


If I understand correctly coding Monday to 1, Tuesday to 2 etc will
create one variable for days of the week and assume that tuesday is
double monday! I don't think this is what you want.

You need to create 7 variables
One for each day eg 1 if monday 0 if not as one variable, 1 if tuesday
0 if not etc. Although arguably you could get way with six variables as
if it is not mon-sat it has to be sunday!
day mon tue wed thu fri sat sun
Monday,1,0,0,0,0,0,0
Tuesday,0,1,0,0,0,0,0
Wednesday,0,0,1,0,0,0,0
Thursday,0,0,0,1,0,0,0
Friday,0,0,0,0,1,0,0
Saturday,0,0,0,0,0,1,0
Sunday,0,0,0,0,0,0,1


Regards
Dav


--
Dav
------------------------------------------------------------------------
Dav's Profile: http://www.excelforum.com/member.php...o&userid=27107
View this thread: http://www.excelforum.com/showthread...hreadid=508797

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to use multiple regression Dave in naigeria Excel Discussion (Misc queries) 4 October 19th 05 04:32 AM
multiple regression indiana_jones81 Excel Worksheet Functions 3 October 18th 05 05:27 PM
multiple regression September21 New Users to Excel 5 September 26th 05 12:48 AM
Multiple Regression in Excel 2002 SP3 (Office XP)? KA Excel Worksheet Functions 3 September 23rd 05 02:50 AM
formula for linear regression DBane Excel Worksheet Functions 14 September 1st 05 10:54 PM


All times are GMT +1. The time now is 03:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"