Usage: |
myfit = gplmbilo(x,t,y,h{,opt})
|
Input: |
| x | n x p matrix, the discrete predictor variables.
|
| t | n x q matrix, the continuous predictor variables.
|
| y | n x 1 vector, the response variables.
y[i] may have (integer) values between 0
and opt.wx[i] or opt.wx (if opt.wx is scalar).
|
| h | q x 1 vector, the bandwith.
|
| opt | optional, a list with optional input. The macro
"gplmopt" 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,
usually the binomial index vector. If not
given, set to 1.
|
| opt.b0 | p x 1 vector, the initial coefficients. If not
given, all coefficients are put =0 initially.
|
| opt.m0 | n x 1 vector, the initial values for the nonparametric
part. If not given, log((1+2y)./(3-2y)) is used.
|
| opt.wt | n x 1 vector, weights for t (trimming factors).
If not given, all set to 1.
|
| opt.tg | ng x 1 vector, a grid for continuous part. If tg is
given, the nonparametric function will also be
computed on this grid.
|
| opt.m0g | ng x 1 vector, the values for the nonparametric part
on the grid. If not given, it is approximated from m0.
|
| opt.shf | integer, if exists and =1, some output is produced
which indicates how the iteration is going on.
|
| opt.nosort | integer, if exists and =1, the continuous variables
t and the grid tg are assumed to be sorted by the
1st column. Sorting is required by the algorithm,
hence you should switch if off only when the data
are already sorted.
|
| opt.miter | integer, maximal number of iterations. The default
is 10.
|
| opt.cnv | integer, convergence criterion. The default is 0.0001.
|
| opt.wtc | n x 1 vector, weights for convergence criterion,
w.r.t. m(t) only. If not given, opt.wt is used.
|
| opt.off | scalar or n x 1 vector, offset in predictor.
|
Output: |
| myfit.b | p x 1 vector, estimated coefficients
|
| myfit.bv | p x p matrix, estimated covariance matrix for coeff.
|
| myfit.m | n x 1 vector, estimated nonparametric part
|
| myfit.mg | ng x 1 vector, estimated nonparametric part on grid
|
| myfit.stat | list with the following statistics:
|
| myfit.stat.deviance | deviance,
|
| myfit.stat.pearson | generalized pearson's chi^2,
|
| myfit.stat.loglik | log-likelihood,
|
| myfit.stat.r2 | pseudo R^2,
|
| myfit.stat.it | scalar, number of iterations needed
|