Must be located in the same directory as the weightings file and the SXV4 database.
Notes
The "Standard Error of Sum (JK) of Sum" formula shown in the sample below has been implemented in SuperSERVER.
The <LABELTEMPLATE> setting lets you configure the text string used to describe the weighted sum of a record type.
If formula.xml is used by SuperSERVER and not SuperWEB2, Space-Time Research recommends that the label template contain only "%MEASURE" . This place holder will be replaced by the record type count name of the Main Weight defined in the weightings configuration file. In this case, "%FUNCTION" and "%WEIGHT" are not processed by SuperSERVER and they are copied into the newly created display names. For example:
If the label template does not contain "%MEASURE", the label template is used as a prefix for the display name of the Main Weight.
If the label template is empty, the Main Weight's names will not change.
Supported Forumla Types
The type element of the <FORMULA> tag indicates the type of formula. There are three supported types of formula:
SMSW
Single Measure Single Weight
These formulas can be expressed as:
A derivation that can be dependent upon any of the following:
measure
weight
level count (need to specify if required)
math UDF (possibly more than one)
constant coefficients
A math UDF, expressed in terms of measure and/or weight. The UDF itself is dependent on measure and weight (only Math UDFs are supported).
SMRW
Single Measure Replicate Weight
These types of formulae are expressed as a derivation that is dependent upon any of the following:
measure
main weight
level count (need to specify if required)
UDF (possibly more than one)
constant coefficients
Sum expression (if required).
“Sum expression” defines an expression that will be repetitively generated for each replicate weight. All of these generated expressions will be added together into one expression and substituted into the derivation expression instead of the "id" attribute of the Sigma node (usually "Sigma").
The Sigma expression is dependent upon any of the following:
measure
replicate weight and main weight (need to specify if not required)
main UDF and replicate UDFs.
More than one type of UDF can be used in a Sigma expression.
UNW
Unweighted
This is a dummy formula that will take no effect on the measure. The original result will be displayed. It is required in the XML file, as it has to get displayed as one of the formulae available for the user to choose from.
Example
XML
<WEIGHTFORMULAS id="type1">
<TAGS measure="measure" measure2="measure2" weight="weight" level="level" all="all"/>
<LABELTEMPLATE expression="%FUNCTION of %MEASURE, by %WEIGHT"/>
...
<!-- Sum -->
<FORMULA id="RSEJK1" name="Standard Error of Sum (JK) of Sum" type="SMRW">
<!-- Single Measure Replicate Weight -->
<UDF id="wx_udf"/>
<COEFF>G</COEFF>
<WEIGHT/>
<SIGMA id="Sigma">
<UDF id="wx_udf"/>
<SIGMA_EXPR>(("wx_udf_i"-"wx_udf")*("wx_udf_i"-"wx_udf"))</SIGMA_EXPR>
</SIGMA>
<DER_EXPRESSION>(Sqrt((("G"-1)/"G") * "Sigma"))</DER_EXPRESSION>
</FORMULA>
...
</WEIGHTFORMULAS>
JavaScript errors detected
Please note, these errors can depend on your browser setup.
If this problem persists, please contact our support.