[Next] [Up] [Previous] [Contents]
Next: Invocation of the program Up: Usage of the package Previous: OUTPUT <output string> [output   Contents

Example definition file

The following file will cause the SVP to read data for three variables, perform a few tests, and output information to the screen and to files for later retrieval. Comments in the file explain each point.

/* Sample definitions file for SVP */

/*
 * the global ID and score is written to the standard output 
 */

OUTPUT "Score for $ID is $SCORE computed at $DATE\n"

/*
 * Variable VAR1 is not very well known and it is checked only for 
 * feasible boundaries and steady state; the reference data needed are 
 * written directly here
 */

VARIABLE Var1

	/* read values from mydata.dat, column 0 */

	DATA FILE mydata.dat INDEX 0

	/* acceptable boundaries are as specified */
	
	REFERENCE READ 0.5 5.5

	/* do a weighted boundaries test with increased sensitivity 
	 * Test value counts twice the following STEADY test
	 */

	TEST WBOUNDS k=2 WEIGHT 2
	TEST STEADY 

	/* append the variable name and global score to vscores.out */
	OUTPUT "$ID $SCORE\n" vscores.out+

	/* write the slope of the regression line and the WBOUNDS test
	 * value to var1.out
	 */
	OUTPUT "Slope = $STEADY(SLOPE) - Wbounds = $WBOUNDS\n" var1.out

/* Variable TimeVar counts twice the other in computing the global score:
 * it should have periodic behavior as the reference data but the parameters
 * are not precise enough to expect the same phase or boundaries, so the
 * boundaries are checked independently and a fit test is not done 
 */

VARIABLE TimeVar WEIGHT 2

	REFERENCE FILE RefSeries.dat
	DATA FILE TimeData.dat

	/*
	 * check if data have similar boundaries using the WCINT test
	 */ 

	TEST WCINT

	/*
	 * check for similar frequency components
	 */

	TEST FREQ 

	/* append the variable name and global score to vscores.out */
	OUTPUT "$ID $SCORE\n" vscores.out+

	/* store the periodogram of the data in tperiod.out */
	OUTPUT "$FREQ(DATA_PERIODOGRAM)" tperiod.out	

/* Variable Var3 should fit exactly the reference data so we test the
 * inequality with the THEIL test; we know that the measurements have
 * been done with a instrument which could have been poorly calibrated,
 * so we allow a slightly higher score if the error has up to 15% bias
 * component
 */ 

VARIABLE Var3

	REFERENCE FILE Var3.dat
	DATA FILE V3_actual.dat

	TEST THEIL WEIGHT 2

	TEST ERRCOMP bias=15 variance=0 random=100

	/* append the variable name and global score to vscores.out */
	OUTPUT "$ID $SCORE\n" vscores.out+



Ferdinando Villa 2002-12-23