predict.LogisticR {MethylIT}R Documentation

Predict function for logistic regression model from 'LogisticR' class


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


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



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


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.


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

num.cores, tasks

Paramaters for parallele 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.


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.


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 GRange 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 predited classification or posterior classification probabilities are returned.

[Package MethylIT version 0.3.1 ]