logReg: Logistic regression for predicting the probability to belong...

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/logisticRegression.R

Description

Logistic regression for predicting the probability to belong to a certain class in binary classification problems.

Usage

1
2
3
4
5
6
7
8
9
logReg(
  object,
  groups,
  probesetId = NULL,
  geneSymbol = NULL,
  main = NULL,
  probe2gene = TRUE,
  ...
)

Arguments

object

ExpressionSet object for the experiment

groups

String containing the name of the grouping variable. This should be a the name of a column in the pData of the expressionSet object.

probesetId

The probeset ID. These should be stored in the featureNames of the expressionSet object.

geneSymbol

The gene symbol. These should be stored in the column `Gene Symbol` in the featureData of the expressionSet object.

main

Main title on top of the gra

probe2gene

Boolean indicating whether the probeset should be translated to a gene symbol (used for the default title of the plot)

...

Possibility to add extra plot options. See plot

Details

It will always estimate probability scores to belong to the second level of the factor variable. If a probability score to other level is preferred, then you need to change the order of the levels of the factor.

Value

A data.frame object with three columns and rownames

rownames

The 'sampleNames' of the expressionSet object

x

The expression values for the specified gene for all samples

y

The labels of the samples

fit

The fitted probability score to belong to one of the two classes.

Author(s)

Willem Talloen

See Also

ROCcurve,probabilitiesPlot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
if (require(ALL)){
  data(ALL, package = "ALL")
  ALL <- addGeneInfo(ALL)
  ALL$BTtype <- as.factor(substr(ALL$BT,0,1))
  logRegRes <- logReg(geneSymbol = "HLA-DPB1", object = ALL, groups = "BTtype")
  # scoresplot
  probabilitiesPlot(proportions = logRegRes$fit, classVar = logRegRes$y,
      sampleNames = rownames(logRegRes), main = 'Probability of being a T-cell type ALL')
  # barplot
  probabilitiesPlot(proportions = logRegRes$fit, classVar = logRegRes$y, barPlot=TRUE,
      sampleNames = rownames(logRegRes), main = 'Probability of being a T-cell type ALL')
 }

## End(Not run)

a4Base documentation built on Nov. 8, 2020, 5:41 p.m.

Related to logReg in a4Base...