Dear Experts,
I am trying to test seasonality of my data and have 3 years worth of weekly sales. I want to create 51 dummy variable for 52 weeks in a year, but my concern is does my matrix with with ones and zeroes continue for 51 rows or till the end of my data, which is 160 rows.
Thank you in advance
Regards Elmira
Answer by jkpeck (6143) | Aug 18, 2017 at 12:56 PM
Creating so many dummies may not be a good idea, but assuming that you have a variable giving the week number within the year, use Transform > Create Dummy Variables to make a dummy for each week. It will make 51 (or maybe 52) dummy variables.
Answer by Elmirahon (1) | Aug 18, 2017 at 01:08 PM
Hi JKPECK,
Thank you for quick reply. I dont like to do so many variables myself. My concern is if I have 160 rows data, which is 52 weeks for 3 years plus couple of months for 4th year, should my dummy variables last till end of 160 rows.
Thank you so much for quick replies.
Elmira
Python formatted strings and SPSS variables 0 Answers
Where to download SPSSAUX? 4 Answers
PS Matching command 26 Answers
Rotate Inner Column Labels 2 Answers
Problems getting variable names 13 Answers