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

 Quantlet: wavetest Description: Additive component analysis in additive separable models using wavelet estimation. The first (additive) component is tested against a given polynomial form of degree p, e.g., if p=1 is to test linearity, p=0 is to test for significant influence of the first component at all etc. For details see Haerdle, Sperlich, Spokoiny (1997), DP 52, SFB 373 Berlin.

 Usage: erg = wavetest(x,y,p{,dis{,data{,adjust}}}}) Input: x n x d matrix , the observed explanatory variable where all dummy inputs (0-1 variables) are expected to be in the last ('dis') columns. y n x 1 matrix , the observed response variable p scalar , the polynomial degree of the Hypothesis, see Description. dis scalar , the number of dummy variables in x. Have to be the last columns in x. Default is dis=0. data optional string, if output file for the wavelet coefficient estimates is wished, this string will be the name of that output file. adjust optional 2 x 1 vector, multiplicators for the critical values. E.g. adjust=(0.5, 1) give about 5% first kind error, adj=(1, 2.5) give about 1%. Default is (1, 1). For details see Haerdle, Sperlich, Spokoiny (1997). Output: erg object of string, the table of results data data file , containing the wavelet estimates

Note:
Data file "data" with wavelet estimates will generated. Note that a logfile "prot.log" will generated with some detailed information about the generation process.

Example:
```library("gam")
randomize(1234)
n   = 100            ; sample size
x   = normal(n,3)    ; regressor variables
eps = normal(n,1) * sqrt(0.8)    ; error term
y   = sin(2*x[,1]) + x[,2]^2 + 2*x[,3] +eps   ; model
;  first component of the model is sin-function
p   = 1              ;  H_0: first component is linear
erg = wavetest(x,y,p)   ; no dis, as dis=0 is already default
erg                     ; show table of results

```
Result:
```Contents of erg

[ 1,] " "
[ 2,] "-------------------------------------------------------"
[ 3,] "no output of function estimates"
[ 4,] "-------------------------------------------------------"
[ 5,] "HYPOTHESIS: 1.add.component is polynomial of degree  1"
[ 6,] "-------------------------------------------------------"
[ 7,] "Hypothesis has been rejected at level  0"
[ 8,] "-------------------------------------------------------"
[ 9,] "highest possible level is  3"
[10,] " "
[11,] "-------------------------------------------------------"
[12,] "-------------------------------------------------------"
[13,] "            local Test              chi-2 like Test "
[14,] "- - - - - - - - - - - - - - - - - - - - - - - - - - - -"
[15,] "level  crit.value  test stat.    crit.value  test stat. "
[16,] "-------------------------------------------------------"
[17,] "  0      2.74767      4.34917      3.24940     12.66804"
[18,] "-------------------------------------------------------"
[19,] "-------------------------------------------------------"
[20,] " "
```

Author: S. Sperlich, 19970730
(C) MD*TECH Method and Data Technologies, 05.02.2006