 Usage:  stat = glmstat(code,x,y,b,bv{,opt})  
 
 Input:

  code                   text string, the short code for the model (e.g. 
                         "bilo" for logit or "noid" for ordinary PLM). 
                         
  x                      n x p matrix, the predictor variables. 
                         
  y                      n x 1 vector, the response variables. 
                         (In the case of replicated data, the number of 
                         replications should be given in opt.wx and y should 
                         contain the sums of all responses for a replication.) 
                         
  b                      p x 1 vector, estimated coefficients. 
                         
  bv                     p x p matrix, inverse Hessian of optimization 
                         procedure. This is the estimated covariance of b, 
                         as it comes out of "glmcore", i.e. not yet corrected 
                         for dispersion! 
                         
  opt                    optional, a list with optional input. The macro 
                         "glmopt" can be used to set up this parameter. 
                         The order of the list elements is not important. 
                         Parameters which are not given are replaced by 
                         defaults (see below). 
                         
  opt.weights            string, type of weights. Can be "frequency" 
                         for replication counts, or "prior" (default) 
                         for prior weights in weighted regression. 
                         
  opt.wx                 scalar or n x 1 vector, frequency or prior 
                         weights. If not given, set to 1. 
                         
  opt.off                scalar or n x 1 vector, offset in linear predictor. 
                         If not given, set to 0. 
                         
  opt.pow                scalar, power for power link. If not given, set 
                         to 0 (logarithm). 
                         
  opt.nbk                scalar, extra parameter k for negative binomial 
                         distribution. If not given, set to 1 (geometric 
                         distribution). 
                         
 Output:

  stat                   list with the following statistics: 
                         
  stat.serror            standard errors of parameter estimates. 
                         
  stat.tvalue            t-values for parameter estimates. 
                         
  stat.pvalue            p-values for significance of parameter estimates. 
                         
  stat.df                degrees of freedom. 
                         
  stat.deviance          deviance. 
                         
  stat.pearson           generalized pearson's chi^2. 
                         
  stat.loglik            log-likelihood. 
                         
  stat.dispersion        dispersion parameter estimate =pearson/df. 
                         
  stat.r2                (pseudo) R^2. 
                         
  stat.adr2              adjusted (pseudo) R^2. 
                         
  stat.aic               AIC criterion. 
                         
  stat.bic               BIC criterion. 
                         
--------------------------------------------------------------
(C) MD*TECH Method and Data Technologies, 17.8.2000
