Evolutionary models appropriate for analyzing nucleotide sequences tha
t are subject to constraints on secondary structure are developed. The
models consider the evolution of pairs of nucleotides, and they incor
porate the effects of base-pairing constraints on nucleotide substitut
ion rates by introducing a new parameter to extensions of standard mod
els of sequence evolution. To illustrate some potential uses of the mo
dels, a likelihood-ratio test is constructed for the null hypothesis t
hat two (prespecified) regions of DNA evolve independently of each oth
er. The sampling properties of the test are explored via simulation. T
he test is then incorporated into a heuristic method for identifying t
he location of unknown stems. The test and related procedures are appl
ied to data from ribonuclease P RNA sequences of bacteria.