I have started using MATLAB statistics toolbox and have a few problems in model fitting. I have read the manual for glm, however I'm still confused with my own data. I have 3 groups of patients,with two nuisance covariates and one dependent variable. I would like to compare the measured dependent variable among three groups, controlling for two nuisance covariates. Statistics toolbox provides several functions for model fitting which is a little confusing for me. I'm confused whether I should start with glmfit or GeneralizedLinearModel and how I should proceed, whether with coeftest, glmval . I would be grateful if someone point me where I should begin and proceed.
The GeneralizedLinearModel interface is intended to be a step forward over glmfit, though the latter is still there. The new version, for example, will take a grouping variable as a predictor without your having to create a dummy variable for it. This version produces an object that provides methods for plotting and for testing the coefficients, among other things.
There's still a place for using glmfit, though. For instance if you wanted to do bootstrapping and didn't need the features of GeneralizedLinearModel, you'd find that glmfit is faster because it avoids any overhead in computing various parts of the fit object.