% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/SMOTE_Z_data.R
\name{SMOTE_Z_data}
\alias{SMOTE_Z_data}
\title{Create New SMOTE Units to Balance Data combinations of m + s}
\usage{
SMOTE_Z_data(
  data,
  x,
  y,
  z_numeric,
  z_factor,
  balance_data,
  RTS = "vrs",
  B,
  m,
  alpha,
  bandwidth = NULL,
  seed
)
}
\arguments{
\item{data}{A \code{data.frame} containing the variables used in the model.}

\item{x}{Column indexes of the input variables in the \code{data}.}

\item{y}{Column indexes of the output variables in the \code{data}.}

\item{z_numeric}{Integer vector with column indices of numeric environment variables in \code{data}. By default is \code{NULL}.}

\item{z_factor}{Integer vector with column indices of factor environment variables in \code{data}. By default is \code{NULL}.}

\item{balance_data}{Indicate level of efficient units to achive and the number of efficient and not efficient units.}

\item{RTS}{Text string or number defining the underlying DEA technology /
returns-to-scale assumption (default: \code{"vrs"}). Accepted values:
\describe{
\item{\code{0} / \code{"fdh"}}{Free disposability hull, no convexity assumption.}
\item{\code{1} / \code{"vrs"}}{Variable returns to scale, convexity and free disposability.}
\item{\code{2} / \code{"drs"}}{Decreasing returns to scale, convexity, down-scaling and free disposability.}
\item{\code{3} / \code{"crs"}}{Constant returns to scale, convexity and free disposability.}
\item{\code{4} / \code{"irs"}}{Increasing returns to scale (up-scaling, not down-scaling), convexity and free disposability.}
\item{\code{5} / \code{"add"}}{Additivity (scaling up and down, but only with integers), and free disposability.}
}}

\item{B}{number of bootstrap replicates in Conditional DEA.}

\item{m}{number of units to be included in the reference set.}

\item{alpha}{This allow to choose the size of the Confidence Intervals computed. By defaulta alpha = FALSE. In this case no confidence interval are computed.}

\item{bandwidth}{the bandwidth parameters for the unconditional kernel density estimator used in the conditional DEA framework. It is typically obtained using \code{\link[np]{npudensbw}} and supports mixed data types, including continuous variables and discrete unordered or ordered factors. Bandwidths can be selected using normal reference rules, likelihood cross-validation, or least-squares cross-validation following Li and Racine (2003). If \code{NULL}, the bandwidth is estimated internally.}

\item{seed}{Integer. Seed for reproducibility.}
}
\value{
It returns a \code{data.frame} with the newly created set of DMUs incorporated.
}
\description{
This function creates new DMUs to address data imbalances. If the majority class is efficient, it generates new inefficient DMUs by worsering the observed units. Conversely, if the majority class is inefficient, it projects inefficient DMUs to the frontier. Finally, a random selection if performed to keep a proportion of 0.65 for the majority class and 0.35 for the minority class.
}
