Develops identification and sieve estimation of a flexible demand system using general-equilibrium restrictions in international trade. Establishes large-sample properties of the estimator, a test of CES demand, and counterfactual estimators.
Ordered differencing offers a simple way to estimate partially linear models without choosing a data-dependent tuning sequence, such as a bandwidth or series length. By comparing neighboring observations along a scalar index, it removes a smooth nuisance component without estimating that component directly. When the index is estimated, however, small first-stage errors can change the ordering and hence the pairs used in estimation. Just as in matching on an estimated propensity score studied by Abadie and Imbens (2016), this discontinuity prevents direct application of the usual smooth two-step argument. We develop asymptotic theory that accounts for the generated ordering while keeping the differencing order fixed. We establish asymptotic normality, characterize the contribution of first-stage estimation to the limiting distribution, and provide valid inference through subsampling. We apply the method to semiparametric sample selection and examine its performance through simulations and a wage-equation illustration.