7.5 How to Append Optional Parameters


opt= 15219 gamopt (s0, v0{, s1, v1,$ \dots${, opt}})
creates option list for gam quantlets

All quantlets in the XploRe quantlib gam expect optional parameters to be tailed onto the parameter list by means of a list object. The auxiliary quantlet 15230 gamopt presents a convenient tool to create the option list opt.

s0,s1,...
string, names of the components to add. Allowed are:

"x" discrete predictor variables
"loc" indicator for local const, linear or quadratic estimation
"tg" grid
"h" bandwidth for the directions of interest
"g" bandwidth for the directions not of interest
"code" model code
"kern" name of the kernel function
"wx" weights
"off" offset
"shf" indicator to show iterations
"miter" maximal number of iterations
"cnv" convergence criterion
"fscor" Fisher scoring will be used
"pow" power for 15233 gintestpl
"nopic" show no picture
"descript" add descriptive statistics
"pl" partially linear model
"name" output variable name
"xvars" discrete variable names
"tvars" name of t-variable
"yvars" name of y-variable
"title" output picture title
"bv" covariance matrix for b
v0,v1,...
the value of the corresponding component to add
opt
It is appropriate to use the old list of options as a parameter to save the previously defined ones.

For instance, calling

 opt = gamopt("code","bipro","miter",10,"nopic",1,opt)
appends the optional parameters code, miter and nopic containing the values "bipro", 10 and 1 to the already existing option list opt.

Up to 10 optional parameters may be appended at one call. Rerun the quantlet to extend your option list.

Finally, check the list with the 15236 names command or by typing its name.

names(opt)
[1,] code
[2,] miter
[3,] nopic
opt
Content of object opt.code
[1,] bipro
Content of object opt.miter
[1,] 10
Content of object opt.nopic
[1,] 1

The resulting option list may be used with different quantlets of the gam quantlib. Each quantlet picks out all the optional parameters needed, thus it is possible to use one option list for all gam quantlets.

Principally it is possible to define the list of optional parameters with the XploRe command 15247 list . However, this approach has some drawbacks. First, all elements of the option list would exist twice: as global objects as well as list components. Also, name conflicts could arise, since the components need to have specific names to be correctly identified by the gam quantlets. Finally, XploRe supports 15256 list with identical names for different list components. In this case, only the first of multiple elements with the same name can be identified.

Therefore, it is recommended to use the quantlet 15259 gamopt to set the options.