Syntax
C# |
---|
public static void g02ld( int ip, int my, int orig, double[] xbar, double[] ybar, int iscale, double[] xstd, double[] ystd, double[,] b, int n, int mz, int[] isz, double[,] z, double[,] yhat, out int ifail ) |
Visual Basic |
---|
Public Shared Sub g02ld ( _ ip As Integer, _ my As Integer, _ orig As Integer, _ xbar As Double(), _ ybar As Double(), _ iscale As Integer, _ xstd As Double(), _ ystd As Double(), _ b As Double(,), _ n As Integer, _ mz As Integer, _ isz As Integer(), _ z As Double(,), _ yhat As Double(,), _ <OutAttribute> ByRef ifail As Integer _ ) |
Visual C++ |
---|
public: static void g02ld( int ip, int my, int orig, array<double>^ xbar, array<double>^ ybar, int iscale, array<double>^ xstd, array<double>^ ystd, array<double,2>^ b, int n, int mz, array<int>^ isz, array<double,2>^ z, array<double,2>^ yhat, [OutAttribute] int% ifail ) |
F# |
---|
static member g02ld : ip : int * my : int * orig : int * xbar : float[] * ybar : float[] * iscale : int * xstd : float[] * ystd : float[] * b : float[,] * n : int * mz : int * isz : int[] * z : float[,] * yhat : float[,] * ifail : int byref -> unit |
Parameters
- ip
- Type: System..::..Int32On entry: the number of predictor variables in the fitted model. ip must take the same value as that supplied to g02la or g02lb to fit the model.Constraint: .
- my
- Type: System..::..Int32On entry: the number of response variables in the fitted model. my must take the same value as that supplied to g02la or g02lb to fit the model.Constraint: .
- orig
- Type: System..::..Int32On entry: indicates how parameter estimates are supplied.
- Parameter estimates are for the original data.
- Parameter estimates are for the centred, and possibly scaled, data.
Constraint: or .
- xbar
- Type: array<System..::..Double>[]()[][]An array of size [ip]
- ybar
- Type: array<System..::..Double>[]()[][]An array of size [my]
- 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]
- b
- Type: array<System..::..Double,2>[,](,)[,][,]An array of size [dim1, my]Note: dim1 must satisfy the constraint:
- if , ;
- if , .
- n
- Type: System..::..Int32On entry: , the number of observations in the test data .Constraint: .
- mz
- Type: System..::..Int32On entry: the number of available predictor variables in the test data.Constraint: .
- isz
- Type: array<System..::..Int32>[]()[][]An array of size [mz]On entry: indicates which predictor variables are to be included in the model. Predictor variables included from z must be in the same order as those included in the fitted model.If , the th predictor variable is included in the model, for , otherwise .Constraints:
- , for ;
- .
- z
- Type: array<System..::..Double,2>[,](,)[,][,]An array of size [dim1, mz]Note: dim1 must satisfy the constraint:On entry: contains the th observation on the th available predictor variable, for and .
- yhat
- Type: array<System..::..Double,2>[,](,)[,][,]An array of size [dim1, my]Note: dim1 must satisfy the constraint:On exit: contains the th predicted value of the th -variable in the model.
- ifail
- Type: System..::..Int32%On exit: unless the method detects an error or a warning has been flagged (see [Error Indicators and Warnings]).
Description
g02ld calculates the predictions of a PLS model given a set of test data and a set of parameter estimates as returned by g02lc.
If g02lc returns parameter estimates for the original data scale, no further information is required.
If g02lc returns parameter estimates for the centred, and possibly scaled, data, further information is required. The means of variables in the fitted model must be supplied. In the case of a PLS model fitted by using scaled data, the means and standard deviations of variables in the fitted model must also be supplied. These means and standard deviations are those returned by either g02la and g02lb.
References
None.
Error Indicators and Warnings
Errors or warnings detected by the method:
Some error messages may refer to parameters that are dropped from this interface
(LDB, LDZ, LDYHAT) 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 an element of or .
On entry, ,
Accuracy
Not applicable.
Parallelism and Performance
None.
Further Comments
g02ld allocates internally elements of real storage.
Example
This example reads in parameter estimates for a fitted PLS model and prediction data, and the PLS model predictions are calculated.
Example program (C#): g02lde.cs