  We develop a Bayesian inference framework to quantify uncertainties in
epidemiological models. We use SEIJR and SIJR models involving populations of
susceptible, exposed, infective, diagnosed, dead and recovered individuals to
infer from covid-19 data rate constants, as well as their variations in
response to lockdown measures. To account for confinement, we distinguish two
susceptible populations at different risk: confined and unconfined. We show
that transmission and recovery rates within them vary in response to facts. A
key unknown to predict the evolution of the epidemic is the fraction of the
population affected by the virus, including asymptomatic subjects. Our study
tracks its time evolution with quantified uncertainty from available official
data from the onset of the epidemic, limited, however, by the data quality. We
exemplify the technique with data from Spain, country in which late drastic
lockdowns were enforced for months. In late actions and in the absence of other
measures, spread is delayed but not stopped unless a large enough fraction of
the population is confined until the asymptomatic population is depleted. To
some extent, confinement could be replaced by strong distancing through masks
in adequate circumstances.
