% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gof_censored.R
\name{gof_censored}
\alias{gof_censored}
\title{Goodness-of-Fit Testing for Type-II Censored Samples}
\usage{
gof_censored(
  data,
  n,
  pdf,
  cdf,
  sf = NULL,
  params = NULL,
  estimate = TRUE,
  censoring = c("right", "left"),
  transform = c("both", "malmquist", "ms"),
  statistics = c("all", "direct7", "complete_ad", "composite_mle", "direct_censored"),
  pvalue_method = c("auto", "distribution_free", "parametric_bootstrap"),
  nsim = 2000,
  seed = NULL,
  optim_control = list()
)
}
\arguments{
\item{data}{Numeric vector of observed order statistics, length r.}

\item{n}{Total sample size (n >= length(data)).}

\item{pdf}{Probability density function \code{f(x, params)}.}

\item{cdf}{Cumulative distribution function \code{F(x, params)}.}

\item{sf}{Survival function \code{S(x, params)}. If \code{NULL}, computed as \code{1 - cdf(x, params)}.}

\item{params}{Named list/vector of fixed parameter values (if \code{estimate = FALSE}) or starting values for MLE (if \code{estimate = TRUE}).}

\item{estimate}{Logical; \code{TRUE} for composite hypothesis (unknown parameters estimated via MLE), \code{FALSE} for simple hypothesis.}

\item{censoring}{Type of censoring: \code{"right"} or \code{"left"}.}

\item{transform}{Transformations to compute: \code{"both"}, \code{"malmquist"}, or \code{"ms"}.}

\item{statistics}{Subset of statistics to compute: \code{"all"}, \code{"direct7"}, \code{"complete_ad"}, \code{"composite_mle"}, or \code{"direct_censored"}.}

\item{pvalue_method}{Method for p-values: \code{"auto"}, \code{"distribution_free"}, or \code{"parametric_bootstrap"}.}

\item{nsim}{Number of Monte Carlo or bootstrap simulation replicates.}

\item{seed}{Optional random seed.}

\item{optim_control}{Optional control list passed to \code{\link[stats]{optim}}.}
}
\value{
An S3 object of class \code{"gofmalm"}.
}
\description{
Performs goodness-of-fit tests for arbitrary user-specified continuous parametric distributions
under Type-II right- or left-censoring using the Malmquist and Michael-Schucany transformations.
}
\examples{
# Simple hypothesis test on Uniform(0,1) with r=5, n=10
data_unif <- c(0.03, 0.06, 0.10, 0.11, 0.13)
res <- gof_censored(
  data = data_unif, n = 10,
  pdf = dunif, cdf = punif,
  estimate = FALSE, pvalue_method = "distribution_free",
  nsim = 500, seed = 123
)
print(res)
}
