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

Inputting new parameters (par = ) into simulate() function #71

Open
emilylil opened this issue Jan 9, 2023 · 1 comment
Open

Inputting new parameters (par = ) into simulate() function #71

emilylil opened this issue Jan 9, 2023 · 1 comment

Comments

@emilylil
Copy link

emilylil commented Jan 9, 2023

I just downloaded the most recent version of WHAM (main branch) and I'm running into the following issue:

When I change the input parameters in the simulate() function of a fitted object, I'm getting this error:

simdata <- mod.OM$simulate(par=simpar,complete=T)

Error in retape(set.defaults = FALSE) :
Error when reading the variable: 'agesvec'. Please check data and parameters.
In addition: Warning message:
In retape(set.defaults = FALSE) : Expected object. Got NULL.

I don't have a variable agesvec, so I know its something internal. And I made sure that par and and simpar have the same number of parameters. I noticed that "mod.OM$last.par" or "mod.OM$last.par.best" now output the fixed and random effects (before it just output the fixed effects). That might be related to the issue, but it's not the issue exactly because I've tried the simulate() function both ways- the fixed effects or the fixed effects and random effects.

I also tried running the simulate() function with par = mod.OM$env$last.par which should ostensibly work because that is the default input value, but no luck.

Any help or insight would be greatly appreciated!

@emilylil
Copy link
Author

Update- it does work when the mod.OM is fit without osa residuals

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

No branches or pull requests

1 participant