% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sigmoidal.R
\name{predict_sigmoidal}
\alias{predict_sigmoidal}
\title{Predict a Sigmoidal Function Using Fitted Model.}
\usage{
predict_sigmoidal(fit, x_range, model_type, conf_level = NULL)
}
\arguments{
\item{fit}{A list containing the results of a sigmoidal model.}

\item{x_range}{A vector of time values for the prediction.}

\item{model_type}{The type of model (Pearl, Gompertz, or Logistic) for the prediction.}

\item{conf_level}{Optional confidence level for confidence bounds (e.g., 0.95 for 95\%).
If NULL (default), no confidence bounds are computed.}
}
\value{
The function returns a data frame containing the time (x), predicted values (pred),
and optionally lower (lwr) and upper (upr) confidence bounds.
}
\description{
This function predicts values using a fitted sigmoidal model (Pearl, Gompertz,
or Logistic) over a specified range of time values.
}
\examples{
# Set up a data frame of time and completion percentage data
data <- data.frame(time = 1:10, completion = c(5, 15, 40, 60, 70, 75, 80, 85, 90, 95))

# Fit a logistic model to the data.
fit <- fit_sigmoidal(data, "time", "completion", "logistic")

# Use the model to predict future completion times.
predictions <- predict_sigmoidal(fit, seq(min(data$time), max(data$time),
  length.out = 100
), "logistic")

# Predict with 95\% confidence bounds
predictions_ci <- predict_sigmoidal(fit, seq(min(data$time), max(data$time),
  length.out = 100
), "logistic", conf_level = 0.95)

}
\references{
Damnjanovic, Ivan, and Kenneth Reinschmidt. Data analytics for engineering and
construction project risk management. No. 172534. Cham, Switzerland: Springer, 2020.
}
