6.4 Options
- opt =
gplmopt
(string1, value1, ...{, opt})
- creates a list of options for GPLM estimation or appends options
to an existing list
|
All options for the algorithm and optional parameters
need to be collected in a list object. This allows just to set or to modify
only those options which are necessary. All quantlets in the
gplm
quantlib (except for
gplmcore
)
allow options. It is possible to give the same list of
options to different routines. For example,
opt=gplmopt("miter",20,"name","MyDisplay")
will set the maximal number of iterations to 20 and the name of the output
display to MyDisplay. Option lists used for the
glm
quantlib can be used as well.
With the above option settings, one can call first
gplmest
and then
gplmout
:
l=gplmest("bilo",x,y,opt)
glpmout("bilo",x,y,opt)
Both quantlets only consider those optional
parameters which are intended for them. Hence
gplmest
will only care about miter whereas
gplmout
will only use the parameter name to
present a display named MyDisplay.
6.4.1 Setting Options
As for the
glm
quantlib, it is recommended to use
gplmopt
to set the options.
gplmopt
is used in the same way as
glmopt
.
Essentially, the possible options in the
gplm
quantlib are a superset of those in the
glm
quantlib. A list of options created with
glmopt
can hence be used or extended with
gplmopt
.
6.4.2 Grid and Starting Values
As shown in Subsection 6.3.1, it can be useful
to estimate the nonparametric function
not only
on the observations t, but also on a grid tg.
The optional parameter is:
- tg
- grid values (on the same scale as t)
This parameter can also be used to compute
predictions for
on other values than those
given in t.
All presented algorithms for GPLM are iterative and require
first an initialization step.
Different strategies to initialize the iterative algorithm
are possible:
- Start with
,
from a parametric (GLM) fit.
- Alternatively, start with
and
(for example with the
adjustment
for binary responses).
- Backfitting procedures often use
and
.
The
gplm
quantlib uses the first method by
default. If a different method is to be used,
the necessary starting values can be given as optional input:
- b0
- initial values for the estimation of b.
- m0
- initial values for the estimation of m.
- m0g
- initial values for the estimation of mg.
6.4.3 Weights and Offsets
The estimation quantlet
gplmest
is able to handle special cases
as weights and constraints on parameters (fix parameters).
Setting weights and offsets is done in the same way as in the
glm
quantlib.
Please consult the corresponding subsections of the
GLM tutorial.
Weights and offsets can always be given as a optional parameter.
The corresponding components of the list of optional parameters are
- weights
- type of weights, either "frequency"
for replication counts or "prior"
for prior weights in weighted regression.
- wx
- weights,
vector or scalar.
- wt
- trimming weights for estimation of the linear part,
vector or scalar.
- wc
- weights to be used in the convergence criterion,
vector or scalar.
- wr
- weights to be used in the modified LR test statistics,
vector or scalar.
- off
- offset,
vector or scalar.
None of these parameters should contains missing or infinity values.
Defaults are weights="prior",
wx=1, wt=1, wc=1, wr=1,
and off=0.
6.4.4 Control Parameters
There is a number of control parameters which modify the used algorithm.
- meth
- method to be used for GPLM estimation: -1 for backfitting,
0 for generalized Speckman estimator and 1 for profile
likelihood. The default value is meth=0 for the Speckman algorithm.
- fscor
- indicator for Fisher scoring (instead of Newton-Raphson optimization).
fscor=1
means that the Fisher scoring is used. Default is fscor=0 for
Newton-Raphson. This parameter is ignored for canonical link
functions.
- cnv
- convergence criterion. The iteration stops when the relative change of
the coefficients vector b, the estimated curve m
and the deviance are
less than cnv. Default is cnv=0.0001.
- miter
- maximal number of iterations.The iteration stops when this maximal number
of iterations is reached. Default is miter=10.
- nosort
- nosort=0 forces not to sort the data by the first column
of t (and tg, if the optional grid tg
is given). Default is nosort=0, i.e., to sort.
The following parameter switches on/off information during the computation.
- shf
- shows how the iteration is going on, if shf=1 is set. Default is
shf=0.
6.4.5 Model Parameters
These two parameters are only relevant for power link and
negative binomial models, respectively:
- pow
- power for the power link function, default is pow=0 (logarithmic
link).
- nbk
- parameter
for the negative binomial distribution, the default
is nbk=1 (geometric distribution).
6.4.6 Specification Test
The modified LR test implemented in
gplmbootstraptest
(see Subsection 6.5.3) allows the following options:
- wr
- weights to be used in the modified LR test statistics,
vector or scalar. The default value is wr=1.
- tdesign
- design matrix (in t) for the GLM hypothesis,
matrix.
The default design is matrix(n)~t
.
6.4.7 Output Modification
The
gplmout
routine which shows the output display
provides some special possibilities to modify the output:
- nopic
- suppresses the output display
if nopic=1. Default is nopic=0.
- xvars
- string vector,
, containing variable names for the columns
of x.
- name
- single string, name for output and prefix for output displays from
gplmout
.
- title
- single string, title to be used in
gplmout
.