I am trying to do 100 model runs in R to get the average error for the multinomial logit model. The training-to-testing ratio of data has to be the same. Any help with the code for the same is appreciated.
Not sure that I understand the reason, but I think the strata option in the function boot (in the package boot) might be what you are after. Do do you mean run the same model with the same seed and the same data 100 times?
I need to run the model 100 times to find it's average prediction accuracy and robustness to data changes. For each run, the dataset will be randomly split into a training subset and a testing subset. The training and testing error will be calculated for each and then averaged.
@Daniel Thank you, I got the idea. I don't actually need to run the model 100 times, all I need is to create subsets by K-fold cross validation where K value will be 100 and I will get the required training and testing errors.
Just one question, as per the statement that I quoted from a paper " run the model 100 times to find it's average prediction accuracy and robustness to data changes. For each run, the dataset will be randomly split into a training subset and a testing subset. The training and testing error will be calculated for each and then averaged."
It's splitting the whole randomly into 70% and 30% subsets. Just changing the individual observations.