powered by
Generates the plot of the aggregated curve based on the functional coefficients and their corresponding weights. The aggregated curve is computed as:
$$A(x) = \displaystyle \sum_{l=1}^{L} y_l \alpha_l(x)$$
plot_aggregated_curve(alpha, weights, title = NULL, x = NULL)
The function returns the plot of the aggregated function.
A numeric matrix where each column represents the values of a function \(\alpha_l(x)\) evaluated at each point in \(x\).
A numeric vector with the weight values corresponding to each function \(\alpha_l(x)\).
A string specifying the title of the plot.
A numeric vector of values at which the function is evaluated. If NULL, the default is the sequence 1:nrow(alpha).
NULL
1:nrow(alpha)
plot_aggregated_curve(simulated_data$alphas, c(0.7, 0.3)) plot_aggregated_curve(simulated_data$alphas, c(0.7, 0.3), "Aggregated Curve Example", simulated_data$x)
Run the code above in your browser using DataLab