Usage: |
doglm(x,y{,opt})
|
Input: |
| x | n x p matrix, the predictor variables.
|
| y | n x 1 vector, the response variables.
(In the case of replicated data, the number of
replications should be given in opt.wx and y should
contain the sums of all responses for a replication.)
|
| 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.code | text string, the short code for the model (e.g.
"bilo" for logit or "noid" for ordinary PLM).
|
| opt.wx | scalar or n x 1 vector, prior weights. If not given,
all weights are set to 1.
|
| opt.off | scalar or n x 1 vector, offset in linear predictor.
If not given, set to 0.
|
| opt.name | string, prefix for the output. If not given, "glm"
is used.
|
| opt.xvars | p x 1 string vector, variable names for the output.
Note, that only up to 15 characters are used.
|
| opt.title | string, title for the output. If not given, a default
is set.
|
| opt.nopic | integer, if exists and =1, output is not shown
in displays, but written to XploRe_out.
|
Output: |
| doglm | or opt.name,
list, global variable with the components:
|
| doglm.b | p x 1 vector, estimated coefficients.
|
| doglm.bv | p x p matrix, estimated covariance matrix for b.
|
| doglm.stat | list with components as computed by glmstat:
serror (standard errors of coefficients),
tvalue (t-values for coefficients),
pvalue (p-values for coefficients),
df (degrees of freedom),
deviance (deviance),
pearson (generalized pearson's chi^2),
loglik (log-likelihood),
dispersion (estimated dispersion =pearson/df),
r2 ((pseudo) coefficient of determination),
adr2 (adjusted (pseudo) coefficient of determination),
aic (Akaike's AIC criterion),
bic (Schwarz' BIC criterion), and
it (number of iterations needed),
ret (return code,
0 if everything went o.k.,
1 if maximal number of iterations reached,
-1 if missing values have been encountered),
nr (number of replications found in x).
|
| doglmSummary | or opt.name+"Summary",
display, containing summary statistics and
show which variables are selected for fit.
|
| doglmsum | or opt.name+"sum",
string vector, global, containing summary
statistics as text.
|
| doglmOutput | or opt.name+"Output",
display, containing estimation result in the left
panel and a plot of the index x*b{+off} vs. y
(vs. y./wx for binomials) and a plot of the index
vs. the link function.
|
| doglmout | or opt.name+"out",
string vector, global, containing estimation result
in the left panel as text.
|