% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dm_sea.R
\name{dm_epoch_test}
\alias{dm_epoch_test}
\title{Test superposed epoch composites against a null distribution}
\usage{
dm_epoch_test(
  x,
  statistic = c("mean", "median"),
  null = c("same_doy_window", "same_month", "random_time"),
  n_iter = 1000,
  doy_window = 15,
  match_hour = TRUE,
  match_minute = TRUE,
  conf_level = 0.95,
  seed = NULL
)
}
\arguments{
\item{x}{Object returned by [dm_epoch_extract()].}

\item{statistic}{Composite statistic. One of \code{"mean"} or
\code{"median"}.}

\item{null}{Null model. One of \code{"same_doy_window"},
\code{"same_month"}, or \code{"random_time"}.}

\item{n_iter}{Number of null iterations.}

\item{doy_window}{DOY window used for \code{null = "same_doy_window"}.}

\item{match_hour}{Logical. For hourly or minute data, keep the same hour
when possible.}

\item{match_minute}{Logical. For minute data, keep the same minute when
possible.}

\item{conf_level}{Confidence level for null envelopes.}

\item{seed}{Optional random seed.}
}
\value{
An object of class \code{c("dm_epoch", "dm_epoch_test")}.
}
\description{
Tests observed superposed epoch composites against empirical null
distributions generated by randomly sampled anchor times.

If the input object was created with \code{Year} and/or \code{DOY} filters
in [dm_epoch_extract()] and \code{restrict_null_to_window = TRUE}, null
anchors are sampled from the same calendar-year and day-of-year window.
}
