aknandi / disaggregation

R package containing methods for Bayesian disaggregation modelling
Other
21 stars 6 forks source link

Predict assumes that the field was fitted #10

Closed timcdlucas closed 4 years ago

timcdlucas commented 4 years ago
result <- fit_model(test_data, its = 2000)

eee = predict_model(test_data, result)

result2 <- fit_model(test_data, its = 1000, field = FALSE)

eee = predict_model(test_data, result2)

errorr

This is always going to be a pain. I don't know if there's good ways around this other than a million if statements in every function...

timcdlucas commented 4 years ago

The model_setup element you added to the fit model output gives a good way of handling this cleanly.