weightings.xml - SuperCROSS
The weightings.xml file is used to configure client-side weightings for SuperCROSS. There must be one weightings XML file for each weighted database.
File Name | <database_id>_weightings.xml or <sxv4_filename>_sa_weightings.xml (depending on which weighting setting is selected for this database) If you have opened the database in local mode, then the database ID is set when you add the SXV4 to the Catalogue in SuperCROSS. You can check the location and ID of local databases by looking at the If you have opened the database through SuperSERVER then you can check the ID using the |
---|---|
Location | For databases opened in local mode, the file must be in the same location on disk as the SXV4 database file. If you opened the SXV4 by connecting to SuperSERVER, then the weightings file must be located in the The default DB path is not set by default, so if you have not already done so you will need to specify a directory, either by adding it to the ssii.ini configuration file directly or by going to Edit > Options > Configuration > SXV4 and Local Access in SuperCROSS and setting the SXV4 Default DBPath. You will need to restart SuperCROSS to apply this change. |
Example
<DATABASE_WEIGHTINGS dbid="weightedsurvey" formula_file="formulas.xml">
<WEIGHT id="Replicate weights" type="Replicate" level="Person">
<CODE>Main Weight</CODE>
<CODE>Weight Replicate 1</CODE>
<CODE>Weight Replicate 2</CODE>
<CODE>Weight Replicate 3</CODE>
<CODE>Weight Replicate 4</CODE>
<CODE>Weight Replicate 5</CODE>
</WEIGHT>
<WEIGHT id="Main Weight" type="Single" level="Person"/>
<COEFF measure="all" weight_id="all">
<VAR id="?" value="1.64"/>
</COEFF>
<COEFF measure="all" weight_id="Replicate Weights">
<VAR id="G" value="5"/>
</COEFF>
<COEFF measure="all" weight_id="all">
<VAR id="N" value="15601100.0"/>
<VAR id="n" value="11950.0"/>
<VAR id="DEFT" value="1"/>
</COEFF>
</DATABASE_WEIGHTINGS>
Structure
<DATABASE_WEIGHTINGS> | The root element. It has the following attributes:
| ||||||||
---|---|---|---|---|---|---|---|---|---|
<WEIGHT> | This element defines a set of weighting factors. The weightings file may contain multiple instances of the Each
| ||||||||
<CODE>Name</CODE> | This element is required for replicate weights only. There must be one The name must match the name of the column in the fact table that contains the weighting factor. | ||||||||
</WEIGHT> | The end of the weighting factor definition. | ||||||||
<COEFF> | This element defines any constant coefficients that are used in the formulas. These coefficients will be passed to the formulas file and can be used to define settings such as the size of the unweighted and weighted populations, and the number of replicate weights.
| ||||||||
<VAR ... /> | The coefficient definition:
Although you can use any
| ||||||||
</COEFF> | End of the coefficient definitions. | ||||||||
</DATABASE_WEIGHTINGS> | End of the database weighting definitions. |