Should you include time as a continuous predictor when estimating incidence or prevalence? Suppose one has a time series of disease counts and populations (at risk, total etc.) or, equivalently, binary events of disease status.
Then suppose one wanted to present estimates of incidence or prevalence over the time series.
One could calculate separate estimates for each year. I believe this would be the same as a regression model with dummy variables for each year. Or is it better to fit time (e.g. year) as a continuous explanatory variable (linear, polynomial, spline etc.)? In the former case, the estimate at each year is not influenced by estimates at other time points. In the latter, I think the estimate at each year would be "adjusted" by the trend. Im thinking that this would provide a better estimate at a given time point, since it's taking other time points into account (more so the closer in time).
I'm not sure if I'm missing something obvious, but would appreciate some guidance on whether my thoughts make any sense and which approach might be better.

Your intuition is correct.  Time is continuous and needs to be analyzed as such.  But also think about decomposing time into long-term smooth nonlinear trends and seasonal variation.  An example is here.  A spline is used for the long-term trend and a harmonic series for seasonal effects.
