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: eiv
See also: gplmest gplmopt

Quantlet: eivplmnor
Description: eivplmnor fits partially linear EIV model where the conditional distribution of y given x and t is normally distributed.

Reference(s):

Link:
Usage: myfit = eivplmnor(x,t,y,sigma,h{,opt})
Input:
x n x p matrix, the discrete predictor variables.
t n x q matrix, the continuous predictor variables.
y n x 1 vector, the response variables.
sigma scalar, the variance of the measurement error.
h q x 1 vector, the bandwidth.
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.b0 p x 1 vector, the initial coefficients. If not given, all coefficients are put =0 originally.
opt.wx scalar or n x 1 vector, prior weights. If not given, set to 1.
opt.wt n x 1 vector, weights for t (trimming factors). If not given, all set to 1.
opt.tg ng x 1 vector, a grid for continuous part. If tg is given, the nonparametric function will also be computed on this grid.
opt.shf integer, if exists and =1, some output is produced which indicates how the iteration is going on.
opt.nosort integer, if exists and =1, the continuous variables t and the grid tg are assumed to be sorted by the 1st column. Sorting is required by the algorithm! Hence this option should be given only when data are sorted.
opt.miter integer, maximal number of iterations. The default is 10.
opt.cnv integer, convergence criterion. The default is 0.0001.
opt.wtc n x 1 vector, weights for convergence criterion, w.r.t. m(t) only. If not given, opt.wt is used.
opt.off scalar or n x 1 vector, offset in predictor.
Output:
myfit.b k x 1 vector, estimated coefficients.
myfit.bv k x k matrix, estimated covariance matrix for coefficients.
myfit.m n x 1 vector, estimated nonparametric part.
myfit.mg ng x 1 vector, estimated nonparametric part on grid if tg was given. This component will not exist, if tg was not given.
myfit.stat list with the following statistics:
myfit.stat.deviance deviance,
myfit.stat.pearson generalized pearson's chi^2,
myfit.stat.r2 pseude R^2,
myfit.stat.dispersion dispersion parameter estimate,
myfit.stat.it scalar, number of iterations needed.

Example:
library("eiv")
library("xplore")
n=100
randomize(n)
sigma=0.81
b=1|2
p=rows(b)
x=2.*uniform(n,p)-1
t=sort(2.*uniform(n)-1,1)
w=x+sqrt(sigma)*uniform(n)
m=0.5*cos(pi.*t)+0.5*t
y=x*b+m+normal(n)./2
h=0.5
sf=eivplmnor(w,t,y,sigma,h)
b~sf.b
dds=createdisplay(1,1)
show(dds,1,1,t~m,t~sf.m)

Result:
A partially linear fit for E[y|x,t] is computed.
sf.b contains the coefficients for the linear part.
sf.m contains the estimated nonparametric part
evaluated at observations t. The example gives the
true b together with the EIVPLM estimate sf.b. Also, the
estimated function sf.m is displayed.



Author: H. Liang, W. Haerdle, 19970828 license MD*Tech
(C) MD*TECH Method and Data Technologies, 05.02.2006