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: metrics
See also: locpol sir sir1 adedis dwade

Quantlet: MIregest
Description: Estimates a Multi Index model by finding the orthogonal transformation matrix B by the MAVE and the OPG method. The model has the following form: y = g(B*x) + error, where B*x represents the Multi Index.

Reference(s):

Usage: B = MIregest(x, y, h, D {, logi})
Input:
x n x p matrix of explanatory variables
y n x 1 matrix of dependent variable
h p x 1 vector of bandwidths
D expected number of efficient dimension (0<D<=p)
logi optional, methods indicator: 0 (default) -- OPG method using local linear smoother 1 -- OPG method using quadratic polynomials 2 -- MAVE method
Output:
B p x D orthogonal matrix

Example:
library("metrics")
library("plot")
;
randomize(0)
n = 100
p = 4
beta1 = #(1, 2, 3, 0)
beta1 = beta1/sqrt(beta1'*beta1)             ;the first true index
beta2 = #(1,(-2), 1, 1)
beta2 = beta2/sqrt(beta2'*beta2)             ; the second true index
x = normal(n, 4)                             ; independent variable
m =(x*beta1).^2 +(x*beta2).^2              ; true function
e = 0.2*normal(n,1)                          ; error term
B = beta1~beta2                              ; multi-index
h = 1.5*trans(5*n^(-1/(1+p))*sqrt(var(x)))   ; bandwidth
D = 2 ;
logi = 0
y = m + e
MI = MIregest(x, y, D, h, logi)                    ; call of Multi Index regression quantlet
xp = x*MI                                                                                 ; determine projected index
Bhat = MI[,1:D]
esterror = Bhat'*(diag(matrix(p)) - B*B')*Bhat     ; compute the accuracy of the projection
esterror
// -- display the multi index model in a D*D plot matrix
prin1 = xp[,1]~y                                   ; the first projection
prin2 = xp[,2]~y                                   ; the second projection
prin12 = xp[,1:2]~y                                ; the 1-2 projection
dp = createdisplay(D,D)
show(dp, 1, 1, prin1)
setgopt(dp, 1, 1, "title", "First projection")
show(dp, 2, 2, prin2)
setgopt(dp, 2, 2, "title", "Second projection")
show(dp, 2, 1, prin12)
setgopt(dp, 2, 1, "title", "rotate")

Result:
the transformation matrix B

Contents of esterror
   [1,]  0.014568  0.003744
   [2,]  0.003744  0.0020512



Author: Y. C. Xia, W. Haerdle, 20010825. license MD*Tech
(C) MD*TECH Method and Data Technologies, 05.02.2006