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..::..Int32On entry: , the number of predictor variables in the fitted model.Constraint: .
- my
- Type: System..::..Int32On entry: , the number of response variables.Constraint: .
- maxfac
- Type: System..::..Int32On entry: , the number of factors available in the PLS model.Constraint: .
- nfact
- Type: System..::..Int32On entry: , the number of factors to include in the calculation of parameter estimates.Constraint: .
- p
- Type: array<System..::..Double,2>[,](,)[,][,]An array of size [dim1, maxfac]Note: dim1 must satisfy the constraint:
- c
- Type: array<System..::..Double,2>[,](,)[,][,]An array of size [dim1, maxfac]Note: dim1 must satisfy the constraint:
- w
- Type: array<System..::..Double,2>[,](,)[,][,]An array of size [dim1, maxfac]Note: dim1 must satisfy the constraint:
- rcond
- Type: System..::..Double
- b
- Type: array<System..::..Double,2>[,](,)[,][,]An array of size [dim1, my]Note: dim1 must satisfy the constraint:On exit: contains the parameter estimate for the th predictor variable in the model for the th response variable, for and .
- orig
- Type: System..::..Int32On entry: indicates how parameter estimates are calculated.
- Parameter estimates for the centered, and possibly, scaled data.
- Parameter estimates for the original data.
Constraint: or .
- xbar
- Type: array<System..::..Double>[]()[][]An array of size [ip]On entry: if , 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 , mean value of each response variable in the model; otherwise ybar is not referenced.
- iscale
- Type: System..::..Int32On entry: if , iscale must take the value supplied to either g02la or g02lb; otherwise iscale is not referenced.Constraint: if , , or .
- xstd
- Type: array<System..::..Double>[]()[][]An array of size [ip]
- ystd
- Type: array<System..::..Double>[]()[][]An array of size [my]
- ob
- Type: array<System..::..Double,2>[,](,)[,][,]An array of size [dim1, my]Note: dim1 must satisfy the constraint:
- if , ;
- otherwise .
On exit: if , contains the intercept value for the th response variable, and contains the parameter estimate on the original scale for the th predictor variable in the model, for and . Otherwise ob is not referenced.
- vipopt
- Type: System..::..Int32On entry: a flag that determines variable influence on projections (VIP) options.
- VIP are not calculated.
- VIP are calculated for predictor variables using the mean explained variance in responses.
- VIP are calculated for predictor variables for each response variable in the model.
Note that setting when gives the same result as setting directly.Constraint: , or .
- ycv
- Type: array<System..::..Double,2>[,](,)[,][,]An array of size [dim1, my]Note: dim1 must satisfy the constraint: if ,On entry: if , is the cumulative percentage of variance of the th response variable explained by the first factors, for and ; otherwise ycv is not referenced.
- vip
- Type: array<System..::..Double,2>[,](,)[,][,]An array of size [dim1, vipopt]Note: dim1 must satisfy the constraint: if ,On exit: if , contains the VIP statistic for the th predictor variable in the model for all response variables, for .If , contains the VIP statistic for the th predictor variable in the model for the th response variable, for and .Otherwise vip is not referenced.
- ifail
- Type: System..::..Int32%On exit: unless the method detects an error or a warning has been flagged (see [Error Indicators and Warnings]).
Description
The parameter estimates for a -factor orthogonal scores PLS model with predictor variables and response variables are given by,
where is the by () matrix of -weights; is the by matrix of -loadings; and is the by matrix of -loadings for a fitted PLS model.
The parameter estimates are for centred, and possibly scaled, predictor data and response data . Parameter estimates may also be given for the predictor data and response data .
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.
On entry, , or , or or , or and , or , or , or .
On entry, or , or or ,
Accuracy
The calculations are based on the singular value decomposition of .
Parallelism and Performance
None.
Further Comments
g02lc allocates internally 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