% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/SHARPtest.R
\name{SHARPtest}
\alias{SHARPtest}
\title{Implement SHARP test once on a dose-response curve}
\usage{
SHARPtest(df, mixed = FALSE, xName, yName, rName, niter = 1000)
}
\arguments{
\item{df}{Dose-response curve data in a table format. Dose and responses should be two separate columns with numeric values.}

\item{mixed}{Logical indicator (TRUE for FALSE) for whether or not to use the mixed-model-based test.}

\item{xName}{The column name for dose. Character string.}

\item{yName}{The column name for response. Character string.}

\item{rName}{The column name for random effect. Only used if mixed = TRUE. Character string.}

\item{niter}{An integer for the number of iterations in SHARP test procedure.}
}
\value{
A vector of four p values after Holm adjustment, indicating the significance of four different shapes types.
}
\description{
Implement SHARP test once on a dose-response curve
}
\examples{
# Simulate dose-response data
x <- seq(0, 1, length.out = 48)
y <- 2*sqrt(x)+rnorm(48)
y[17:32] <- y[17:32]+0.5
y[33:48] <- y[33:48]+1
curve <- data.frame(x, y)
curve$rep <- rep(1:3, each = 16)

# Fixed-model based test
SHARPtest(curve, xName = "x", yName = "y", niter = 100)

# Mixed-model based test
SHARPtest(curve, mixed = TRUE, xName = "x", yName = "y", rName = "rep", niter = 100)
}
