I have a problem with my data. I want to have a dummy variable to indicate the week number in the year as a predictor. When I look into it, it seems that I need to have 51 dummy variables, and my results become strange when running the code in R. How can I add dummy variables to indicate the week of year for linear regression as a predictor? And is that a good idea?
I have tried to do this in R, but my results become somewhat wrong.