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

Maxit reached in backtrackingError in pmax(x, lower) : invalid input type #5

Open
nataliemyers12 opened this issue Jun 26, 2023 · 1 comment

Comments

@nataliemyers12
Copy link

nataliemyers12 commented Jun 26, 2023

Hi Dr. Pope,

I am running radish as mlpe and when I run my model, halfway through it gives this error: Warning: Maxit reached in backtrackingError in pmax(x, lower) : invalid input type

and stops. Could someone decode what this error is saying and why it may be doing this?

Here is my code as is with the model, can provide further info.

surface <- conductance_surface(covariates = scaled_raster_stack, coords = sample.localespl, directions = 8)

fit_mlpe <- radish(distgenPL ~ Airports + Bridges + BusRoutes + Buildings + CRoutes + GolfCourses + Hotels + MajorRoads, data=surface, conductance_model = loglinear_conductance, measurement_model= mlpe)

Cheers,
Natalie Myers

@nspope
Copy link
Owner

nspope commented Jul 3, 2023

Hi Natalie, I expect what's going on is that there's numeric issues with optimization (overflow / underflow), but there's a bug in the error handling so that it runs until the maximum number of iterations rather than aborting (which is why you get that obtuse error message).

As to why there'd be numeric issues in the first place, it may be that your model is overparameterized. Does it work if you fit univariate models with each of the covariates?

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

2 participants