% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tidy_alt.R
\name{tidy_alt}
\alias{tidy_alt}
\title{Extract Tidy Parameter Estimates from an alt Object.}
\usage{
tidy_alt(alt_obj)
}
\arguments{
\item{alt_obj}{An object of class `'alt'` created by the `WeibullR.ALT`
package. Must have been processed through [WeibullR.ALT::alt.parallel()].
For `$relationship` to be non-NULL, [WeibullR.ALT::alt.fit()] must also
have been called.}
}
\value{
A named list with two elements:
  \describe{
    \item{`parallel`}{A `data.frame` with one row per stress level,
      containing columns `stress`, `P1`, `P2`, `wt`, and `n_failures`.
      For Weibull models, `P1` is the scale parameter \eqn{\eta} and `P2`
      is the shape parameter \eqn{\beta}. For lognormal models, `P1` is
      \eqn{\mu_{log}} and `P2` is \eqn{\sigma_{log}}.}
    \item{`relationship`}{A one-row `data.frame` with columns `model`,
      `coef1`, and `coef2` (the global life-stress relationship
      coefficients), or `NULL` with a message if `alt.fit()` has not been
      called.}
  }
}
\description{
Returns tidy data frames of per-stress-level parameter estimates and (when
available) global life-stress relationship coefficients from a fitted `alt`
object. Useful for reporting ALT results in reproducible research workflows.
}
\details{
Two life-stress models are supported. For the Arrhenius model,
\eqn{\eta = \exp(C_1 + C_2 \cdot S)} where \eqn{S} is stress (typically
reciprocal temperature in 1/K). For the Power Law model,
\eqn{\eta = \exp(C_1) / S^{|C_2|}}. Both \code{coef1} and \code{coef2}
are on the log scale as returned by \code{alt.fit()}.
}
\examples{
library(WeibullR.ALT)
d1 <- alt.data(c(248, 456, 528, 731, 813, 537), stress = 300)
d2 <- alt.data(c(164, 176, 289), stress = 350)
d3 <- alt.data(c(88, 112, 152), stress = 400)
obj <- alt.fit(
  alt.parallel(
    alt.make(list(d1, d2, d3), dist = "weibull", alt.model = "arrhenius",
             view_dist_fits = FALSE),
    view_parallel_fits = FALSE
  )
)
result <- tidy_alt(obj)
result$parallel
result$relationship
}
\references{
Nelson, W. B. (1990). \emph{Accelerated Testing: Statistical Models,
Test Plans, and Data Analysis}. Wiley.
}
\seealso{
[plotly_alt()] for the ALT probability plot,
  [plotly_rel()] for the life-stress relationship plot.
}
