MCRestimate (version 2.24.0)

PLR: A function which performs penalised logistic regression classification for two groups

Description

A function which performs penalised logistic regression.

Usage

PLR(trainmatrix, resultvector, kappa=0, eps=1e-4) "predict"(object,...)

Arguments

resultvector
a vector which contains the labeling of the samples
trainmatrix
a matrix which includes the data. The rows corresponds to the observations and the columns to the variables.
kappa
value range for penalty parameter. If more that one parameter is specified the one with the lowest AIC will be used.
eps
precision of convergence
object
a fitted PLR model
...
here a data matrix from samples that should be predicted

Value

a
Intercept estimate of the linear predictor
b
vector of estimated regression coefficients
factorlevel
levels of grouping variable
aics
vector of AIC values with respect to penalty parameter kappa
trs
vector of effective degrees of freedom with respect to penalty parameter kappa

Examples

Run this code
library(golubEsets)
data(Golub_Merge)
eSet<-Golub_Merge
X0 <- t(exprs(eSet))
m <- nrow(X0); n <- ncol(X0)
y <- pData(eSet)$ALL.AML
f <- PLR(X0, y,kappa=10^seq(0, 7, 0.5))
if (interactive()) {
  x11(width=9, height=4)
  par(mfrow=c(1,2))
plot(log10(f$kappas), f$aics, type="l",main="Akaike's Information Criterion", xlab="log kappa", ylab="AIC")
plot(log10(f$kappas), f$trs, type="l",xlab="log kappa",
ylab="Dim",main="Effective dimension")
}

Run the code above in your browser using DataCamp Workspace