Learn R Programming

BCSreg (version 1.1.1)

BCSregcontrol: Auxiliary for Controlling a Box-Cox Symmetric Fitting

Description

Optimization parameters that control the fitting of Box-Cox symmetric or zero-adjusted Box-Cox symmetric regression models using the BCSreg function.

Usage

BCSreg.control(
  lambda = NULL,
  method = "BFGS",
  maxit = 2000,
  hessian = FALSE,
  trace = FALSE,
  start = NULL,
  ...
)

Value

A list with components named as the arguments.

Arguments

lambda

numeric indicating the value of lambda (if NULL, lambda will be estimated).

method

character specifying the method argument passed to optim.

maxit, trace, ...

arguments passed to optim.

hessian

logical. Should the numerical Hessian matrix from the optim output be used for estimation of the covariance matrix. By default the analytical solution is employed.

start

an optional vector with starting values for the regression coefficients associated with the mu and sigma submodels (starting value for the lambda or the zero-adjustment parameters must not be included).

Author

Francisco F. de Queiroz <felipeq@ime.usp.br>

Rodrigo M. R. de Medeiros <rodrigo.matheus@ufrn.br>

Details

The BCSreg.control controls the fitting process of Box-Cox symmetric models. Almost all the arguments are passed directly to optim, which is used to estimate the parameters. Starting values for the regression coefficients associated with the mu and sigma submodels can be provided via start argument. The starting value for the skewness parameter lambda is zero; that is, the fitting process starts from the corresponding log-symmetric regression model. If the estimation process is to be performed with a fixed lambda, a value must be specified for the lambda argument. A natural value is lambda = 0, where a log-symmetric regression model will be estimated.

When a regression fit with a zero-adjusted BCS distribution is performed, the regression coefficients associated with the zero-adjustment parameter are estimated using the glm function.

See Also

BCSreg

Examples

Run this code
## Data set: raycatch (for description, run ?raycatch)
hist(raycatch$cpue, xlab = "Catch per unit effort")
plot(cpue ~ tide_phase, raycatch,
     xlab = "Tide phase", ylab = "Catch per unit effort")

### Fit a Box-Cox normal regression model:
fit_bcno <- BCSreg(cpue ~ tide_phase, raycatch)
fit_bcno

### Fit a log-normal regression model (setting lambda = 0):
fit_lno <- BCSreg(cpue ~ tide_phase, raycatch, lambda = 0)
fit_lno

### Standard errors obtained from the numerical Hessian matrix
### provided by optim instead of the analytical solution:
fit_bcno2 <- BCSreg(cpue ~ tide_phase, raycatch, hessian = TRUE)
fit_lno2 <- BCSreg(cpue ~ tide_phase, raycatch, lambda = 0, hessian = TRUE)

# In this case, there are differences only in the eighth decimal place:
vcov(fit_bcno)
vcov(fit_bcno2)

# In this case, there are no differences:
vcov(fit_lno)
vcov(fit_lno2)

Run the code above in your browser using DataLab