# Pairwise comparison of least squares means from two separate generalized linear mixed-effects models

How can I test for a significant difference between a pair of least squares means, when each member of the pair comes from a different generalized linear mixed-effects model? The models were constructed using the glmer() function of the lme4 package of R, and the least squares means calculated from the model outputs using the lsmeans() package. The lsmeans package outputs estimates, standard errors and asymptotic upper and lower 95 % confidence intervals for each lsmean, but Df are not available (because results are asymptotic?).

$$SE(m_i-m_j) = \sqrt{SE^2(m_i)+SE^2(m_j)}$$
In the lsmeans package, the summary function produces a data.frame object from which you can programmatically combine the needed standard errors.