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