cpr.m

% -------------------------------------------------------------------------
% Function: [yp,b]=cpr(x,y,h,powers)
% -------------------------------------------------------------------------
% Aim:
% Continuum Power Regression, CPR
% -------------------------------------------------------------------------
% Input:  
% x, matrix (n,p), predictor variables in columns
% y, vector (n,1), predictand
% h, scalar, number of factors
% powers, scalar or vector, for 0 - MLR, 0.5 - PLS, and 1 - PCR
% -------------------------------------------------------------------------
% Output:
% yp, vector (n,1) or matrix (n,no. of powers), predicted response for
% model with h factors
% b, vector (p,1) or matrix, regression coefficients
% -------------------------------------------------------------------------
% Example: [yp,b]=cpr(X,y,4,0.2)
% -------------------------------------------------------------------------
% Reference:
% S. de Jong, R.W. Farebrother, Extending the relationship between ridge 
% regression and continuum regression, Chemometrics and Intelligent 
% Laboratory Systems 25 (1994) 179-181
Valid CSS! Valid HTML 4.01!