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. |