Using microSynth is easy when the models used to calculate weights are feasible. But as more variables are used for matching, especially when data is scarce or variables are sparse, the risk of an infeasible model increases. Below is a quick guide to how to troubleshoot model feasiblity issues.
Model infeasibility becomes increasingly likely when:
As there are multiple causes of model infeasibility, there is an equally broad range of responses.
If a model is found to be infeasible, the problem may trace back to matching variable specification. We recommend the following diagnostic steps:
hist()
or table()
) to check for sparseness. Sparse variables are difficult to match on without large sample sizes.match.out
/match.covar
) to best-possible matches (match.out.min
/match.covar.min
), or aggregate time-variant variables before matching.When attempts to match on a sparse variable cause model infeasibility, there are several solutions:
match.covar
to match.covar.min
; if the variable is time-variant, move it from match.out
to match.out.min
.match.out
or match.out.min
a vector of variable names, and specify the aggregation periods using period
.If varying the specification of matching variables is not satisfactory, the user can set the parameters microSynth() uses for the calculation of weights.
max.mse
may be raised. This relaxes the constraint governing matches for variables passed to match.out
and match.covar
.maxit
, cal.epsilon
, calfun
, and bounds
, which correspond to parameters from the survey::calibrate()
and govern the calculation of weights.By default microSynth() attempts to calculate weights using simple methods. But because these are not always sufficient to produce a feasible model, two arguments, check.feas
and use.backup
, specify how microsynth should find and use less restrictive backup models. The two arguments do not interact and can be set independently.
check.feas = TRUE
will search for a single model that yields satisfactory constraints for all purposes: estimating main weights, permutation weights, and jackknife residuals. The same model will be used for all purposes.
use.backup = TRUE
will calculate the main weights without checking for feasibility, but if weights appear to be poor (i.e., they do not satisfy the max.mse condition), then weights will be re-calculated using another model. This way, different backup models may be used for different purposes (i.e., for estimating main weights, permutation weights, and jackknife residuals).