nnet_f1 <-
nnet(Z24train$f1~Z24train$TSU+Z24train$TSL+Z24train$TW+Z24train$TP,size=10,linout=T)
plot(Z24$datahora,Z24$f1,col=1,xlab="time", ylab ="f(Hz)",pch="x")
legend("topright","1stMode",text.col=1,bty="n")
lines(Z24train$datahora[complete.cases(Z24train$datahora)],nnet_f1$fitted.values,col="blue",pch="x")
predict <- predict(nnet_f1, newdata = Z24test)
> predict <- predict(nnet_f1, newdata = Z24test)
Error in predict.nnet(nnet_f1, newdata = Z24test) :
NAs are not allowed in subscripted assignments
In addition: Warning message: 'newdata' had 282 rows but variables found have 3315 rows
I have problem with the function predict. Can you help me? My data are diveded in two groups, train and test. Now i want to find the function predict for the data test. Thank you