Clear Filters
Clear Filters

Error running bootstrap model on fitlm function

1 view (last 30 days)
I currently have the below code, but I keep receiving an error when trying to run the bootstrap. Could anybody explain why I might be receiving the below error? I have tried with and without the 'linear' argument.
X = [auto_df.displacement, auto_df.horsepower, auto_df.weight];
y = auto_df.mpg;
auto_mdl = fitlm(X,y, 'linear');
boot_auto_mdl = bootstrp(500, @fitlm, X, y, 'linear');
Error using internal.stats.parseArgs (line 42)
Wrong number of arguments.
Error in bootstrp>extractNameValuePairs (line 338)
= internal.stats.parseArgs(defSpecialArgs,defSpecialValues,specialArgs{:});
Error in bootstrp (line 142)
[weights, options, bootargs] = extractNameValuePairs(varargin{:});

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!