BivariateFitters {GeDS}R Documentation

Fitter function for GeD Spline Regression for bivariate data

Description

These are computing engines called by NGeDS, needed for the underlying fitting procedures.

Usage

BivariateFitter(
  X,
  Y,
  Z,
  W,
  weights = rep(1, length(X)),
  Indicator,
  beta = 0.5,
  phi = 0.99,
  min.intknots = 0,
  max.intknots = 300,
  q = 2,
  Xextr = range(X),
  Yextr = range(Y),
  show.iters = TRUE,
  tol = as.double(1e-12),
  stoptype = c("SR", "RD", "LR"),
  higher_order = TRUE,
  Xintknots = NULL,
  Yintknots = NULL
)

GenBivariateFitter(
  X,
  Y,
  Z,
  W,
  family = family,
  weights = rep(1, length(X)),
  Indicator,
  beta = 0.5,
  phi = 0.5,
  min.intknots = 0,
  max.intknots = 300,
  q = 2,
  Xextr = range(X),
  Yextr = range(Y),
  show.iters = TRUE,
  tol = as.double(1e-12),
  stoptype = c("SR", "RD", "LR"),
  higher_order = TRUE
)

Arguments

X

a numeric vector containing N sample values of the first independent variable chosen to enter the spline regression component of the predictor model.

Y

a numeric vector containing N sample values of the second independent variable chosen to enter the spline regression component of the predictor model.

Z

a vector of size N containing the observed values of the response variable.

W

a design matrix with N rows containing other covariates selected to enter the parametric component of the predictor model (see formula). If no such covariates are selected, it is set to NULL by default.

weights

an optional vector of size N of ‘prior weights’ to be put on the observations in the fitting process in case the user requires weighted GeDS fitting. It is NULL by default.

Indicator

contingency table of X and Y.

beta

numeric parameter in the interval [0,1] tuning the knot placement in stage A of GeDS. See the description of NGeDS or GGeDS.

phi

numeric parameter in the interval [0,1] specifying the threshold for the stopping rule (model selector) in stage A of GeDS. See also stoptype and details in the description of NGeDS or GGeDS.

min.intknots

optional parameter allowing the user to set a minimum number of internal knots required. By default equal to zero.

max.intknots

optional parameter allowing the user to set a maximum number of internal knots to be added by the GeDS estimation algorithm. By default equal to the number of internal knots \kappa for the saturated GeDS model (i.e. \kappa=N-2).

q

numeric parameter which allows to fine-tune the stopping rule of stage A of GeDS, by default equal to 2. See details in the description of NGeDS or GGeDS.

Xextr

boundary knots in the X direction. By default equal to the range of X.

Yextr

boundary knots in the Y direction. By default equal to the range of Y.

show.iters

logical variable indicating whether or not to print information at each step. By default equal to FALSE.

tol

numeric value indicating the tolerance to be used in checking whether two knots should be considered different during the knot placement steps in stage A.

stoptype

a character string indicating the type of GeDS stopping rule to be used. It should be either "SR", "RD" or "LR", partial match allowed. See details of NGeDS or GGeDS.

higher_order

a logical that defines whether to compute the higher order fits (quadratic and cubic) after stage A is run. Default is TRUE.

Xintknots

vector of starting internal knots in the X direction. Default is NULL.

Yintknots

vector of starting internal knots in the Y direction. Default is NULL.

family

a description of the error distribution and link function to be used in the model. This can be a character string naming a family function (e.g. "gaussian"), the family function itself (e.g. gaussian) or the result of a call to a family function (e.g. gaussian()). See family for details on family functions.

Value

A GeDS-Class object, but without the Formula, extcall, terms and znames slots.

References

Dimitrova, D. S., Kaishev, V. K., Lattuada, A. and Verrall, R. J. (2023). Geometrically designed variable knot splines in generalized (non-)linear models. Applied Mathematics and Computation, 436.
DOI: doi:10.1016/j.amc.2022.127493

See Also

NGeDS and UnivariateFitters.


[Package GeDS version 0.2.3 Index]