Provides various diagnostic plots for fitted fit_affectOU objects, including:
"time": Observed vs fitted trajectory over time produced byou_plot_fit_time()."residuals": Residuals (data - fitted) over time produced byou_plot_fit_residuals()."acf": ACF of residuals produced byou_plot_fit_acf()."qq": Normal Q-Q plot of residuals produced byou_plot_fit_qq().
Arguments
- x
An object of class
fit_affectOU- type
Type of plot; one of
"time","residuals","acf", or"qq"- ...
Additional graphical parameters passed to the specific plotting functions
Examples
model <- affectOU(theta = 0.5, mu = 0, gamma = 1)
sim <- simulate(model, stop = 500, dt = 0.01, save_at = 0.1)
data <- as.data.frame(sim)
fitted <- fit(model, data = data$value, times = data$time)
plot(fitted, type = "time")
plot(fitted, type = "residuals")
plot(fitted, type = "acf")
plot(fitted, type = "qq")