Ying Zheng
2013-Aug-20 21:10 UTC
[R] Problems about nonparametric regression with multivariate dependent variables
My problem is to evaluate several conditional moments nonparametrically. That is to evaluate E(y|x=x_0) and Var(y|x=x_0) with y a 2x1 variable. I have tried several commands in "np" package, like "npregbw". I cannot find a command that can apply to the case with multivariate dependent variables, i.e. y in my case. I cannot do (y1, y2) separately because finally I also need to evaluate Var(y|x=x_0). My thought is to do this: 1. evaluate E(y1|x=x_0) and E(y2|x=x_0) separately; 2. Var(y|x=x_0)=E(yy'|x=x_0)-E(y|x=x_0)E(y|x=x_0)', so I evaluate E(yy'|x=x_0) by evaluating E(y1y1|x=x_0), E(y1y2|x=x_0), E(y2y2|x=x_0) separately. Then put them in the right order to form a 2X2 matrix. Am I right if I do this? And is there direct way to do this? Thank you for suggestions. -- Best Regards, Ying Zheng [[alternative HTML version deleted]]