Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug in coef.marssMLE() function #189

Open
chenhappy opened this issue Aug 11, 2023 · 0 comments
Open

bug in coef.marssMLE() function #189

chenhappy opened this issue Aug 11, 2023 · 0 comments
Labels
bug actual bug

Comments

@chenhappy
Copy link

Error message
Error in dimnames(x) <- dn :
length of 'dimnames' [1] not equal to array extent

Code to reproduce
dat <- t(harborSealWA)
dat <- dat[2:nrow(dat), ] # remove the year row
kem <- MARSS(dat, model=list(G=matrix(1,5,1),Q=matrix(list('q'),1,1),tinitx=1),method='BFGS')
coef(kem,type='matrix') #<-error occurs here

MARSS Version
3.11.8

Additional context
when G is specified as mxq , and Q as qxq, and when q!=m, line 106-107 will raise error as the dimension of Q is not the same as attr(modified.object[["model"]], "X.names").
sames goes with R (when H is specified so that R's row dimension is different from y).
this bug in coef() causes trouble for predict_marssMLE as it calls coef() and failed.

@chenhappy chenhappy added the bug actual bug label Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug actual bug
Projects
None yet
Development

No branches or pull requests

1 participant