  This paper presents a detailed description of the CamSpec likelihood which
has been used to analyse Planck temperature and polarization maps of the cosmic
microwave background since the first Planck data release. We have created a
number of likelihoods using a range of Galactic sky masks and different methods
of temperature foreground cleaning. Our most powerful likelihood uses 80
percent of the sky in temperature and polarization. Our results show that the
six-parameter LCDM cosmology provides an excellent fit to the Planck data.
There is no evidence for statistically significant internal tensions in the
Planck TT, TE and EE spectra computed for different frequency combinations. We
present evidence that the tendencies for the Planck temperature power spectra
to favour a lensing amplitude A_L>1 and positive spatial curvature are caused
by statistical fluctuations in the temperature power spectra. Using our
statistically most powerful likelihood, we find that the A_L parameter differs
from unity at no more than the 2.2 sigma level. We find no evidence for
anomalous shifts in cosmological parameters with multipole range. In fact, we
show that the combined TTTEEE likelihood over the restricted multipole range
2-800 gives cosmological parameters for the base LCDM cosmology that are very
close to those derived from the full multipole range 2-2500. We present revised
constraints on a few extensions of the base LCDM cosmology, focussing on the
sum of neutrino masses, number of relativistic species and the tensor-scalar
ratio. The results presented here show that the Planck data are remarkably
consistent between detector-sets, frequencies and sky area. We find no evidence
in our analysis that cosmological parameters determined from the CamSpec
likelihood are affected to any significant degree by systematic errors in the
Planck data (abridged).
