Usage: |
{y,mu} = genglm(code, x, b {,opt})
|
Input: |
| code | text string, the short code for the model (e.g.
"bilo" for logit or "noid" for ordinary PLM).
|
| x | n x k matrix, design.
|
| b | k x 1 vector, coefficients.
|
| 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.phi | nuisance parameter, usually the dispersion
parameter.
|
| opt.wx | scalar or n x 1 vector, the binomial index
vector, only considered for binomial models.
If not given, set to 1.
|
| opt.off | scalar or n x 1 vector, offset.
If not given, set to 0.
|
| opt.pow | optional, power for power link.
|
| opt.nbk | scalar, extra parameter k for negative
binomial distribution. 1/k is supposed
to be a positive integer.
If not given, set to 1 (geometric distribution).
|
Output: |
| y | n x 1 vector, response. |
| mu | n x 1 vector, regression. |