Learn R Programming

iPRISM (version 0.1.1)

get_logiModel: Fit Logistic Regression Model

Description

This function fits a logistic regression model to the given data.

Usage

get_logiModel(data.sig, pred.value, levels = c("R", "N"), step = TRUE)

Value

A fitted logistic regression model.

Arguments

data.sig

A data frame where each row is a sample and each column is a pathway.

pred.value

A numeric vector representing the response variable.

levels

A character vector specifying the levels of the response variable (default: c("R", "N")).

step

Logical. If TRUE, perform stepwise model selection (default: TRUE).

Details

The function converts the response variable to a factor with specified levels and fits a logistic regression model using the glm function.

Examples

Run this code
data(data_sig, package = "iPRISM")
# \donttest{
b <- get_logiModel(data.sig = data_sig, pred.value = pred_value, step = TRUE)
summary(b)
# }

Run the code above in your browser using DataLab