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 interact intertest2

Quantlet: intertest1
Description: intertest1 is testing for interaction of x_1 and x_2 in an additive regression model. It is looking at the interation estimate and using wild bootstrap. For details see Sperlich, Tjostheim, Yang (1997)

Usage: testt = intertest1(t,y,h,g{,opt{,file}})
Input:
t n x p matrix , the observed explanatory variable where the directions of interest have to be the first and second column
y n x 1 vector , the observed response variables
h p x 1 or 1 x 1 matrix , chosen bandwidth for the directions of interest in the estimation step
g p x 1 or 1 x 1 matrix , chosen bandwidth for the directions not of interest in the estimation step
opt.hyp pp x 2 matrix, in the rows have to be all pairs of indices for interactions which shall be included in the hypothesis model. Thus (1,2) must not be a row of hyp.
opt.boot integer, number of bootstrap replications, default=249.
opt.hb scalar, bandwidth multiplicator for the bootstrap step. When the test statistics are calculated we take bandwidths h*hb and g*hb instead of h, g. Default is 1.
opt.weight n x 1 vector, weights for the test statistics. Default is weight 1 for all.
file string, file name of output, if an output of the function estimates is wished
Output:
testt string object, a table of results

Example:

library("gam")

randomize(12345)

n     = 50

t     = uniform(n,3)*2-1

g1    = 2*t[,1]

g2    = t[,2]^2 - mean(t[,2]^2)

g3    = sin(3*t[,3])

g12   = t[,1].*t[,2]

y     = g1+g2+g3+g12+normal(n)*sqrt(0.5)

h     = #(0.9,0.9,0.7)

g     = #(1.0,1.0,0.9)

boot  = 99

hb    = 1.1

weight= matrix(n)-prod((abs(t[,1:2]).>0.85),2)

opt   = list(boot,hb,weight)

intertest1(t,y,h,g,opt)

Result:

table of test results


Library: gam
See also: intest interact intertest2

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: Sperlich 970723
(C) MD*TECH Method and Data Technologies, 21.9.2000