| CVfit {geeVerse} | R Documentation | 
Cross-Validation for Generalized Estimating Equations (GEE)
Description
This function performs k-fold cross-validation for model selection in the context of Generalized Estimating Equations (GEE). It is designed to evaluate the performance of different models specified by a range of lambda values, choosing the one that minimizes the cross-validation criterion.
Usage
CVfit(
  formula,
  id,
  data,
  family,
  scale.fix,
  scale.value,
  fold,
  lambda.vec,
  pindex,
  eps,
  maxiter,
  tol,
  corstr = "independence",
  ncore = 1
)
Arguments
formula | 
 an object of class   | 
id | 
 a vector which identifies the cluster/group for each observation.  | 
data | 
 an optional data frame containing the variables in the model.  | 
family | 
 a description of the error distribution and link function to be used in the model.  | 
scale.fix | 
 logical; if   | 
scale.value | 
 the value of the scale parameter when   | 
fold | 
 the number of folds to be used in the cross-validation.  | 
lambda.vec | 
 a vector of lambda values for which the cross-validation error will be calculated.  | 
pindex | 
 an optional numeric vector specifying a parameter index.  | 
eps | 
 the threshold for convergence criteria.  | 
maxiter | 
 the maximum number of iterations for the convergence of the algorithm.  | 
tol | 
 the tolerance level for the convergence of the algorithm.  | 
corstr | 
 the correlation structure used.  | 
ncore | 
 if greater than 1, the function will use parallel computation.  | 
Details
Note that this is a re-implemented version with parallel computing.
Value
An object of class "CVfit", which is a list containing:
foldThe number of folds used in the cross-validation.
lam.vectThe vector of lambda values tested.
cv.vectThe cross-validation error for each lambda.
lam.optThe lambda value that resulted in the minimum cross-validation error.
cv.minThe minimum cross-validation error.
callThe matched call.