Standard errors for smooth coefficient kernel regression with npscoef {np}

326 views Asked by At

While fitting a Smooth Coefficient Kernel Regression with help of npscoef {np} in R, I cannot output the standard errors for the regression estimates.

The Help states that if errors = TRUE, asymptotic standard errors should be computed and returned in the resulting smoothcoefficient object.

Based on the example provided by the authors of the package "NP":

library("np")
data(wage1)
NP.Ydata <- wage1$lwage 
NP.Xdata <- wage1[c("educ", "tenure", "exper", "expersq")] 
NP.Zdata <- wage1[c("female", "married")] 

NP.bw.scoef <- npscoefbw(xdat=NP.Xdata, ydat=NP.Ydata, zdat=NP.Zdata)
NP.scoef <- npscoef(NP.bw.scoef, 
                       betas = TRUE,  
                       residuals = TRUE,
                       errors = TRUE)

Coefficients are in the object coef(NP.scoef) saved under betas = TRUE

> str(coef(NP.scoef))
 num [1:526, 1:5] 0.146 0.504 0.196 0.415 0.415 ...
 - attr(*, "dimnames")=List of 2
  ..$ : NULL
  ..$ : chr [1:5] "Intercept" "educ" "tenure" "exper" ...

But should not the standard errors for the estimates be saved under errors = TRUE? I see only one column vector. Not 5 for intercept + 4 explanatory variables.

> str(se(NP.scoef))
 num [1:526] 0.015 0.0155 0.0155 0.0268 0.0128 ...

I am confused. Hope for a clarification.

0

There are 0 answers