Don't worry about whether "of" is there or not. The rule is pretty simple: for a calendar year you should use either just the bare number "2016" or the full phrase "the year 2016" including the article. Those are the only two choices and you can use these two forms interchangeably. The short form is, well, shorter, while the long form makes it unambiguous that the numeral you're using indicates a year.
By the end of 2016, the population had doubled. [correct]
By the end of the year 2016, the population had doubled. [correct]
By the end of year 2016, the population had doubled. [incorrect - not one of the two choices]
I picked 2013 as a starting point. [correct]
I picked the year 2013 as a starting point. [correct]
The only time you use "year N" without the definite article is as a substitute for an ordinal number of years, meaning the "Nth year" of something happening:
By year three of the experiment, the population had doubled.
This means the same as:
By the third year of the experiment, the population had doubled.
Edited to add:
Someone has pointed out that in corporate financial reports, you will see sentences like "By end of year 2018, we expect are return to profitability." This seems to contradict my simple rule above.
The short answer: this is business jargon and you can't always expect jargon to follow standard rules.
The long answer: sometimes a adjectival phrase can be put in front of the numerical year. In that case, you keep the adjectival phrase whole, even if it happens to contain the word "year". For example "fiscal year 2018" doesn't have a "the" in front of the word "year" because "fiscal year" is an adjectival phrase that's been applied to the numerical year "2018". "End of year 2018" is similar, and it's a jargony way of writing "when financial results are finalized at the end of 2018."