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

Macro: glmscatter
Description: glmscatter computes a scatterplot to explain the marginal influence of a variable on the response.

Link:
Usage: sc = glmscatter(code,x,y)
Input:
code text string, the short code for the model (e.g. "bilo" for logit or "noid" for ordinary LS).
x n x 1 matrix, explanatory variable.
y n x 1 response.
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.wx scalar or n x 1 vector, prior weights. If not given, all weights are 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).
Output:
sc m x 2 discretized or binned x in the first column and the invers link function applied to the averaged y (in bin) in the second column.

Example:
library("glm")
x=normal(50)
y=(x+normal(50) >0)         ; probit model
sc=glmscatter("bipro",x,y)
library("graphic")
m=setmask(x~x,"line","red") ; true relation = linear
plot(sc,m)
Result:
The point cloud sc should follow the 45ø line.

Library: glm
See also: glminvlink

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

Author: Marlene Mueller, 970912
(C) MD*TECH Method and Data Technologies, 28.6.1999