  Habitat selection models are used in ecology to link the distribution of
animals to environmental covariates, and identify habitats that are important
for conservation. The most widely used models of this type, resource selection
functions, assume independence between the observed locations of an animal.
This is unrealistic when location data display spatio-temporal autocorrelation.
Alternatively, step selection functions embed habitat selection in a model of
animal movement, to account for the autocorrelation. However, inferences from
step selection functions depend on the movement model, and they cannot readily
be used to predict long-term space use. We recently suggested that a Markov
chain Monte Carlo (MCMC) algorithm could define a step selection model with an
explicit stationary distribution: the target distribution. Here, we explain how
the likelihood of a MCMC step selection model is derived, and how maximum
likelihood estimation can be used for inference about parameters of movement
and habitat selection. We describe the local Gibbs sampler, a rejection-free
MCMC scheme designed to capture important features of real animal movement. The
sampler can be used as the basis for a flexible class of movement models, and
we derive the likelihood function for several important special cases. In a
simulation study, we verify that maximum likelihood estimation can be used to
recover all model parameters. We illustrate the application of the method with
data from a plains zebra.
