Force R to include 0 as a value in a regression of counts vs year
问题 Not sure whether this question would be better off at Cross Validated, but I think it is as much of a programming question as a pure statistical one. I have a 102 x 1147 data frame where there are years (between 1960 and 2016) and each record is a scientific paper. I count the number of papers published each year within certain topics (guided by values in specific columns), and I want to calculate the linear slope from the year and the annual count of the number of papers. Here's my script,