  We determine the total dynamical density in the solar neighbourhood using the
Tycho-Gaia Astrometric Solution (TGAS) catalogue. Astrometric measurements of
proper motion and parallax of stars inform us of both the stellar number
density distribution and the velocity distribution of stars close to the plane.
Assuming equilibrium, these distributions are interrelated through the local
dynamical density. For the first time, we do a full joint fit of the velocity
and stellar number density distributions while accounting for the astrometric
error of individual stars, in the framework of Bayesian Hierarchical Modelling.
We use a sample of stars whose distance extends to approximately 160 pc from
the Sun. We find a local matter density of $\rho_0 =
0.119^{+0.015}_{-0.012}~M_\odot$pc$^{-3}$, where the result is presented as the
median to the posterior distribution, plus/minus its 16th and 84th percentiles.
We find the Sun's position above the Galactic plane to be $z_\odot =
15.3^{+2.24}_{-2.16}$ pc, and the Sun's velocity perpendicular to the Galactic
plane to be $W_\odot = 7.19^{+0.18}_{-0.18}$ km/s.
