Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: gam
See also: intest intestpl gintest gintestpl gamopt gamout

Macro: gamfit
Description: gamfit provides an interactive tool for fitting additive models

Link:
Usage: gamfit(t,y{,opt})
Input:
t n x p matrix, the predictor variables.
y n x 1 vector , the observed response variables
opt optional, a list with optional input. The macro "gamopt" 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 deflts (see below).
opt.x n x d matrix, the discrete predictor variables.
opt.h p x 1 or 1 x 1 matrix , chosen bandwidth for the directions of interest
opt.g p x 1 or 1 x 1 matrix , chosen bandwidth for the directions not of interest
opt.loc dummy , for loc=0 local constant (Nad. Wats.), for loc=1 local linear and for loc=2 local quadratic estimator will be used
opt.kern string, specifying the kernel function for backfitting algorithm
opt.tg ng x pg vector, a grid for continuous part. If tg is given, the nonparametric function will be computed on this grid.
opt.shf integer, (show-how-far) if exists and =1, an output is produced which indicates how the iteration is going on (additive function / point of estimation / number of iteration).
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, "gam" is used.
opt.xvars p x 1 string vector, variable names for the output. Note, that only up to 11 characters are used.
Output:
gampic or opt.name+"pic" display, containing estimation result
gamfit list object, which is made globally available
gamfit.m estimator for the non-linear part
gamfit.b p x 1 vector, estimated coefficients of the linear part
gamfit.bv p x p matrix, estimated covariance matrix for b.
gamfit.const scalar, estimated constant.
gamfit.opt list, internally used option list.

Example:
library("gam") 
randomize(1234)
t     = uniform(50,2)*2-1
g1    = 2*t[,1]
g2    = t[,2]^2 
g2    = g2 - mean(g2)
y     = g1 + g2  + normal(50,1) * sqrt(0.25)
gamfit(t,y)
Result:
Gamfit allows to choose interactively the model and 
the estimation procedure and inquires all further needed
options and parameters. It runs the non-interactive estimation
macro and provides a beautyful output at the end.

Library: gam
See also: intest intestpl gintest gintestpl gamopt gamout

Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Author: Stockmeyer, Sperlich 970819
(C) MD*TECH Method and Data Technologies, 28.6.1999