The list has three components: the first reports the error message, the second stores a vector identifying the data subsets that have been hit by the anomaly, the third reports the call to collapse.strata that generated the list. In order to help the user to identify such data anomalies, hence taking a step forward to eliminate them, every call to collapse.strata generates, by side effect, a diagnostics data structure named into the. Strata Collapse Process DiagnosticsĪs already observed in the ‘Details’ Section, there are three non trivial reasons why function collapse.strata can run into errors: (1) the blocks cut across strata, (2) some blocks contain a stratum needing to be aggregated while this stratum happens to be the only one inside the block, (3) the similarity score for strata aggregation varies inside strata. If design has been built by passing strata sampling fractions via the fpc argument, the function re-computes sampling fractions inside superstrata by exploiting the achieved mapping of strata to superstrata and the fpc slot of design. The collapse.strata function handles correctly finite population corrections. The choice to collapse strata in pairs has been taken because it is known to be appropriate for large-scale surveys with many strata (at least for national level estimates, see e.g. due to constraints, with at most three design strata inside a superstratum. Therefore, in general, superstrata will contain only two design strata. The collapsing algorithm will, whenever possible, build superstrata by pairing a lonely stratum to another not-yet-aggregated stratum. sim.score=NULL), the achieved strata aggregation will depend on the ordering of input sample data in design. Note that if no similarity score is specified (i.e. Only one design variable can be referenced by the sim.score formula: (i) it must be of type numeric, (ii) it must be constant inside each stratum, and (iii) it should be positive (otherwise its abs() will be silently used). Thus the similarity of two strata is actually measured by the (absolute value of the) difference among the corresponding sim.score values. This means that each lonely stratum will be collapsed with the stratum that has the most similar value of variable sim.score inside the block. The optional argument sim.score can be used to specify a similarity score for strata aggregation. lonely strata which are a singleton inside a block). Errors will be raised if (i) blocks cut across strata, or (ii) block.vars generate any non-aggregable strata (i.e. The design variables referenced by block.vars (if any) should be of type factor. If block.vars=NULL (the default option), no constraint will act on collapsing. More specifically: first, blocking variables are used to partition sample data in “blocks” via factor crossing, then, only lonely strata belonging to the same block are aggregated. The optional argument block.vars identifies “blocking variables” that can be used to constrain the way lonely strata are collapsed to form superstrata. The basic idea is to build artificial “superstrata” by aggregating strata containing lonely PSUs to other strata, and then to use such superstrata for variance estimation (see e.g. The collapse.strata function implements a widely used alternative: the so called collapsed strata technique. As a general solution, the ReGenesees package can handle the lonely PSUs problem by setting proper variance estimation options (see ReGenesees.options). PSUs which are alone inside a not self-representing stratum) are a concern from the viewpoint of variance estimation. With the most similar stratum in each block (see ‘Details’). If NULL (the default option) no constraintsįormula specifying a similarity score for strata: lonely strata will be paired Object of class analytic (or inheriting from it) containing survey data and samplingįormula specifying blocking variables: only strata belonging to the same block will beĪggregated (see ‘Details’). collapse.strata( design, block.vars = NULL, sim.score = NULL) Arguments design Modifies a stratified design containing lonely PSUs by collapsing its design strata into superstrata.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |