back to main page

The main menu

 

NEW
LEMA
SPAR
INFO
EVMF
PLOT

and after [NXT] you will see
 
 


CNFI
PCNFI
GDMF
     

Click on the items to browse the documentation.



NEW


is the basic input command. [NEW] opens an  InputForm screen and you are
asked to enter the data and a model function f. The field DATA takes a matrix
with at least 2 columns and any number of rows.

  1. column:  x-values  (indep.)
  2. column:  y-values  (depen.)
  3. column:  errors of y-valuesI
If you enter a matrix with only 2 columns then moda will assume that theerrors
of the y-values are all equal to 1.

This is also the place to choose between chi-square- and least-squarefitting:
entering a matrix with only two columns tells moda that you want to use
least-square fitting (which is the only possibility, since you didn't enter any
measurement errors) ... entering a matrix with 3 columns tells moda thatyouwant
to use chi-square fitting.

Enter the model function f in the field named MODEL. f should depend on  X  and
on at least one parameter which may have any name. Via the menu item [CAT]
you can access the catalog of fit functions.

[OK] will lead you to a new screen where you are asked to enter the initial values
of the parameters a_i.

moda does some checks on the data and on the model function f ... it gives the
error message 'invalid input' if the data or the model function are 'invalid' for some
reason. (see error messages for more details)



LEMA        (LEvenberg-MArquardt)


The fitting is done in separate steps which are called iterations.The subroutine
LEMA performs a specified number of these iterations and LEMA takes therefore
one positive integer from the stack which counts the number of iterations.
The result of these iterations is a new (better) set of parametersa_i. LEMA puts
the value of chi^2 that corresponds to these new parameters on thestack.



SPAR      ( Show PARameters)

lists the current values  of  the parameters a_i.
 


INFO


gives the current value of chi^2 together with a probability. Both quantities
measure the 'goodness of the fit'. [INFO] also gives the covariance matrix.
chi^2 is a number between 0 and infinity; it measures  the difference  between
the data and the model function f(x,a_i) in a specific way. The smaller the value
of chi^2 the better is the fit.
It takes some more lines to explain the meaning of the probability:
Suppose your model function f  is  the correct model functionin the sense
that the deviations of the data from the values of f are only dueto random
measurement errors. One could ask:    What is the probabilitythat random
measurement errors do produce a value of chi^2 as poor (i.e. as large) as the
current value of chi^2? This probability is given by [INFO] together with the
corresponding value of chi^2. The closer the value  of this probability is to 1 the
better is the fit.



EVMF      (EValuate ModelFunction)


takes a number from the stack and calculates the  value ofthe modelfunction
f for this argument and for the current values of the parameters a_i.



PLOT


plots the data-points together with the model function  f for the current values
of the parameters a_i.



CNFI     (CoNFIdence limits)


takes a number x from the stack and calculates the variance sigma(x) of the model
function (with the current parameter estimates) at x. I.e. the value of the model
function f at x will be between

             f(x) PlusMinus 2*sigma(x)

with a probability of 0.95, etc. [CNFI] thus gives the size of the one-sigma
confidence interval (for the value of the model function).



PCNFI    (Plot CoNFIdence limits)


takes a number p from the stack and plots the three functions

           1. f(x)
           2. f(x)+ p*sigma(x)
           3. f(x)- p*sigma(x)

where f(x) is the model function and sigma(x) is the variance of f.I.e. setting p=2
will plot f(x) (for the current parameters) together with the functions(2.) and (3.)
which are the upper and the lower bound for the 95% confidence interval.



GDMF     (Get Data and Model Function)


Puts the data matrix and the model function on the stack; the currentvalues of the
parameters are substituted in the model function.