gmwm icon indicating copy to clipboard operation
gmwm copied to clipboard

CI inference not working

Open stefangachter opened this issue 8 months ago • 0 comments

The computation of the confidence intervals of the estimates is currently not available for mgmwm and fails in summary.gmwm for the gmwm2 branch. The following example fails at line

sumGyroAxis = summary(estimModelGyroAxis$fit, inference=TRUE)

with the error:

Error in eval(expr, envir = envir) : 
  matrix multiplication: incompatible matrix dimensions: 2x18 and 19x19

I suspect the error to happen in the arma::field<arma::mat> get_summary function. Any advice on how this error could be fixed? We would love to see CI inference working for gmwm2.

library(imudata)
library(gmwm)


titleLabel = 'ADIS 16405 IMU1'
xLabel = 'Time Scale (s)'
yLabel = list(Gyroscope='Variance ((deg/s)^2)')

data(adis_16405_imu1)

freq = attr(adis_16405_imu1, "freq")
dataGyroAxis = adis_16405_imu1[,1]

dataGyroAxisWv = wvar(dataGyroAxis)
plot(dataGyroAxisWv, split=FALSE, xlab=xLabel, ylab=yLabel, main=titleLabel)

model = WN() + RW()
estimModelGyroAxis = mgmwm(model, dataGyroAxisWv$wvar, freq=freq)
sumGyroAxis = summary(estimModelGyroAxis$fit, inference=TRUE)

capture.output(sumGyroAxis)
plot(estimModelGyroAxis, decomp=TRUE, xlab=xLabel, ylab=yLabel$Gyroscope)

stefangachter avatar Jun 20 '24 12:06 stefangachter