atsa-es / marssTMB

Companion package for MARSS that allows you to use TMB to fit MARSS models
https://atsa-es.github.io/marssTMB/
1 stars 0 forks source link

fix par element #5

Closed eeholmes closed 1 year ago

eeholmes commented 1 year ago

par should be in marss form

> names(m1.em$par)
 [1] "Z"  "A"  "R"  "B"  "U"  "Q"  "x0" "V0" "G"  "H"  "L" 
> names(m1.tmb2$par)
 [1] "Z"  "A"  "R"  "B"  "U"  "Q"  "x0" "V0" "D"  "C"  "d"  "c"  "G"  "H"  "L" 
> 
ericward-noaa commented 1 year ago

One of the changes I made to the dfa.hpp was only reporting the covariates when estimated,

https://github.com/atsa-es/marssTMB/blob/87e0067c1f4432d0683134ac57efbe64c6a774fe/src/TMB/dfa.hpp#L86

But maybe that'll mess up the ordering when not estimated -- so remove that flag + if block?

eeholmes commented 1 year ago

@ericward-noaa I am only working on marxss.hpp, so feel free to change dfa.hpp . For marxss.hpp, it takes a MARSS model object and uses the TMB map list to stop estimation of any fixed elements. Doesn't seem to affect speed.