The GENMOD procedure fits generalized linear models. This procedure is used to fit generalized linear models using maximum likelihood estimation method or Bayesian methods, cumulative link models for ordinal responses, zero-inflated regression models (Poisson and Negatvie Binomial) for count data, and GEE analyses for marginal models.
The class of generalized linear models is an extension of traditional linear models that allows the mean of a population to depend on a linear predictor through a nonlinear link function and allows the response probability distribution to be any member of an exponential family of distributions. Many widely used statistical models are generalized linear models. These include classical linear models with normal errors, logistic and probit models for binary data, and log-linear models for multinomial data.
proc genmod data = dataname; class var1 ; model var3 = var2 var1 var4 var5 / offset= var6 d=nb scale type3 wald noscale scale = deviance; repeated subject = var1 / v6corr corrw covb type=ar modelse sorted; output out=resdata lower=lowerb upper=upperb reschi=residuals stdreschi=stdresiduals resdev=residual_deviance stdresdev=stdresidual_deviance xbeta=betas pred=predicted_values;assess var=(var4) / resample=100 seed=603708000; run;
Note.
The errors are empirical standard errors i.e. robust estimates produced by the method of White (1980) which do not depend on the correctness of the structure imposed on the working correlation matrix. if needed to estimate model based errors: use MODELSE option in repeated statement, uses the correlation structure imposed to estimate errors and z-value and p-value (a better estimate if assumed correlation is correct and vice versa).