Open in the MATLAB editor: g02lc_example
function g02lc_example fprintf('g02lc example results\n\n'); nfact = int64(2); p = [-0.6708, -1.0047, 0.6505, 0.6169; 0.4943, 0.1355, -0.9010, -0.2388; -0.4167, -1.9983, -0.5538, 0.8474; 0.3930, 1.2441, -0.6967, -0.4336; 0.3267, 0.5838, -1.4088, -0.6323; 0.0145, 0.9607, 1.6594, 0.5361; -2.4471, 0.3532, -1.1321, -1.3554; 3.5198, 0.6005, 0.2191, 0.0380; 1.0973, 2.0635, -0.4074, -0.3522; -2.4466, 2.5640, -0.4806, 0.3819; 2.2732, -1.3110, -0.7686, -1.8959; -1.7987, 2.4088, -0.9475, -0.4727; 0.3629, 0.2241, -2.6332, 2.3739; 0.3629, 0.2241, -2.6332, 2.3739; -0.3629, -0.2241, 2.6332, -2.3739]; c = [ 3.5425, 1.0475, 0.2548, 0.1866]; w = [-1.5764e-1 -1.5935e-1 1.7774e-1 5.4029e-2; 8.5680e-2 -1.5240e-4 -1.2179e-1 1.0989e-1; -1.6931e-1 -3.7431e-1 9.4348e-2 3.1878e-1; 1.2153e-1 2.0589e-1 -1.8144e-1 -4.4610e-2; 7.1133e-2 5.5884e-2 -2.6916e-1 5.4912e-2; 6.5188e-2 2.4170e-1 2.3365e-1 -1.8849e-1; -4.2481e-1 -1.8798e-3 -3.2413e-1 -1.1600e-1; 6.5370e-1 1.6725e-1 2.1908e-1 2.5461e-1; 2.8504e-1 3.6549e-1 -1.9244e-1 -1.5430e-1; -2.9341e-1 5.0464e-1 -1.0952e-2 1.3881e-1; 2.9829e-1 -3.6979e-1 -4.9942e-1 -4.9355e-1; -2.0313e-1 4.1952e-1 -2.5684e-1 -7.5647e-2; 5.6905e-2 -2.3197e-2 -3.0503e-1 3.9673e-1; 5.6905e-2 -2.3197e-2 -3.0503e-1 3.9673e-1; -5.6905e-2 2.3197e-2 3.0503e-1 -3.9673e-1]; vipopt = int64(1); ycv = [89.638060; 97.476270; 97.939839; 98.188474]; % Means and scalings orig = int64(1); xbar = [-2.6137; -2.3614; -1.0449; 2.8614; 0.3156; -0.2641; -0.3146; -1.1221; 0.2401; 0.4694; -1.9619; 0.1691; 2.5664; 1.3741; -2.7821]; ybar = [0.452]; iscale = int64(1); xstd = [1.4956; 1.3233; 0.5829; 0.7735; 0.6247; 0.7966; 2.4113; 2.0421; 0.4678; 0.8197; 0.9420; 0.1735; 1.0475; 0.1359; 1.3853]; ystd = [0.9062]; % Calculate predictions rcond = -1; [b, ob, vip, ifail] = ... g02lc( ... nfact, p, c, w, rcond, orig, xbar, ybar, ... iscale, xstd, ystd, vipopt, ycv); % Display results disp('Parameter estimates'); disp(b); disp('Intercept values'); disp(ob); disp('VIP statistics'); disp(vip);
g02lc example results Parameter estimates -0.1383 0.0572 -0.1906 0.1238 0.0591 0.0936 -0.2842 0.4713 0.2661 -0.0914 0.1226 -0.0488 0.0332 0.0332 -0.0332 Intercept values -0.4374 -0.0838 0.0392 -0.2964 0.1451 0.0857 0.1065 -0.1068 0.2091 0.5155 -0.1011 0.1180 -0.2548 0.0287 0.2214 -0.0217 VIP statistics 0.6111 0.3182 0.7513 0.5048 0.2712 0.3593 1.5777 2.4348 1.1322 1.2226 1.1799 0.8840 0.2129 0.2129 0.2129