plot_fitted {ssfa} | R Documentation |
SSFA plot
Description
This function allows to plot the data and the fitted values obtained by SSFA model.
Usage
plot_fitted(x, y, object, xlab, ylab, main, ...)
Arguments
x |
the x coordinates of points in the plot. |
y |
the y coordinates of points in the plot. |
object |
an object of class |
xlab |
a title for the x axis. |
ylab |
a title for the y axis. |
main |
an overall title for the plot. |
... |
arguments to be passed to methods, such as graphical parameters (see par). |
See Also
Examples
library(ssfa)
data(SSFA_example_data)
data(Italian_W)
#### SFA and SSFA comparison
sfa <- ssfa(log_y ~ log_x, data = SSFA_example_data, data_w=Italian_W,
form = "production", par_rho=FALSE)
ssfa <- ssfa(log_y ~ log_x, data = SSFA_example_data, data_w=Italian_W,
form = "production", par_rho=TRUE)
sfa_fitted <- fitted.ssfa(sfa)
plot_fitted(SSFA_example_data$log_x, SSFA_example_data$log_y, ssfa)
lines(sort(SSFA_example_data$log_x), sfa_fitted[order(SSFA_example_data$log_x)],col="red")
[Package ssfa version 1.2.2 Index]