Skip to content

Add first pass of OSA residuals#3

Open
Cole-Monnahan-NOAA wants to merge 1 commit into
James-Thorson-NOAA:mainfrom
Cole-Monnahan-NOAA:add_osa
Open

Add first pass of OSA residuals#3
Cole-Monnahan-NOAA wants to merge 1 commit into
James-Thorson-NOAA:mainfrom
Cole-Monnahan-NOAA:add_osa

Conversation

@Cole-Monnahan-NOAA

Copy link
Copy Markdown

This implements one-step-ahead residuals for observed data families except "binomial" and "fixed." The former could be implemented using a pbeta approach as in other applications, e.g., here.

OSA residuals can be determined as normal by calling

TMB::oneStepPredict(fit$obj, data.term.indicator='keep', observation.name='y_k2')

where fit is returned by the dsem function, and selecting one of the available methods (see ?oneStepPredict). The 'cdf' method is probably the best choice although for fast models the 'oneStepGeneric' should provide more accurate estimates. Note that residuals make no sense for "fixed" family and if the observation error is estimated to be very small it will likely fail as well.

All tests passed and the package and vignettes were built locally without issue, but should be considered an experimental feature for now. Further testing would be prudent, in particular comparing an equivalent model to a existing framework with OSA implemented to ensure they match and thus confirm it has been correctly coded in dsem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant