ERRFIT The program ERRFIT calculates formal errors in the parameters of a model. The model must have been previously optimized using the program MODELFIT, otherwise ERRFIT will get confused. Use of the program is rather similar to the program MODELFIT. ERRFIT will ask for a MERGE file, a model file, and a list of the parameters in the model that are allowed to vary. The program does not modify the input model, but must know what parameters can vary in a model fitting. All those parameters that were actually modified in the model fitting procedure must be specified, and errors are calculated for all them. The program allows room for up to 20 free parameters. If the input model has more than 20, errors can be evaluated on a subset of the model. However, when analysing one parameter one must allow to vary all the other parameters that are likely to be correlated with it. For example, the flux density in one component is usually correlated with all the other flux densities. The absolute scale of the errors in the visibility data is not important, since the program estimates these errors from the scatter in the data. Is very important, instead, the timescale over which errors are systematically correlated. The program asks then for a "true number of degrees of freedom" in the input dataset. This number is roughly equal to the number of antennas times the number of observing hours, if most of the errors are calibration closure errors. Parameter errors scale roughly as the inverse square root of this number. Sometimes, the program finds that a parameter is ill-conditioned. This means that the dependence of chi-squared from this parameter cannot be described reasonably with a parabola. Then a warning is issued, and the parameter is kept constant. Possible causes are: (1) The parameter is not constrained by the data. (2) The parameter has not been optimized. Possible remedies are: (1) increasing the number of degrees of freedom, to explore the chi-squared surface on a narrower region (remember that estimated errors decrease). (2) Find a model with the offending parameter held at a "reasonable" value. (3) Re-optimize the model, trying to vary slightly the offending parameter. The output file (default is the logical name SYS$OUTPUT) contains the following information: 1. Log informations, as names of the input files, of the source, etc ERRFIT Page 2 2. Number of independent data points (amplitudes and independent closure phases) 3. Number of degrees of freedom (given by the user) 4. Agreement factor for the input model 5. Agreement factor for a marginally worse model (at 1 sigma level) 6. Input model, and associated errors 7. Cross correlation matrix 8. Expected variations of other parameters, when one parameter is varied by 1 sigma, and the model is optimized again. Example: $ ERRFIT Program ERRFIT June 3, 1985 G. Comoretto ERRFIT finds the errors for the fit of a optimized model to VLB data. Input data file name: [GC.279]11.AVG Input model file name: 3.MOD Listing file name (default=SYS$OUTPUT): Source:3C279 Initial agreement factor = 3.836769 Now enter an extimate for the number of independent data points: 50 Enter parameters to be varied fore each component Example: to vary flux and axial ratio, enter '15' Flux Radius Theta Axis Ratio Phi Type Comp. 1 5.088 0.000 0.000 0.741 1.0000 0.000 3 : 14 Comp. 2 2.039 1.001 -117.393 0.861 1.0000 0.000 3 : 1234 Comp. 3 1.419 2.177 -145.748 0.868 1.0000 0.000 3 : 1234 Input data file: CITSCR:[GC.279]11.AVG;1 Input model file: CITSCR:[GC.ERR]3.MOD;2 Source: 3C279 Day 342 Year 1984 10650.89 MHz Equivalent number of independent data points: 551 Degrees of freedom used to calculate chi squared: 50 Total amplitude agreement factor: 4.442 Total phase clo agreement factor: 2.263 Total agreement factor: 3.837 Agr. factor at 1 sigma confidence level: 3.875 Parameter 1: Flux of component 1 is 5.0878 +/- 0.0949 Jy Parameter 2: Axis of component 1 is 0.7412 +/- 0.0238 mas Parameter 3: Flux of component 2 is 2.0390 +/- 0.1969 Jy Parameter 4: Radius of component 2 is 1.0006 +/- 0.0485 mas Parameter 5: Theta of component 2 is -117.3927 +/- 5.8244 deg ERRFIT Page 3 Parameter 6: Axis of component 2 is 0.8610 +/- 0.1455 mas Parameter 7: Flux of component 3 is 1.4195 +/- 0.1706 Jy Parameter 8: Radius of component 3 is 2.1767 +/- 0.1650 mas Parameter 9: Theta of component 3 is -145.7480 +/- 3.2748 deg Parameter 10: Axis of component 3 is 0.8676 +/- 0.1419 mas Cross correlation matrix: J I=1 2 3 4 5 6 7 8 9 10 1 1.00 0.87 -0.40 0.05 -0.22 -0.71 -0.19 -0.43 0.44 -0.74 2 0.87 1.00 -0.48 0.00 -0.14 -0.89 -0.13 -0.56 0.60 -0.88 . . 9 0.44 0.60 -0.59 -0.24 0.00 -0.72 0.23 -0.97 1.00 -0.48 10 -0.74 -0.88 0.22 -0.25 0.27 0.80 0.39 0.37 -0.48 1.00 Expected variation of p[i] when p[j] is varied at 1 sigma level: J I=1 2 3 4 5 6 7 8 9 10 1 0.09 0.02 -0.08 0.00 -1.25 -0.10 -0.03 -0.07 1.44 -0.11 2 0.08 0.02 -0.09 0.00 -0.84 -0.13 -0.02 -0.09 1.95 -0.13 . . 9 0.04 0.01 -0.12 -0.01 -0.03 -0.10 0.04 -0.16 3.27 -0.07 10 -0.07 -0.02 0.04 -0.01 1.56 0.12 0.07 0.06 -1.56 0.14 FORTRAN STOP Program History: Version 1.0: 1985 Jun 16 - new program (Giovanni Comoretto).