Being a relatively newby on gamlss I am likely missing something. I'm trying to model some growth charts and have evaluated different options and find (by plotting, GAIC evaluation and hyper paramater optimisation) that the following model provides the best fit:
mod_fp_poly2_gg <- gamlss(value~fp(age,npoly = 2),sigma.formula = ~fp(age,npoly = 2), family = GG, data = data)
Now given that this is a growth chart I would like to be able to compute a z-score for any new data-point I am given, so I try this:
newdata <- data.frame(age = 1000, value = 600000, group = "new")
predictAll(mod_fp_gg2, newdata = newdata)
# as well as
centiles.pred(mod_fp_bct, xname = "age", xvalues = 1000, yval = 600000, type="z-scores")
both of these give the same error which seems related to the fact that this isn't a 'simple' lm fit
Error in lm.wfit(X[onlydata, , drop = FALSE], y, w) : incompatible dimensions
Is there a way to extract z-scores (or centiles for that matter) from new data with the given model?