% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/BinomialModel.R
\name{ProcessingData}
\alias{ProcessingData}
\title{Process Data for Model Construction}
\usage{
ProcessingData(x, y, scale, type = c("binomial", "survival"))
}
\arguments{
\item{x}{Data frame of predictors with first column as IDs.}

\item{y}{Data frame of outcomes with first column as IDs. For survival,
expects two additional columns for time and status.}

\item{scale}{Logical indicating whether to scale predictors.}

\item{type}{Character string: `"binomial"` or `"survival"`.}
}
\value{
List containing:
\describe{
  \item{x_scale}{Processed predictor matrix}
  \item{y}{Processed outcome variable}
  \item{x_ID}{Sample IDs}
}
}
\description{
Preprocesses data for binomial or survival analysis. Aligns and filters data
based on sample IDs, optionally scales data, and ensures appropriate data types.
Handles missing values by removing columns with NA values.
}
\examples{
x <- data.frame(ID = 1:10, predictor1 = rnorm(10), predictor2 = rnorm(10))
y <- data.frame(ID = 1:10, outcome = sample(c(0, 1), 10, replace = TRUE))
result <- ProcessingData(x, y, scale = TRUE, type = "binomial")
}
