hafen / hbgd

hbgd
http://HBGDki.github.io/hbgd/
MIT License
4 stars 10 forks source link

Alternative Prediction Grid #8

Open craiganderson89 opened 8 years ago

craiganderson89 commented 8 years ago

In many of the GHAP analysis datasets, we have longitudinal covariates (nutrition, infection etc) which are measured much more frequently than the growth measures.

I can envisage a situation where package users might want to perform some basic analysis with these covariates and our estimated growth trajectories. I wondered whether it might be useful to have predictions at each of the ages where we have covariate measures, in order to facilitate this sort of analysis.

However, I know that the fitvalues object is already quite large, and that we're already doing a fair bit of prediction - both on a grid and at the points with growth observations. I think adding this feature would also require a change to the input style (since at the moment we only input the clean data with all growth NAs removed).

I think this third type of prediction could be done manually by selecting appropriate xg values, and that might be the best way to approach it for now. I just wanted to raise the point in case it's something which becomes sensible later on.

hafen commented 8 years ago

Good idea - this should be pretty straightforward. As it is right now, you are already able to send in the data without the NAs removed. The fitting will only use complete cases, but the full original data is also preserved in the fit object. So it should be pretty straightforward add in this functionality. Will look into it soon.