Open jimianelli opened 9 years ago
What I did here was create a set of 3 containers for observed and predicted size comps. Thus we have:
d3_obs_size_comps_in
d3_obs_size_comps
d3_obs_size_comps_out
and
d3_pre_size_comps_in
d3_pre_size_comps
d3_pre_size_comps_out
d3_obs_size_comps_in is simply what is read in from the .dat file. d3_pre_size_comps_in is the unaggregated/normalized prediction of the size comps (calculated in calc_predicted_composition). d3_obs_size_comps and d3_pre_size_comps are aggregated/normalized versions of these that the model uses when fitting (in calc_objective_function). d3_obs_size_comps_out and d3_pre_size_comps_out are normalised versions of the _in containers, these are used for plotting purposes (i.e. so that the data sets may be plotted by their individual size comps rather than aggregated together). I hope this makes sense. Apologies for making this so complicated, I couldn't come up with anything more elegant.
Thanks for the explanation, sorry for not finding that earlier on my own.
Re plotting purposes...tough one here but wonder if it's best to have the comps_out not be normalized version so that the lack of fit can better be appreciated (e.g., if "new" shell predictions were systematically low relative to the observed, then this would be a reasonable diagnostic overall). This raises another question for another issue perhaps, that of showing overall fits.
seems reasonable, not a huge priority though at the moment.
OK coming back to this one - currently they show normalized obs and pred - as fits and resids. But what should they show? You're saying that the plots should show unnormalized data?
in Onesex example, d3_pre_size_comps_out and d3_obs_size_comps_out
don't seem to be doing the old/new shell normalization (all rows sum to one). The survey should use the "aggregator " line to normalize these over rows so that sum old + new = 1. Could be an issue with twosex too.