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: glminvlink

Quantlet: glmplot
Description: glmplot creates a display and plots for a one-dimensional explanatory variable: the distribution, a scatterplot of the marginal influence versus the response and a scatterplot of the variabel versus the response.

Link:
Usage: glmplot(x,y{,opt})
Input:
x n x 1 matrix, explanatory variable.
y n x 1 response.
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.code text string, the short code for the model (e.g. "bilo" for logit or "noid" for ordinary LS).
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.pow optional, power for power link.
opt.nbk scalar, extra parameter k for negative binomial distribution. If not given, set to 1 (geometric distribution).
opt.xvars scalar string vector, variable name for the output.
opt.name string, prefix for the output. If not given, "glm" is used.
Output:
glmPlot or opt.name+"Plot" display, containing the distribution of x in the first window (histogram/density), the marginal influence of x on y in the second and a scatterplot of x versus y in the third.

Example:
library("glm")
x=normal(500)
y=(x+normal(500) >0)         ; probit model
opt=glmopt("code","bipro")
glmplot(x,y,opt)

Result:
The density of x, the marginal influence of x and a
scatter plot of x and y.



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