Hello folks,
Is there an elegant code for out-of-sample tests (or test statistics)?
For example, lets say I'd like to perform the Clark and West (2007) MSPE-adjusted test. Suppose I have data for 300 periods, of which the first 100 will be in-sample and the last 200 will be out-of-sample. Let y denote the observations on the dependent variable, and yhat_model and yhat_simple denote the fitted values for the larger model and the simple model, respectively. I'd like to do a test (or get a test statistic) without copying and pasting parameters, etc. Could someone please recommend an elegant code?
Thank you very much,
Stan
Is there an elegant code for out-of-sample tests (or test statistics)?
For example, lets say I'd like to perform the Clark and West (2007) MSPE-adjusted test. Suppose I have data for 300 periods, of which the first 100 will be in-sample and the last 200 will be out-of-sample. Let y denote the observations on the dependent variable, and yhat_model and yhat_simple denote the fitted values for the larger model and the simple model, respectively. I'd like to do a test (or get a test statistic) without copying and pasting parameters, etc. Could someone please recommend an elegant code?
Thank you very much,
Stan
Comment