To plot adjusted R-squared, sum of squared error, and F-statistic values in one figure in MATLAB, you can use the plot
function.
First, you will need to have the values of the adjusted R-squared, sum of squared error, and F-statistic stored in separate variables. Let's assume you have them stored in the variables adjR2
, sse
, and fstat
respectively.
Here is an example code to plot these values in the same figure:
main.m648 chars31 lines
This code will create a figure with three lines, each representing the values of adjusted R-squared, sum of squared error, and F-statistic respectively. The x-axis represents the model number, while the y-axis represents the value of the corresponding metric.
Feel free to replace the example data with your actual data and customize the plot according to your needs.
Note: It's advisable to have the same number of data points in each variable.
gistlibby LogSnag