

   FFiinnddss aa ccoonnffiiddeennccee sseett ooff ppaarraammeetteerrss ffoorr aa nneeuurraall nneett ffiitt..

        nnregCI(fit, model=fit$best.model, ngrind=250, ntries=100, npol=20,
        clevel=0.95, cut1=NA, cut2=NA, nfits=500, tol1=1e-06, tol2=1e-09,
        itmax1=250, itmax2=10000, fdata, fout="nnci.out", seed)

   AArrgguummeennttss::

        fit: A nnreg object.

      model: Model number used in finding joint parameter con-
             fidence set. Default is the best model based on
             GCV(2).

     ngrind: Number of coarse optimizations.

     ntries: Number of random starting values for each coarse
             optimization.

       npol: Number of coarse fits improved, i.e polish, using
             smaller minimization tolerance.

     clevel: Confidence level used in finding joint parameter
             confidence set. Default is the 0.95 level.

       cut1: RMSE value corresponding to the clevel confidence
             level.

       cut2: RMSE value corresponding to 80% of the RMSE value
             corresponding to the clevel confidence level.

      nfits: Number of fits (parameter sets) found in the con-
             fidence set. Maximum is 500.

       tol1: Minimization tolerance for coarse optimizations.

       tol2: Minimization tolerance for polish optimizations.

     itmax1: Maximum number of iterations performed in the min-
             imization routine for coarse optimizations.

     itmax2: Maximum number of iterations performed in the min-
             imization routine for polish optimizations.

      fdata: Temporary UNIX file name for the data.

       fout: Temporary UNIX file name for the output.

       seed: Seed used in generating the random parameter
             starts.

   DDeessccrriippttiioonn::

        The joint parameter confidence set for a neural net fit
        is all the neural net parameter sets (theta) such that
        S(theta) <= S(theta^hat)*[1+(p/n-p)*F(p,n-p,alpha)],
        where S(theta) is the residual sum of squares,
        theta^hat is the least- squares estimate of theta, p is
        the number of parameters of the model and n is the num-
        ber of data points. For the F distribution, alpha is
        the probability level.

        The program finds parameter sets which satisfy the
        above inequality.  The value of cut1 is
        RMSE(theta^hat)*sqrt([1+(p/n-p)*F(p,n-p,alpha)]).  The
        value of cut2 is .8*cut1. Approximately 20% of the fits
        will have a RMSE of cut1 and the remaining 80% will be
        uniform between RMSE(theta^hat) and cut1. This distri-
        bution of parameter sets is to make sure that the
        parameter sets cover the confidence region. The actual
        value of cut2 is used only as a check for the covering
        of the confidence region. The returned component sum-
        mary has a count of the fits between cut1 and cut2 and
        also below cut2.

        Parameters of the model are estimated by nonlinear
        least squares. The parameter space has a large number
        of local minimum so the strategy is to generate "many"
        parameter sets at random and iterate these starts with
        a minimization algorithm. The two function parameters
        ntries and ngrid are used in generating the many start-
        ing parameter sets for nonlinear least squares. Ngrind
        is the number of cubes growing geometrically over a
        range of magnitude of parameters. Ntries is the number
        of parameter sets generated at random by a uniform dis-
        tribution in each cube. The best parameter set ( out
        the Ntries ) in each cube is used as the start of a
        coarse optimization.  Npol of these coarse fits are
        selected for further refinement by a minimization with
        smaller tolerance.

        The target RMS for a fit is generated as described
        above. The parameter sets for the confidence sets are
        generated in the polishing stage and in groups of the
        optional argument npol. The file nnregCI.cut contains
        information about the polished fits. The 7th column is
        target RMSE value the 8th column is the difference
        between target RMSE and the root finder's RMSE. The 9th
        column is the value of cut1 and the 10th column is the
        value of cut2.

   VVaalluuee::

        Object of class nnreg. The component model is a list of
        the parameters for each fitted model. Each component
        model is of class netfit.

      model: Component model of class netfit. Includes a list
             of the dimension of the x matrix, the number of
             hidden units used in the model, the mean of each
             column of the x matrix, the mean of the y values,
             the standard deviation of each column of the x
             matrix, the standard deviation of the y values,
             the number of parameters in the model and the
             parameters of model.

    summary: Partial Fortan program output. Summary of the
             nnreg fit. Includes a summary of the specified
             number of fitted values.

       call: Call to the function.

          x: Matrix of independent variables.

          y: Vector of dependent variables.

          n: Number of observations or length of y.

      nfits: Number of fits (parameter sets) found in the con-
             fidence set.

       seed: Seed used in generating the random parameter
             starts.

   SSiiddee EEffffeeccttss::

        This function does the bulk of the computation using a
        stand-alone FORTRAN program running in the UNIX shell.
        This operation is transparent to the user. For large
        problems the input files can be setup using this func-
        tion and the fitting program can be run separately in
        the background.

   RReeffeerreenncceess::

        B.A. Bailey, S. Ellner, D.W. Nychka. 1996. Chaos with
        Confidence: Asymptotics and Applications of Local Lya-
        punov Exponents. Proceedings on Nonlinear Dynamics and
        Time Series, Building a Bridge Between the Natural and
        Statistical Sciences. Fields Institute Communications.

        S. Ellner, D.W. Nychka, and A.R. Gallant. 1992. LENNS,
        a program to estimate the dominant Lyapunov exponent of
        noisy nonlinear systems from time series data. Insti-
        tute of Statistics Mimeo Series #2235, Statistics
        Department, North Carolina State University, Raleigh,
        NC 27695-8203.

        D.W. Nychka, S. Ellner, D. McCaffrey, and A.R. Gallant.
        1992. Finding Chaos in Noisy Systems. J. R. Statist.
        Soc. B 54:399-426.

   SSeeee AAllssoo::

        predict.nnreg, predict.netfit, plot.nnreg, sum-
        mary.nnreg, print.nnreg

   EExxaammpplleess::

        nnreg(ozone$x,ozone$y,1,2) -> fit # fitting a surface to ozone
        # measurements, from 1 to 2 hidden units

        nnregCI(fit) -> fit.ci # finds 500 fits in the .95 confidence set based
        # on the best model from the above fit

