nnreg(x, y, k1, k2, start, ngrind=250, ntries=100, npol=20, glow=-1.26, ghigh=1.26, scale=0.5, fdata, derivative=F, fout="nnreg.out",run=T, just.setup=F, just.read=F, fitted.values=F, all.fits=F, greedy=F, seed)
x
| Matrix of independent variables. |
y
| Vector of dependent variables. |
k1
| Lower limit for K, where K is the number of hidden units. |
k2
| Upper limit for K. |
start
| Starting values for parameters. |
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. |
glow
| Lower limit for grid of initial parameter values. |
ghigh
| Upper limit for grid of initial parameter values. |
scale
| Scale factor for grid of initial parameter values. |
fdata
| Temporary UNIX file name for the data. |
derivative
| Return the derivative evaluated at the data points. |
fout
| Temporary UNIX file name for the output. |
run
| Runs the fitting program. |
just.setup
| Sets up the input files but does not run the fitting program. |
just.read
| Does no fitting, just reads in the results from a previous fit. |
fitted.values
| Computes fitted values and residuals. |
all.fits
| Includes all polished fits in the output file not just the best one. |
greedy
| A value of zero fits the full model by nonlinear least squares. A positive value uses the greedy algorithm to fit hidden units in chunks of size greedy, sequentially adding hidden units fit to the residuals of the previous fit. |
seed
| Seed used in generating the random parameter starts. |
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 polished values. |
fitted.values
| Predicted values from the fit. |
residuals
| Residuals from the fit. |
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 different model specifications. |
lags
| Time lags used in the x matrix, if a time series model. |
seed
| Seed used in generating the random parameter starts. |
best.model
| Number of the best model based on GCV with cost=2. |
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.
nnreg(ozone$x,ozone$y,1,2) -> fit # fitting a surface to ozone # measurements, from 1 to 2 hidden units plot(fit) # plots fit and residuals nnreg(as.matrix(BD[,1:4]),BD[,5],2,4) -> fit # fitting DNA strand # displacement amplification surface to various buffer compositions plot(fit) # plots fit and residuals