Closed MoonMitEum closed 1 year ago
In this example below, mod_arx$fitted.values and mod_arx$residuals are the same (In the body of the function sysid::arx, residuals = eps[1:N, , drop = F] and eps <- X %*% coef). Is it intended to work like this?
mod_arx$fitted.values
mod_arx$residuals
sysid::arx
residuals = eps[1:N, , drop = F]
eps <- X %*% coef
library(sysid) data(arxsim) mod_arx <- arx(arxsim, c(1, 2, 2)) head(cbind(mod_arx$fitted.values, mod_arx$residuals), 100) sum(mod_arx$fitted.values != mod_arx$residuals) # 0
In this example below,
mod_arx$fitted.values
andmod_arx$residuals
are the same (In the body of the functionsysid::arx
,residuals = eps[1:N, , drop = F]
andeps <- X %*% coef
). Is it intended to work like this?library(sysid) data(arxsim) mod_arx <- arx(arxsim, c(1, 2, 2)) head(cbind(mod_arx$fitted.values, mod_arx$residuals), 100) sum(mod_arx$fitted.values != mod_arx$residuals) # 0