Learn R Programming

BCSreg (version 1.1.1)

extra.parameter: Select the Extra Parameter of a Box-Cox Symmetric Regression Model

Description

Estimation of the extra parameter in a Box-Cox symmetric or zero-adjusted Box-Cox symmetric regression model based on the Upsilon goodness-of-fit statistic and the profile log-likelihood.

Usage

extra.parameter(
  object,
  family,
  grid = seq(1, 30, 2),
  trace = TRUE,
  plot = TRUE,
  control = BCSreg.control(...),
  ...
)

# S3 method for extra.parameter print(x, ...)

# S3 method for extra.parameter plot(x, which = 1, ...)

Value

An object of class "extra.parameter", which is a list containing the fits of the BCS regression model for each value of the extra parameter zeta specified in grid. The object also includes:

  • logLik: a vector with the log-likelihood values for each fit;

  • Upsilon: a vector with the Upsilon statistic values for each fit;

  • grid: the specified grid of values.

The value of the extra parameter (zeta) can be selected using two alternative approaches:

  • the value that minimizes the Upsilon goodness-of-fit statistic;

  • the value that maximizes the log-likelihood.

The print method summarizes the fits by displaying, for each value in grid, the corresponding log-likelihood value and Upsilon statistic. The plot method returns a graph of the Upsilon statistics, highlighting its minimum.

Arguments

object

an object of class "BCSreg", resulting from a call to BCSreg.

family

a character string specifying the symmetric generating family of the BCS distribution. The available options are: "ST", "PE", "SN", "HP", and "SL". The families "NO", "LOI", and "LOII" do not depend on an additional parameter.

grid

a numeric vector of positive values at which the Upsilon statistic and the profile log-likelihood function will be evaluated.

trace

logical; if TRUE, a summary displaying the profile log-likelihood values and the Upsilon statistics is shown.

plot

logical; if TRUE, a plot of the Upsilon statistics evaluated over the specified grid of values is displayed.

control

a list of control arguments specified via BCSreg.control.

...

further arguments passed to BCSreg.control.

x

an object of class "extra.parameter".

which

numeric; if which = 1, the plot shows the Upsilon statistic versus zeta; if which = 2, the plot shows the profile log-likelihood versus zeta.

Author

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

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

References

Medeiros, R. M. R., and Queiroz, F. F. (2025). Flexible modeling of nonnegative continuous data: Box-Cox symmetric regression and its zero-adjusted extension.

Examples

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

## Fit the Box-Cox normal regression as a reference model
fit_bcno <- BCSreg(cpue ~ location + tide_phase |
                location + tide_phase + max_temp, raycatch)

## Use the specifications of the reference model to change the distribution
## to, for example, Box-Cox t, and select the value of the extra parameter:
select_bct <- extra.parameter(fit_bcno, family = "ST", grid = 1:20)

## Class
class(select_bct)

## It is possible to recover the plots:
plot(select_bct)
plot(select_bct, which = 2)

## and the trace:
select_bct

## Selected fit based on the Upsilon statistic
fit_bct <- select_bct[["zeta = 19"]]
summary(fit_bct)

Run the code above in your browser using DataLab