-
Notifications
You must be signed in to change notification settings - Fork 26
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
Issues running Ricker model #11
Comments
I have tried a bunch of iterations of Ricker and cannot get it to work either! I am getting a similar error message:
For the predicted values (with alpha = r and rho = K), I have:
Not sure what the right set-up is for the jnll because nothing I've tried has worked, yet. |
Without seeing details it's hard to comment much. There's a few steps to try:
If yes to #4, rememeber that the ricker generates chaotic dynamics so you might need to constrain their values. |
I am receiving this error message: which appears to be causing: |
Ok, so can get you get the jnll?
What happens if you run it with all random effects treated as fixed,can you
get the jnll and it's gradients?
If yes, are any gradients equal to zero?
I can't really help much this late at night and probably won't have time
before class tomorrow, but happy to answer questions after class tomorrow.
…On Mon, Apr 23, 2018, 8:21 PM klomori ***@***.***> wrote:
I am receiving this error message:
iter: 1 Error in iterate(par) : Newton dropout because inner gradient had
non-finite components.
which appears to be causing:
outer mgc: NaN Error in nlminb(start = startpar, objective = obj$fn,
gradient = obj$gr, : gradient function must return a numeric vector of
length 4
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHnqTaDihcNx9MKavaoK-jkPjdZIVS0Gks5trpohgaJpZM4Tg4Xj>
.
|
I found that starting values for the Ricker model were very important. I tried a default |
Thanks! My problems were when running both models in the same script (using model indexing), I needed to put the jnll statement for the Ricker model on one line and the starting values. |
I am able to run the Gompertz model, but unable to run the Ricker model. I am not sure where my error is located in my Ricker model in the C++ code. Any ideas?
// Probability of random effects (where r= ;alpha' and K = 'rho')
vector log_x_t_star(nt);
for( int t=1; t<nt; t++){
log_x_t_star(t) = log_x_t(t-1) + alpha*(1- (exp(log_x_t(t-1))/rho) );
jnll -= dnorm( log_x_t(t), log_x_t_star(t), exp(log_sigma), true );
}
Here is my error message:
Newton failed to find minimum.
In addition: Warning message:
In nlminb(start = opt$par, objective = obj$fn, gradient = obj$gr, :
NA/NaN function evaluation
outer mgc: NaN
Error in optimHess(opt$par, obj$fn, obj$gr) :
gradient in optim evaluated to length 1 not 4
The text was updated successfully, but these errors were encountered: