Predict using a logistic model obtained from the output of function evaluateDIMPclass.

predict.LogisticR(
  object,
  newdata = NULL,
  type = c("all", "class", "posterior"),
  num.cores = 1L,
  tasks = 0L,
  ...
)

Arguments

object

To use with function 'predict'. An object from 'LogisticR' class. A logistic model given by function evaluateDIMPclass.

newdata

To use with function 'predict'. New data for classification prediction. Optionally, an object from class 'GRanges', a list of GRanges, 'pDMP' or 'InfDIv', in which to look for variables with which to predict. If omitted, the fitted linear predictors are used.

type

The type of output required. Possible outputs are: 'class', 'posterior' and 'all'. The default is 'all'.

num.cores, tasks

Parameters for parallel computation using package BiocParallel-package: the number of cores to use, i.e. at most how many child processes will be run simultaneously (see bplapply and the number of tasks per job (only for Linux OS).

...

Not in use.

Value

If type is set to 'all', then the original 'newdata' with two columns added, predicted classes and 'posterior' probabilities, in the meta-columns of each GRanges object are given. If 'newdata' is null, then the predictions given for the model by function predict.glm are returned. if type is set to 'class' or to 'posterior', then the unlisted predicted classification or posterior classification probabilities are returned.

Details

This function is specific for predictions based on a logistic model given by function evaluateDIMPclass. A logistic model is obtained with 'glm' regression can be used directly with function 'predict' from 'stats' package.