But I am receiving an error message stating Error in total.deviance/n.cases : non-numeric argument to binary operator. Can anyone assist me in this regard?
As @max mentioned earlier you should use a reprex. If you can prune your data down to a small set then you can build a data.frame with the data in a reprex along with an example that shows the issues you are running into.
A prose description isn't sufficient, you also need to make a simple reprex that:
Builds the input data you are using.
The function you are trying to write, even if it doesn't work.
Usage of the function you are trying to write, even if it doesn't work.
Builds the output data you want the function to produce.
You can learn more about reprex's here:
Right now the is an issue with the version of reprex that is in CRAN so you should download it directly from github.
Until CRAN catches up with the latest version install reprex with
devtools::install_github("tidyverse/reprex")
The reason we ask for a reprex is that it is the easiest and quickest way for someone to understand the issue you are running into and answer it.
Nearly everyone here who is answering questions is doing it on their own time and really appreciate anything you can do to minimize that time.
For example here is a reprex of the sample data you provided earlier.
I am really grateful that you have taken time out of your busy schedule to attempt on assisting me with this problem. I downloaded the reprex package from https://github.com/tidyverse/reprex but it is failing to install in R studio. I tried to install it manually by going to Tools<Install packages<browse...Yet it still failed again.
How do I install with devtools::install_github(“tidyverse/reprex”)? Or maybe I could send you the data and code vial email?
I downloaded the reprex package from https://github.com/tidyverse/reprex but it is failing to install in R studio. I tried to install it manually by going to Tools<Install packages<browse...Yet it still failed again.
I also used the command install.packages("reprex") it still failed again. How can Install the reprex package so that I can effectively share my data with you?
I get the message: devtools::install_github(“tidyverse/reprex”)
Error: unexpected input in "devtools::install_github(“"
Error in if (file.exists(dest) && file.mtime(dest) > file.mtime(lib) && :
missing value where TRUE/FALSE needed
Don't know if this relates to the issue you are running into but the doc's for gbm.step do not list "multinomial" as a supported family. Here is a reprex showing an error when running gbp.step with family = "multinomial"
It probably could be the reason. Therefore, this means that there could be no family distribution for a response variable of more than 2 categorical values for the gbm.step function. Which is a bit surprising. Nevertheless, I really appreciate your assistance.
The multinomial functionality is relatively recent. The package got a new maintainer in the last few years but seems to be defunct again AFAICT. xgboost and C50 do a much better job for me.
Its not working either. Error message: devtools::install_github("tidyverse/reprex")
Error in loadNamespace(name) : there is no package called ‘devtools’
Error in if (file.exists(dest) && file.mtime(dest) > file.mtime(lib) && :
missing value where TRUE/FALSE needed