Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: glm
See also: glmest glmstat doglm

Quantlet: glmout
Description: glmout creates a nice output display for GLM.

Link:
Usage: glmout(code,x,y,b,bv,stat{,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.
b p x 1, estimated coefficients.
bv p x p, estimated covariance of b.
stat list, containing statistics produced by glm functions
opt optional, a list with optional input. "glmopt" can be used to set up this parameter. The order of the list elements is not important.
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).
opt.nopic integer, if exists and =1, the output display is not produced.
opt.name string, prefix for the output. If not given, "glm" is used.
opt.xvars p x 1 string vector, variable names for the output. Note, that only up to 15 characters are used.
opt.title string, title for the output. If not given, a default is set.
Output:
glmOutput or opt.name+"Output", display, containing estimation result in the left panel and a plot of the index x*b{+off} vs. y (vs. y./wx for binomials) and a plot of the index vs. the link function.
glmout or opt.name+"out", string vector, global, containing estimation result in the left panel as text.

Example:
library("glm")
n=100
b=1|2
p=rows(b)
x=2.*uniform(n,p)-1
y=x*b+normal(n)./2
{b,bv,stat}=glmest("noid",x,y)
glmout("noid",x,y,b,bv,stat)

Result:
After fitting a linear regression with glmest, a display
is created, which contains the estimated coefficients,
their standard errors and t-values as well as the statistics
determined by glmest on the left panel. The right panel
of the display shows a plot of x*b vs. y together with
a plot of x*b vs. the link function.



Author: M. Mueller, 20010228
(C) MD*TECH Method and Data Technologies, 05.02.2006