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 gintest gintestpl gamfit pcad

Quantlet: intestpl
Description: estimation of the univariate additive functions in a separable additive partial linear model using local polynomial estimation

Usage: {m,b,const} = intestpl(x,t,y,h,g,loc{,opt})
Input:
x n x d matrix, the discrete predictor variables.
t n x p matrix, the continuous predictor variables.
y n x q matrix , the observed response variables
h p x 1 or 1 x 1 matrix , chosen bandwidth for the directions of interest
g p x 1 or 1 x 1 matrix , chosen bandwidth for the directions not of interest
loc dummy , if loc=1 local linear, if loc=2 local quadratic estimator will be used,
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.
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).
Output:
m ng x pp x q matrix, where pp = p * loc, containing the marginal integration estimators of the additive components in the first p columns, the derivatives in the following.
b d x 1 matrix, containing the estimators of the linear factors of the corresponding linear influences
const scalar, containing the intercept

Example:
library("gam")
randomize(1345)
loc= 2
x = matrix(50,2)
t = uniform(50,2)*2-1
xh = uniform(50,2)
x[,1]= 3*(xh>=0.8)+2*((0.8>xh)&&(xh>=0.3))+(0.3>xh)
x[,2]=(xh>(1/3))
g1    = 2*t[,1]
g2    =(2*t[,2])^2
g2    = g2 -mean(g2)
m     = g1 + g2 + x*(0.2|-1.0)
y     = m + normal(50,1)*0.25
h     = #(1.4, 1.4)
g     = #(1.4, 1.4)
{m,b,const} = intestpl(x,t,y,h,g,loc)
b
const
bild =createdisplay(1,2)
dat11= t[,1]~g1
dat12= t[,1]~m[,1]
setmaskp(dat12,4,4,8)
show(bild,1,1,dat11,dat12)
dat21= t[,2]~g2
dat22= t[,2]~m[,2]
setmaskp(dat22,4,4,8)
show(bild,1,2,dat21,dat22)

Result:
the marginal integration estimates of the additive
functions and the vector of the linear part,
see Fan, Haerdle and Mammen (1996)
and the derivatives of the additive functions, using
local polynomials, see Severance-Lossin & Sperlich (1997).



Author: S. Sperlich, W. Stockmeyer, W. Haerdle, 19970711 license MD*Tech
(C) MD*TECH Method and Data Technologies, 05.02.2006