data(c401k)
attach(c401k)
## Not run:
# # binary outcome
# Z <- c401k$e401k
#
# # covariates
# X <- as.matrix(c401k[,c("inc", "male", "fsize" )])
#
# # get nonparametric power series estimation of the regression of Z on X
# zp <- npse(Z~X, order = 5, m = 10, seed = 681)
#
# # sum of residual squares of the cross-validations
# zp$CV.Res
#
# # the opitimal order of the power series
# zp$Lambda
#
# # summary of the predictions based on the optimal power series
# summary(zp$fitted)
# ## End(Not run)
Run the code above in your browser using DataLab