fixing a bug and some simple codes -- 2

Job ID: 34242010

Budget: £10 – £80 GBP

I was trying to run a regression, most of the codes are done. There are a few variables, momentum, book-to-market, and market cap.. Originally, it runs well with the above variable. I tried to replace one of the variable with another variable (pe ratio) (empirical analysis sheet, row 70), which are also numerical values. However, the regression won't work.
Apart from fixing the bug, I have 2 more simple tasks. The first one is to sort the average pe ratio and return according to sector code, the second one is to find the average return and average pe ratio of each year.
Related categories: MATLAB Regression Testing