g02lc calculates parameter estimates for a given number of factors given the output from an orthogonal scores PLS regression (g02la or g02lb).

Syntax

C#
public static void g02lc(
	int ip,
	int my,
	int maxfac,
	int nfact,
	double[,] p,
	double[,] c,
	double[,] w,
	double rcond,
	double[,] b,
	int orig,
	double[] xbar,
	double[] ybar,
	int iscale,
	double[] xstd,
	double[] ystd,
	double[,] ob,
	int vipopt,
	double[,] ycv,
	double[,] vip,
	out int ifail
)
Visual Basic
Public Shared Sub g02lc ( _
	ip As Integer, _
	my As Integer, _
	maxfac As Integer, _
	nfact As Integer, _
	p As Double(,), _
	c As Double(,), _
	w As Double(,), _
	rcond As Double, _
	b As Double(,), _
	orig As Integer, _
	xbar As Double(), _
	ybar As Double(), _
	iscale As Integer, _
	xstd As Double(), _
	ystd As Double(), _
	ob As Double(,), _
	vipopt As Integer, _
	ycv As Double(,), _
	vip As Double(,), _
	<OutAttribute> ByRef ifail As Integer _
)
Visual C++
public:
static void g02lc(
	int ip, 
	int my, 
	int maxfac, 
	int nfact, 
	array<double,2>^ p, 
	array<double,2>^ c, 
	array<double,2>^ w, 
	double rcond, 
	array<double,2>^ b, 
	int orig, 
	array<double>^ xbar, 
	array<double>^ ybar, 
	int iscale, 
	array<double>^ xstd, 
	array<double>^ ystd, 
	array<double,2>^ ob, 
	int vipopt, 
	array<double,2>^ ycv, 
	array<double,2>^ vip, 
	[OutAttribute] int% ifail
)
F#
static member g02lc : 
        ip : int * 
        my : int * 
        maxfac : int * 
        nfact : int * 
        p : float[,] * 
        c : float[,] * 
        w : float[,] * 
        rcond : float * 
        b : float[,] * 
        orig : int * 
        xbar : float[] * 
        ybar : float[] * 
        iscale : int * 
        xstd : float[] * 
        ystd : float[] * 
        ob : float[,] * 
        vipopt : int * 
        ycv : float[,] * 
        vip : float[,] * 
        ifail : int byref -> unit 

Parameters

ip
Type: System..::..Int32
On entry: m, the number of predictor variables in the fitted model.
Constraint: ip>1.
my
Type: System..::..Int32
On entry: r, the number of response variables.
Constraint: my1.
maxfac
Type: System..::..Int32
On entry: k, the number of factors available in the PLS model.
Constraint: 1maxfacip.
nfact
Type: System..::..Int32
On entry: l, the number of factors to include in the calculation of parameter estimates.
Constraint: 1nfactmaxfac.
p
Type: array<System..::..Double,2>[,](,)[,][,]
An array of size [dim1, maxfac]
Note: dim1 must satisfy the constraint: dim1ip
On entry: x-loadings as returned from g02la and g02lb.
c
Type: array<System..::..Double,2>[,](,)[,][,]
An array of size [dim1, maxfac]
Note: dim1 must satisfy the constraint: dim1my
On entry: y-loadings as returned from g02la and g02lb.
w
Type: array<System..::..Double,2>[,](,)[,][,]
An array of size [dim1, maxfac]
Note: dim1 must satisfy the constraint: dim1ip
On entry: x-weights as returned from g02la and g02lb.
rcond
Type: System..::..Double
On entry: singular values of PTW less than rcond times the maximum singular value are treated as zero when calculating parameter estimates. If rcond is negative, a value of 0.005 is used.
b
Type: array<System..::..Double,2>[,](,)[,][,]
An array of size [dim1, my]
Note: dim1 must satisfy the constraint: dim1ip
On exit: b[i-1,j-1] contains the parameter estimate for the ith predictor variable in the model for the jth response variable, for i=1,2,,ip and j=1,2,,my.
orig
Type: System..::..Int32
On entry: indicates how parameter estimates are calculated.
orig=-1
Parameter estimates for the centered, and possibly, scaled data.
orig=1
Parameter estimates for the original data.
Constraint: orig=-1 or 1.
xbar
Type: array<System..::..Double>[]()[][]
An array of size [ip]
On entry: if orig=1, mean values of predictor variables in the model; otherwise xbar is not referenced.
ybar
Type: array<System..::..Double>[]()[][]
An array of size [my]
On entry: if orig=1, mean value of each response variable in the model; otherwise ybar is not referenced.
iscale
Type: System..::..Int32
On entry: if orig=1, iscale must take the value supplied to either g02la or g02lb; otherwise iscale is not referenced.
Constraint: if orig=1, iscale=-1, 1 or 2.
xstd
Type: array<System..::..Double>[]()[][]
An array of size [ip]
On entry: if orig=1 and iscale-1, the scalings of predictor variables in the model as returned from either g02la or g02lb; otherwise xstd is not referenced.
ystd
Type: array<System..::..Double>[]()[][]
An array of size [my]
On entry: if orig=1 and iscale-1, the scalings of response variables as returned from either g02la or g02lb; otherwise ystd is not referenced.
ob
Type: array<System..::..Double,2>[,](,)[,][,]
An array of size [dim1, my]
Note: dim1 must satisfy the constraint:
  • if orig=1, dim1ip+1;
  • otherwise dim11.
On exit: if orig=1, ob[0,j-1] contains the intercept value for the jth response variable, and ob[i,j-1] contains the parameter estimate on the original scale for the ith predictor variable in the model, for i=1,2,,ip and j=1,2,,my. Otherwise ob is not referenced.
vipopt
Type: System..::..Int32
On entry: a flag that determines variable influence on projections (VIP) options.
vipopt=0
VIP are not calculated.
vipopt=1
VIP are calculated for predictor variables using the mean explained variance in responses.
vipopt=my
VIP are calculated for predictor variables for each response variable in the model.
Note that setting vipopt=my when my=1 gives the same result as setting vipopt=1 directly.
Constraint: vipopt=0, 1 or my.
ycv
Type: array<System..::..Double,2>[,](,)[,][,]
An array of size [dim1, my]
Note: dim1 must satisfy the constraint: if vipopt0, dim1nfact
On entry: if vipopt0, ycv[i-1,j-1] is the cumulative percentage of variance of the jth response variable explained by the first i factors, for i=1,2,,nfact and j=1,2,,my; otherwise ycv is not referenced.
vip
Type: array<System..::..Double,2>[,](,)[,][,]
An array of size [dim1, vipopt]
Note: dim1 must satisfy the constraint: if vipopt0, dim1ip
On exit: if vipopt=1, vip[i-1,0] contains the VIP statistic for the ith predictor variable in the model for all response variables, for i=1,2,,ip.
If vipopt=my, vip[i-1,j-1] contains the VIP statistic for the ith predictor variable in the model for the jth response variable, for i=1,2,,ip and j=1,2,,my.
Otherwise vip is not referenced.
ifail
Type: System..::..Int32%
On exit: ifail=0 unless the method detects an error or a warning has been flagged (see [Error Indicators and Warnings]).

Description

The parameter estimates B for a l-factor orthogonal scores PLS model with m predictor variables and r response variables are given by,
B=WPTW-1CT,Bm×r,
where W is the m by k (l) matrix of x-weights; P is the m by k matrix of x-loadings; and C is the r by k matrix of y-loadings for a fitted PLS model.
The parameter estimates B are for centred, and possibly scaled, predictor data X1 and response data Y1. Parameter estimates may also be given for the predictor data X and response data Y.
Optionally, g02lc will calculate variable influence on projection (VIP) statistics, see Wold (1994).

References

Wold S (1994) PLS for multivariate linear modelling QSAR: chemometric methods in molecular design Methods and Principles in Medicinal Chemistry (ed van de Waterbeemd H) Verlag-Chemie

Error Indicators and Warnings

Errors or warnings detected by the method:
Some error messages may refer to parameters that are dropped from this interface (LDP, LDC, LDW, LDB, LDOB, LDYCV, LDVIP) In these cases, an error in another parameter has usually caused an incorrect value to be inferred.
ifail=1
On entry,ip<2,
ormy<1,
ororig-1 or 1,
ororig=1 and iscale-1, 1 or 2,
orvipopt0, 1 or my.
ifail=2
On entry,maxfac<1 or maxfac>ip,
ornfact<1 or nfact>maxfac,
ifail=-9000
An error occured, see message report.
ifail=-6000
Invalid Parameters value
ifail=-4000
Invalid dimension for array value
ifail=-8000
Negative dimension for array value
ifail=-6000
Invalid Parameters value

Accuracy

The calculations are based on the singular value decomposition of PTW.

Parallelism and Performance

None.

Further Comments

g02lc allocates internally ll+r+4+max2l,r elements of real storage.

Example

This example reads in details of a PLS model, and a set of parameter estimates are calculated along with their VIP statistics.

Example program (C#): g02lce.cs

Example program data: g02lce.d

Example program results: g02lce.r

See Also