View source: R/CommonFunction.R
| confidenceInt | R Documentation |
Calculates predicted values and confidence intervals for the mean trajectory of each group at specified time points.
confidenceInt(Obj, newtime, alpha = 0.05)
Obj |
An object containing model parameters, including:
|
newtime |
Numeric vector of time points at which to compute predictions and confidence intervals. |
alpha |
The significance level for the confidence intervals. Default is 0.05, which corresponds to 95% confidence intervals. |
A list of class "Trajectory.predict" containing:
newtime: The input time points.
Ypred: Matrix of predicted values for each group at each time point.
SEYpred: Matrix of standard errors for the predicted values.
IC.inf: Matrix of the lower bounds of the confidence intervals.
IC.sup: Matrix of the upper bounds of the confidence intervals.
groups: Number of groups from the input object.
data <- read.csv(system.file("extdata", "CNORM2gr.csv", package = "trajeR"))
sol <- trajeR(Y = data[, 2:6], A = data[, 7:11], degre = c(2, 2), Model = "CNORM", Method = "L")
newtime <- seq(0, 1, by = 0.1)
result <- confidenceInt(sol, newtime, alpha = 0.05)
print(result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.