悬赏 9 个论坛币 未解决
As a beginner of R, I have two question about how to use "npcoefbw", which must be very easy for you.I will appreciate it very much,if you can take a look at this:
1. My model is y=g(z)+b(z)x=[1,x]*[g(z),b(z)]+e=w*beta(z)+e
2. The code I try is:
X<-data.frame(1,z)
Z<-data.frame(x,x)
bw<-npscoefbw(xdat=X,ydat=y,zdat=Z,betas=TRUE)
model<-npscoef(bw)
3.My question is:
(1) Is the code right
(2) I've got beta[1:n,1:3], while the supposed one is beta[1:n,1:2] since beta(z)=[g(z),b(z)].I'm not sure which two correspond to g(z) and b(z), and what's the details of the left one.
Thanks for attention or curiousness!