Hi 형현,
The error with "lratiotest" indicates that the function requires at least three input arguments. These arguments are the loglikelihood maxima for both the unrestricted and restricted models, the degrees of freedom, and an optional argument for nominal significance levels. The error suggests that not all necessary inputs were provided. For more detailed information on the required input arguments and their specifications, you can refer to the below provided MATLAB documentation for "lratiotest":-https://www.mathworks.com/help/econ/lratiotest.html#:~:text=for%20the%20test.-,Input%20Arguments,-collapse%20all
The warnings regarding 'rank deficiency' indicate that the matrix involved in the estimation process is not of full rank. This condition often arises when there are linear dependencies among the rows or columns of the matrix, which can lead to inaccurate results. To address this, you can examine the data for multicollinearity using the "corrcoef" function, which returns the correlation coefficients between variables. For more information, you can utilize the below provided MATLAB documentation for "corrcoef". This can help identify linear dependencies in your data. More observations can also improve the rank of the matrix, so if it is feasible, you can consider expanding your dataset.