% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RegDis_function.r
\name{rand_pajd_bw}
\alias{rand_pajd_bw}
\title{Bandwidth selection for Randomization-based tests adjusted for multiple testing}
\usage{
rand_pajd_bw(
  dataset,
  forcing_var_name = "S",
  covariates = c("sex", "HSHumanity", "HSTech", "HSOther", "hsgrade", "Y2004"),
  niter = 1000,
  bandwidth = c(500, 1000, 5000),
  cut_value = 15000,
  whichunder = 1
)
}
\arguments{
\item{dataset}{The data frame with the variables}

\item{forcing_var_name}{The name of the forcing variable in the dataset.}

\item{covariates}{Covariates of the model.}

\item{niter}{Number of iteration to calculate the adjusted p-value.}

\item{bandwidth}{A numerical vector defining the ranges to subset the dataset and create the subpopulations of interest.}

\item{cut_value}{Threshold value to separate the treatment status.}

\item{whichunder}{If the treatment status is lower (0) or higher (1) than the threshold}
}
\value{
A data frame with the selected variables and bandwidths, and the correponding mean difference with adjusted p-value.
}
\description{
Randomization-based tests adjusted for multiple testing (rand_pajd function) was defined to calculate just for one bandwidth. For the cases where the user wants to test several bandwidths this functions is applied.
}
\examples{
 
\donttest{
data(grants)
rand_pajd_bw(dataset = grants, forcing_var_name = 'S', 
covariates = c('sex', 'HSHumanity', 'HSTech', 'HSOther', 
'hsgrade', 'Y2004'), niter = 1000, 
bandwidth = c(500, 1000, 5000), cut_value = 15000, 
whichunder = 1)
}
}
