regression using NP package

Hi, I am working with the NP package, I am trying to develop prediction values from a multivariate dataset (x) and one dimensional (y) value.

My issue is that I am getting the same values as the initial observations (y data) no matter the new data I add. I know this is not normal and but I haven't found information regarding predict on the package documentation. Is there another way to predict new observations when doing nonparametric regression? Below the code

## create bandwidth
bw5<-npregbw(formula=,y~x1 +x2+x3+x4+x5,regtype="ll",bwmethod="")
## create model
model3<-npreg(bws=bw5, gradients=TRUE)
## create prediction
> p8
 0.1090000 2.2200000 0.5849999 4.0200000 1.7500000 0.2980000 0.2140001 0.4000000

original observation values: 
[1] 0.109 2.22 0.584 4.02 1.750 0.298 0.214 0.400
[9] 0.567

Irreproducible code goes nowhere

#> Error in library(NP): there is no package called 'NP'
bw5<-npregbw(formula=,y~x1 +x2+x3+x4+x5,regtype="ll",bwmethod="")
#> Error in npregbw(formula = , y ~ x1 + x2 + x3 + x4 + x5, regtype = "ll", : could not find function "npregbw"
## create model
model3 <- npreg(bws=bw5, gradients=TRUE)
#> Error in npreg(bws = bw5, gradients = TRUE): could not find function "npreg"
## create prediction
p8 <- predict(model3,newdata=w_garbage)
#> Error in predict(model3, newdata = w_garbage): object 'model3' not found

See the FAQ: How to do a minimal reproducible example reprex for beginners.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.