I'm writing a script to fit a set of generalized linear models to a data and then extracting the AIC etc to do model averaging. Because of the way that JMP codes categorical variables in the design matrix for generalized linear models (JMP uses a sum-to-zero coding rather than a corner point coding), it is difficult to model average the predictions using the estimated coefficients reported in the fit (one of the categories is never shown and I would need to do extensive programming to recreate it). It looks like it would be easiest to simply use the prediction formula from the platform and then apply the model weights to these predictions in one large formula.
However, as far as I can see, I need to save the prediction formula to the data table for EACH model, and then I can extract the formula and save for use elsewhere using something along the lines of
modelfit << prediction formula;
modelpredformula = char(Column(data, "P(PA) Formula") << Get formula());
where "P(PA) Formula" is the predicted formula. I can then save the model prediction formula (in character form) in my summary AIC table and eventually create a super formula which is a weighted sum of the individual formulae ....
However, this slows the script down considerably because the predictions are computed for the entire data table and I have to add and remove the column for each model fit.
So, is there a way to extract the actual prediction formula from a model fit WITHOUT having to first save the column to the data table and have JMP actually do the computations?
Thanks
Carl Schwarz