maxime.to at ensae.fr
2009-May-11 21:50 UTC
[Rd] Predict function npindex and npindexbw (PR#13695)
Full_Name: Maxime To Version: 2.9 OS: WIndows Submission from: (NULL) (81.57.236.122) I am using the npindex and npindexbw fubctions of the NP package. I would like to compute the predicted values of the model and tried to use the predict function for this purpose but the function only gives me the summary of the model but no vector of predicted values as with any other model. Simply using the code of the example, it gives: set.seed(12345) n <- 100 x1 <- runif(n, min=-1, max=1) x2 <- runif(n, min=-1, max=1) y <- x1 - x2 + rnorm(n) bw <- npindexbw(formula=y~x1+x2) summary(bw) predict(bw) You will see that the results of the summary and the predict function are the same.
Peter Dalgaard
2009-May-12 06:47 UTC
[Rd] Predict function npindex and npindexbw (PR#13695)
maxime.to at ensae.fr wrote:> Full_Name: Maxime To > Version: 2.9 > OS: WIndows > Submission from: (NULL) (81.57.236.122) > > > I am using the npindex and npindexbw fubctions of the NP package. I would like > to compute the predicted values of the model and tried to use the predict > function for this purpose but the function only gives me the summary of the > model but no vector of predicted values as with any other model. > > Simply using the code of the example, it gives: > > set.seed(12345) > n <- 100 > x1 <- runif(n, min=-1, max=1) > x2 <- runif(n, min=-1, max=1) > y <- x1 - x2 + rnorm(n) > bw <- npindexbw(formula=y~x1+x2) > > summary(bw) > predict(bw) > > You will see that the results of the summary and the predict function are the > same.You need to take this up with the package maintainer. This is not a bug in R itself and cannot be handled via the bug report system. -- O__ ---- Peter Dalgaard ?ster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
Apparently Analagous Threads
- npindex: fitted values of the function itself?
- npindex: specifying manual bandwiths
- problem on semiparametric single index estimator
- np package, KleinSpady estimator, error when I estimate the bootstrapped standard errors
- np package, estimating the standard errors of Klein and Spady's estimator