pred_accuracy_bes: pred_accuracy_bes

Description Usage Arguments Value

View source: R/3_em_bessel.R

Description

Function to calculate the Residual Sum of Squares for partitions (training and test sets) of the data set. Residuals are calculated here based on the bessel regression.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
pred_accuracy_bes(
  residual,
  kap,
  lam,
  z,
  x,
  v,
  ntest,
  predict,
  link.mean,
  link.precision,
  em_controls,
  optim_method,
  optim_controls
)

Arguments

residual

Character indicating the type of residual ("pearson", "score" or "quantile").

kap

coefficients in kappa related to the mean parameter.

lam

coefficients in lambda related to the precision parameter.

z

response vector with 0 < z_i < 1.

x

matrix containing the covariates for the mean submodel. Each column is a different covariate.

v

matrix containing the covariates for the precision submodel. Each column is a different covariate.

ntest

number of observations in the test set for prediction.

predict

number of partitions (training and test sets) to be evaluated.

link.mean

a string containing the link function for the mean. The possible link functions for the mean are "logit","probit", "cauchit", "cloglog".

link.precision

a string containing the link function the precision parameter. The possible link functions for the precision parameter are "identity", "log", "sqrt".

em_controls

a list containing two elements: maxit that contains the maximum number of iterations of the EM algorithm; em_tol that defines the tolerance value to control the convergence criterion in the EM-algorithm.

optim_method

main optimization algorithm to be used. The available methods are the same as those of optim function.

optim_controls

a list of control arguments to be passed to the optim function in the optimization of the model. For the control options, see the 'Details' in the help of optim for the possible arguments.

Value

Vector containing the RSS for each partition of the full data set.


vpnsctl/bbreg documentation built on March 14, 2021, 12:11 a.m.