-
Notifications
You must be signed in to change notification settings - Fork 10
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
Code for plotting modeled vs. observed O2 #126
Comments
Good idea. I have a couple comments that might help in the long-run, but I fear will sound like a pain now. Basically, two points:
1. Concept of Predicted ValuesIt is important to distinguish between models that have oxygen concentration as the response variable, and those with the first difference in oxygen as the response. For example, 2. Getting Predicted ValuesKalman predictionsThe Kalman smoother should be used to get predicted values from the Kalman filter model (this is already included; see Bayesian predictionsFor the Bayesian method, you'd want to adjust the R code that calls JAGS, telling it to track the "latent" state variable ('true' DO) at each time step as though it were a parameter. Basically, the model distinguishes between "true" and "observed" DO values. The "true" values obviously are not observed, and are referred to as "latent" variables --- essentially parameters. The model already estimates these latent variables, but they are not returned to the user unless they are designated as "parameters to track" from within JAGS. (If 'Tracking' these parameters has no effect of parameter estimation --- the true DO values are already estimated, all you're doing is 'saving' the posterior samples for each DO value. That's right, true DO at each time step will have its own posterior distribution. Therefore, I recommend using a N x T matrix to store the true DO output (N = number of posterior iterations, T = number of time steps). If we combine output for many days (e.g., in OLS predictionsThis should be pretty easy, as an However, An alternative is, for the plot of observed DO, to use MLE predictionsI think the predictions for I think all we have to do is copy the code from the inner loops of these models (PE and OE models), and just plug in the fitted parameter values where needed. BK predictionsI don't think we can generate predictions for this model --- it's not a statistical model. NoteAs a general note: A model that makes good predictions of oxygen isn't necessarily making good estimates of metabolism (as extreme example, get predicted values using |
Create code that will take fitted parameters from metabolism model and plot modeled vs. observed oxygen data for each metabolism day.
The text was updated successfully, but these errors were encountered: