winsrch_constrOptim: Find the optimal half-window width combination

Description Usage Arguments Details Value See Also Examples

View source: R/winsrch_constrOptim.R

Description

Find the optimal half-window width combination to use for weighted regression. This differs from winsrch_optim by using constrOptim

Usage

1
2
3
4
5
winsrch_constrOptim(dat_in, ...)

## Default S3 method:
winsrch_constrOptim(dat_in, wins_in = NULL,
  control = list(), lower = c(0.1, 1, 0.1), upper = c(2, 15, 2), ...)

Arguments

dat_in

input data object to use with weighted regression

...

arguments passed to wrtdscv, wrtds, or getwts

wins_in

starting list of window weights for initializing the search algorithm

control

A list of control parameters passed to optim (see details in optim help file).

lower

vector of minimum half-window widths to evaluate

upper

vector of maximum half-window widths to evaluate

Details

This function uses optim to minimize the error returned by wrtdscv for a given window combination. The search algorithm uses the limited-memory modification of the BFGS quasi-Newton method to impose upper and lower limits on the optimization search. These limits can be changed using the lower and upper arguments.

Value

Some stuff

See Also

wrtdscv, winsrch_grid

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
# setup parallel backend
library(doParallel)
ncores <- detectCores() - 1  
registerDoParallel(cores = ncores)

# run search function - takes a while
res <- winsrch_optim(tidobjmean)

## End(Not run)

fawda123/WRTDStidal documentation built on Sept. 20, 2020, 1:41 p.m.