Library: | metrics |
See also: | dwade adeind adeslp ndw |
Macro: | adedis | |
Description: | adedis computes estimates of the slope coefficients in a single index model. The coefficents of the continuous variables are estimated by (an average of) dwade (density-weighted average derivtive) estimates. The coefficients of the disrete explanatory variables are estimated by the method proposed in Horowitz and Haerdle, JASA 1996. |
Usage: | {delt,alphahat,lim,hd}=adedis(z,x,y,h,hfac,c0,c1) | |
Input: | ||
z | n x d1 matrix , the observed discrete explanatory variables | |
x | n x d2 matrix , the observed continuous explanatory variables | |
y | n x 1 matrix , the observed response variable | |
h | d2 x 1 or 1 x 1 matrix , bandwidth for dwade etimation | |
hfac | scalar, to scale bandwidth for estimation of the link function | |
c0,c1 | scalars , monotonicity constants | |
Output: | ||
delta | d2 x 1 matrix, the density weighted average derivative estimates of the coefficients of the elements of x. | |
alphahat | d1 x 1 matrix, the estimates of the coefficients of the elements of z. | |
lim | 2 x 1 matrix, the limits of integration corrsponding to the parameters v0 and v1 in the paper of Horowitz and Haerdle. | |
hd | d3 x 1 matrix , bandwidth for estimation of the link function for each of the d3 distinct values of the matrix z |
library("sim") randomize(10178) n=1000 z=(uniform(n).>0.5)~(uniform(n).<0.5) x=normal(n)~normal(n) ystar=1.5*z[,1]+0.25*z[,2]+1*x[,1]+2*x[,2]+normal(n) y=(ystar>=0) h = 0.2*(max(x)-min(x))' hfac = 1.5 c0=0.10564 c1=0.97725 {d,a,lim,hd}=adedis(z,x,y,h,hfac,c0,c1) d a lim hd
The slope coefficients, d, and intercept coefficients, a, of a single index model E[y|x]=g(d'x+a'z) are computed. The integration limits (lim) and bandwidths (hd) used in the estimation procedure are returned.
Library: | metrics |
See also: | dwade adeind adeslp ndw |