Classes | Typedefs | Functions
SQModel.h File Reference
#include "SQDef.h"
#include "SQErrorCodes.h"
#include "SQProject.h"
#include "SQCommon.h"
#include "SQVectorData.h"
#include "SQIntVector.h"
#include "SQPreparePrediction.h"
#include "SQBoolVector.h"
#include "SQModelStatistics.h"

Go to the source code of this file.

Classes

struct  tagSQ_ModelHandle
 

Typedefs

typedef struct tagSQ_ModelHandleSQ_Model
 

Functions

SQ_ErrorCode SQ_GetPreparePrediction (SQ_Model pModel, SQ_PreparePrediction *pPreparePrediction)
 
SQ_ErrorCode SQ_GetModelDatasets (SQ_Model pModel, SQ_IntVector *pDatasetNumbers)
 
SQ_ErrorCode SQ_IsModelFitted (SQ_Model pModel, SQ_Bool *bIsFitted)
 
SQ_ErrorCode SQ_GetModelName (SQ_Model pModel, char *szModelName, int iBufferLength)
 
SQ_ErrorCode SQ_GetModelNumber (SQ_Model pModel, int *iModelNumber)
 
SQ_ErrorCode SQ_GetModelTitle (SQ_Model pModel, char *szModelTitle, int iBufferLength)
 
SQ_ErrorCode SQ_GetModelLastModified (SQ_Model pModel, long *lModifiedTime)
 
SQ_ErrorCode SQ_GetModelTypeString (SQ_Model pModel, char *szModelType, int iBufferLength)
 
SQ_ErrorCode SQ_GetModelType (SQ_Model pModel, SQ_ModelType *eModelType)
 
SQ_ErrorCode SQ_IsModelPCA (SQ_Model pModel, SQ_Bool *bIsPCA)
 
SQ_ErrorCode SQ_IsModelPLS (SQ_Model pModel, SQ_Bool *bIsPLS)
 
SQ_ErrorCode SQ_IsModelClass (SQ_Model pModel, SQ_Bool *bIsClass)
 
SQ_ErrorCode SQ_GetModelClass (SQ_Model pModel, int *piClass)
 
SQ_ErrorCode SQ_IsModelCrossValidated (SQ_Model pModel, SQ_Bool *bIsCV)
 
SQ_ErrorCode SQ_GetCrossValidationRounds (SQ_Model pModel, int *iCVRounds)
 
SQ_ErrorCode SQ_GetNumberOfComponents (SQ_Model pModel, int *piNumComp)
 
SQ_ErrorCode SQ_GetNumberOfPredictiveComponents (SQ_Model pModel, int *piNumComp)
 
SQ_ErrorCode SQ_GetNumberOfXOrthogonalComponents (SQ_Model pModel, int *piNumComp)
 
SQ_ErrorCode SQ_GetNumberOfYOrthogonalComponents (SQ_Model pModel, int *piNumComp)
 
SQ_ErrorCode SQ_GetIterations (SQ_Model pModel, SQ_VectorData *pIterations)
 
SQ_ErrorCode SQ_GetStatistics (SQ_Model pModel, SQ_IntVector *pColumnXIndices, SQ_IntVector *pColumnYIndices, SQ_ModelStatistics *pModelStatistics)
 
SQ_ErrorCode SQ_GetModelOptions (SQ_Model pModel, SQ_ModelOptions *poModelOptions)
 
SQ_ErrorCode SQ_GetCVGroups (SQ_Model pModel, SQ_VectorData *pCVGroups)
 
SQ_ErrorCode SQ_GetEigenValues (SQ_Model pModel, SQ_VectorData *pEigenValues)
 
SQ_ErrorCode SQ_IsImpulseResponseModel (SQ_Model pModel, SQ_Bool *bIsFIR)
 
SQ_ErrorCode SQ_GetImpulseResponse (SQ_Model pModel, int iComponent, int iColumnXIndex, int iIntegrationStartLag, int iIntegrationEndLag, SQ_VectorData *pRespons)
 
SQ_ErrorCode SQ_GetColumnXNameByIndex (SQ_Model pModel, int iColumnXIndex, int iVarID, char *szColumnXName, int iBufferLength)
 
SQ_ErrorCode SQ_GetColumnXIndexByName (SQ_Model pModel, const char *szColumnXName, int iVarID, int *piColumnXIndex)
 
SQ_ErrorCode SQ_GetColumnXSize (SQ_Model pModel, int *piColumnXSize)
 
SQ_ErrorCode SQ_GetColumnYNameByIndex (SQ_Model pModel, int iColumnYIndex, int iVarID, char *szColumnYName, int iBufferLength)
 
SQ_ErrorCode SQ_GetColumnYIndexByName (SQ_Model pModel, const char *szColumnYName, int iVarID, int *piColumnYIndex)
 
SQ_ErrorCode SQ_GetColumnYSize (SQ_Model pModel, int *piColumnYSize)
 
SQ_ErrorCode SQ_GetNumberOfObservations (SQ_Model pModel, int *piNumObs)
 
SQ_ErrorCode SQ_GetObservationClasses (SQ_Model pModel, SQ_IntVector *piClasses)
 
SQ_ErrorCode SQ_GetObservationName (SQ_Model pModel, int iObsIx, int iObsID, char *szObsName, int iBufferLength)
 
SQ_ErrorCode SQ_GetObservationNames (SQ_Model pModel, int iObsID, SQ_StringVector *pObservationNames)
 
SQ_ErrorCode SQ_GetDefaultProbabilityLevel (SQ_Model pModel, float *pfPLevel)
 
SQ_ErrorCode SQ_GetConfidenceLevel (SQ_Model pModel, float *pfConfidenceLevel)
 
SQ_ErrorCode SQ_GetSignificanceLevel (SQ_Model pModel, float *pfSignificanceLevel)
 
SQ_ErrorCode SQ_GetC (SQ_Model pModel, SQ_IntVector *pComponents, SQ_VectorData *pC)
 
SQ_ErrorCode SQ_GetCCorrelation (SQ_Model pModel, SQ_IntVector *pComponents, SQ_VectorData *pCCorr)
 
SQ_ErrorCode SQ_GetCcv (SQ_Model pModel, int iComponent, SQ_VectorData *pCcv)
 
SQ_ErrorCode SQ_GetCcvSE (SQ_Model pModel, int iComponent, SQ_VectorData *pCcvSE)
 
SQ_ErrorCode SQ_GetCcvStdDevDF (SQ_Model pModel, int iComponent, float *pfCcvStdDevDF)
 
SQ_ErrorCode SQ_GetCo (SQ_Model pModel, SQ_IntVector *pComponents, SQ_VectorData *pCo)
 
SQ_ErrorCode SQ_GetCocv (SQ_Model pModel, int iComponent, SQ_VectorData *pCocv)
 
SQ_ErrorCode SQ_GetCocvSE (SQ_Model pModel, int iComponent, SQ_VectorData *pCocvSE)
 
SQ_ErrorCode SQ_GetCVAnovaTable (SQ_Model pModel, SQ_VectorData *poCVAnovaTable)
 
SQ_ErrorCode SQ_GetCorrelationMatrix (SQ_Model pModel, SQ_VectorData *pCorrMatrix)
 
SQ_ErrorCode SQ_GetCoefficients (SQ_Model pModel, int iComponent, SQ_IntVector *pColumnYIndices, SQ_ReconstructState bReconstruct, SQ_VectorData *pCoeff)
 
SQ_ErrorCode SQ_GetCoefficientsCS (SQ_Model pModel, int iComponent, SQ_IntVector *pColumnYIndices, SQ_ReconstructState bReconstruct, SQ_ResolveHierachicalState bResolveHierarchical, SQ_VectorData *pCoeffCS)
 
SQ_ErrorCode SQ_GetCoefficientsCSCI (SQ_Model pModel, int iComponent, SQ_IntVector *pColumnYIndices, SQ_ReconstructState bReconstruct, SQ_VectorData *pCoeffCSCI)
 
SQ_ErrorCode SQ_GetCoefficientsCenterd (SQ_Model pModel, int iComponent, SQ_IntVector *pColumnYIndices, SQ_ReconstructState bReconstruct, SQ_VectorData *pCoeffCenterd)
 
SQ_ErrorCode SQ_GetCoefficientsMLR (SQ_Model pModel, int iComponent, SQ_IntVector *pColumnYIndices, SQ_ReconstructState bReconstruct, SQ_VectorData *pCoeffMLR)
 
SQ_ErrorCode SQ_GetCoefficientsCSLag (SQ_Model pModel, int iComponent, int iColumnXIndex, int iColumnYIndex, SQ_VectorData *pCoeffCSLag)
 
SQ_ErrorCode SQ_GetCoefficientsCScv (SQ_Model pModel, int iComponent, int iColumnYIndex, SQ_ReconstructState bReconstruct, SQ_VectorData *pCoeffCScv)
 
SQ_ErrorCode SQ_GetCoefficientsCScvSE (SQ_Model pModel, int iComponent, int iColumnYIndex, SQ_ReconstructState bReconstruct, SQ_VectorData *pCoeffCScvSE)
 
SQ_ErrorCode SQ_GetCoefficientsCScvSEDF (SQ_Model pModel, int iComponent, float *pfCoeffCScvSEDF)
 
SQ_ErrorCode SQ_GetCoefficientsCScvSELag (SQ_Model pModel, int iComponent, int iColumnXIndex, int iColumnYIndex, SQ_ReconstructState bReconstruct, SQ_VectorData *pCoeffCScvSELag)
 
SQ_ErrorCode SQ_GetCoefficientsRotated (SQ_Model pModel, int iComponent, SQ_IntVector *pColumnYIndices, SQ_ReconstructState bReconstruct, SQ_CoefficientsRotatedType eCoeffRotatedType, SQ_VectorData *pCoeffRotated)
 
SQ_ErrorCode SQ_GetContributionsScoresSingleWeight (SQ_Model pModel, int iObs1Ix, int iObs2Ix, SQ_WeightType eWeightType, int iComponent, int iYVar, SQ_ReconstructState bReconstruct, SQ_VectorData *pContrSSW)
 
SQ_ErrorCode SQ_GetContributionsScoresSingleWeightGroup (SQ_Model pModel, SQ_IntVector *pObs1Ix, SQ_IntVector *pObs2Ix, SQ_WeightType eWeightType, int iComponent, int iYVar, SQ_ReconstructState bReconstruct, SQ_VectorData *pContrSSW)
 
SQ_ErrorCode SQ_GetContributionsScoresMultiWeight (SQ_Model pModel, int iObs1Ix, int iObs2Ix, SQ_IntVector *pWeightType, SQ_IntVector *pComponents, SQ_ReconstructState bReconstruct, SQ_VectorData *pContrSMW)
 
SQ_ErrorCode SQ_GetContributionsScoresMultiWeightGroup (SQ_Model pModel, SQ_IntVector *pObs1Ix, SQ_IntVector *pObs2Ix, SQ_IntVector *pWeightType, SQ_IntVector *pComponents, SQ_ReconstructState bReconstruct, SQ_VectorData *pContrSMW)
 
SQ_ErrorCode SQ_GetContributionsDModX (SQ_Model pModel, int iObsIx, SQ_WeightType eWeightType, int iComponent, int iYVar, SQ_ReconstructState bReconstruct, SQ_VectorData *pContrDModX)
 
SQ_ErrorCode SQ_GetContributionsDModXGroup (SQ_Model pModel, SQ_IntVector *pObsIx, SQ_WeightType eWeightType, int iComponent, int iYVar, SQ_ReconstructState bReconstruct, SQ_VectorData *pContrDModX)
 
SQ_ErrorCode SQ_GetContributionsDModY (SQ_Model pModel, int iObsIx, SQ_WeightType eWeightType, int iComponent, SQ_VectorData *pContrDModY)
 
SQ_ErrorCode SQ_GetContributionsDModYGroup (SQ_Model pModel, SQ_IntVector *pObsIx, SQ_WeightType eWeightType, int iComponent, SQ_VectorData *pContrDModY)
 
SQ_ErrorCode SQ_GetDModX (SQ_Model pModel, SQ_IntVector *pComponents, SQ_NormalizedState bNormalized, SQ_ModelingPowerWeightedState bModelingPowerWeighted, SQ_VectorData *pDModX)
 
SQ_ErrorCode SQ_GetDModXCrit (SQ_Model pModel, int iComponent, SQ_NormalizedState bNormalized, float fLevel, float *pfDModXCrit)
 
SQ_ErrorCode SQ_GetDModY (SQ_Model pModel, SQ_IntVector *pComponents, SQ_NormalizedState bNormalized, SQ_VectorData *pDModY)
 
SQ_ErrorCode SQ_GetMPowX (SQ_Model pModel, SQ_IntVector *pComponents, SQ_VectorData *pMPowX)
 
SQ_ErrorCode SQ_GetOPLSR2Q2Overview (SQ_Model pModel, SQ_VectorData *pModelR2Q2Overview)
 
SQ_ErrorCode SQ_GetOLevX (SQ_Model pModel, SQ_IntVector *pComponents, SQ_VectorData *pOLevX)
 
SQ_ErrorCode SQ_GetOLevY (SQ_Model pModel, SQ_IntVector *pComponents, SQ_VectorData *pOLevY)
 
SQ_ErrorCode SQ_GetORisk (SQ_Model pModel, int iColumnYIndex, SQ_IntVector *pComponents, SQ_VectorData *pORisk)
 
SQ_ErrorCode SQ_GetORiskPooled (SQ_Model pModel, SQ_IntVector *pComponents, SQ_VectorData *pORiskPooled)
 
SQ_ErrorCode SQ_GetP (SQ_Model pModel, SQ_IntVector *pComponents, SQ_ReconstructState bReconstruct, SQ_VectorData *pP)
 
SQ_ErrorCode SQ_GetPc (SQ_Model pModel, SQ_IntVector *pComponents, SQ_ReconstructState bReconstruct, SQ_VectorData *pPc)
 
SQ_ErrorCode SQ_GetPcCorr (SQ_Model pModel, SQ_IntVector *pComponents, SQ_VectorData *pPcCorr)
 
SQ_ErrorCode SQ_GetPCorrelation (SQ_Model pModel, SQ_IntVector *pComponents, SQ_VectorData *pPCorr)
 
SQ_ErrorCode SQ_GetPcv (SQ_Model pModel, int iComponent, SQ_ReconstructState bReconstruct, SQ_VectorData *pPcv)
 
SQ_ErrorCode SQ_GetPcvSE (SQ_Model pModel, int iComponent, SQ_ReconstructState bReconstruct, SQ_VectorData *pPcvSE)
 
SQ_ErrorCode SQ_GetcvSEPercentile (SQ_Model pModel, float fSignificance, float *pfStudentsT)
 
SQ_ErrorCode SQ_GetPcvSEDF (SQ_Model pModel, int iComponent, float *pfPcvSEDF)
 
SQ_ErrorCode SQ_GetPccvSE (SQ_Model pModel, int iCompontent, SQ_ReconstructState bReconstruct, SQ_VectorData *pPccvSE)
 
SQ_ErrorCode SQ_GetPermutationTest (SQ_Model pModel, int iYvariable, int iNumOfPermutations, SQ_FloatMatrix *pPermutationTest)
 
SQ_ErrorCode SQ_GetPLag (SQ_Model pModel, int iComponent, int iColumnXIndex, SQ_VectorData *pPLag)
 
SQ_ErrorCode SQ_GetPModX (SQ_Model pModel, SQ_IntVector *pComponents, SQ_VectorData *pPModX)
 
SQ_ErrorCode SQ_GetPModY (SQ_Model pModel, SQ_IntVector *pComponents, SQ_VectorData *pPModY)
 
SQ_ErrorCode SQ_GetPo (SQ_Model pModel, SQ_IntVector *pComponents, SQ_ReconstructState bReconstruct, SQ_VectorData *pPo)
 
SQ_ErrorCode SQ_GetPocv (SQ_Model pModel, int iComponent, SQ_ReconstructState bReconstruct, SQ_VectorData *pPocv)
 
SQ_ErrorCode SQ_GetPocvSE (SQ_Model pModel, int iComponent, SQ_ReconstructState bReconstruct, SQ_VectorData *pPocvSE)
 
SQ_ErrorCode SQ_GetPoCorrelation (SQ_Model pModel, SQ_IntVector *pComponents, SQ_VectorData *pPoCorr)
 
SQ_ErrorCode SQ_GetPoSo (SQ_Model pModel, SQ_IntVector *pCompontentsList, SQ_ReconstructState bReconstruct, SQ_VectorData *pPoso)
 
SQ_ErrorCode SQ_GetPoSoCorr (SQ_Model pModel, SQ_IntVector *pCompontentsList, SQ_VectorData *pPosoCorr)
 
SQ_ErrorCode SQ_GetPq (SQ_Model pModel, SQ_IntVector *pComponents, SQ_ReconstructState bReconstruct, SQ_VectorData *pPq)
 
SQ_ErrorCode SQ_GetPqCorr (SQ_Model pModel, SQ_IntVector *pComponents, SQ_VectorData *pPqCorr)
 
SQ_ErrorCode SQ_GetPqcvSE (SQ_Model pModel, int iComponent, SQ_ReconstructState bReconstruct, SQ_VectorData *pPqcvSE)
 
SQ_ErrorCode SQ_GetQ (SQ_Model pModel, SQ_IntVector *pComponents, SQ_VectorData *pQ)
 
SQ_ErrorCode SQ_GetQCorrelation (SQ_Model pModel, SQ_IntVector *pComponents, SQ_VectorData *pQCorr)
 
SQ_ErrorCode SQ_GetQcv (SQ_Model pModel, int iComponent, SQ_VectorData *pQcv)
 
SQ_ErrorCode SQ_GetQcvSE (SQ_Model pModel, int iComponent, SQ_VectorData *pQcvSE)
 
SQ_ErrorCode SQ_GetQo (SQ_Model pModel, SQ_IntVector *pComponents, SQ_VectorData *pQo)
 
SQ_ErrorCode SQ_GetQocv (SQ_Model pModel, int iComponent, SQ_VectorData *pQocv)
 
SQ_ErrorCode SQ_GetQocvSE (SQ_Model pModel, int iComponent, SQ_VectorData *pQocvSE)
 
SQ_ErrorCode SQ_GetQ2 (SQ_Model pModel, SQ_VectorData *pQ2)
 
SQ_ErrorCode SQ_GetQ2Cum (SQ_Model pModel, SQ_VectorData *pQ2Cum)
 
SQ_ErrorCode SQ_GetQ2VX (SQ_Model pModel, SQ_IntVector *pComponents, SQ_VectorData *pQ2VX)
 
SQ_ErrorCode SQ_GetQ2VXCum (SQ_Model pModel, SQ_IntVector *pComponents, SQ_VectorData *pQ2VXCum)
 
SQ_ErrorCode SQ_GetQ2VY (SQ_Model pModel, SQ_IntVector *pComponents, SQ_VectorData *pQ2VY)
 
SQ_ErrorCode SQ_GetQ2VYCum (SQ_Model pModel, SQ_IntVector *pComponents, SQ_VectorData *pQ2VYCum)
 
SQ_ErrorCode SQ_GetQ2CumProgression (SQ_Model pModel, SQ_VectorData *pQ2CumProgression)
 
SQ_ErrorCode SQ_GetR (SQ_Model pModel, SQ_IntVector *pComponents, SQ_VectorData *pR)
 
SQ_ErrorCode SQ_GetR2VX (SQ_Model pModel, SQ_IntVector *pComponents, SQ_VectorData *pR2VX)
 
SQ_ErrorCode SQ_GetR2VXAdj (SQ_Model pModel, SQ_IntVector *pComponents, SQ_VectorData *pR2VXAdj)
 
SQ_ErrorCode SQ_GetR2VXAdjCum (SQ_Model pModel, SQ_IntVector *pComponents, SQ_VectorData *pR2VXAdjCum)
 
SQ_ErrorCode SQ_GetR2VXCum (SQ_Model pModel, SQ_IntVector *pComponents, SQ_VectorData *pR2VXCum)
 
SQ_ErrorCode SQ_GetR2VY (SQ_Model pModel, SQ_IntVector *pComponents, SQ_VectorData *pR2VY)
 
SQ_ErrorCode SQ_GetR2VYAdj (SQ_Model pModel, SQ_IntVector *pComponents, SQ_VectorData *pR2VYAdj)
 
SQ_ErrorCode SQ_GetR2VYAdjCum (SQ_Model pModel, SQ_IntVector *pComponents, SQ_VectorData *pR2VYAdjCum)
 
SQ_ErrorCode SQ_GetR2VYCum (SQ_Model pModel, SQ_IntVector *pComponents, SQ_VectorData *pR2VYCum)
 
SQ_ErrorCode SQ_GetR2X (SQ_Model pModel, SQ_VectorData *pR2X)
 
SQ_ErrorCode SQ_GetR2XAdj (SQ_Model pModel, SQ_VectorData *pR2XAdj)
 
SQ_ErrorCode SQ_GetR2XAdjCum (SQ_Model pModel, SQ_VectorData *pR2XAdjCum)
 
SQ_ErrorCode SQ_GetR2XCum (SQ_Model pModel, SQ_VectorData *pR2XCum)
 
SQ_ErrorCode SQ_GetR2Y (SQ_Model pModel, SQ_VectorData *pR2Y)
 
SQ_ErrorCode SQ_GetR2YCum (SQ_Model pModel, SQ_VectorData *pR2YCum)
 
SQ_ErrorCode SQ_GetR2YAdj (SQ_Model pModel, SQ_VectorData *pR2YAdj)
 
SQ_ErrorCode SQ_GetR2YAdjCum (SQ_Model pModel, SQ_VectorData *pR2YAdjCum)
 
SQ_ErrorCode SQ_GetR2CumProgression (SQ_Model pModel, SQ_VectorData *pR2CumProgression)
 
SQ_ErrorCode SQ_GetRMSEE (SQ_Model pModel, SQ_IntVector *pComponents, SQ_VectorData *pRMSEE)
 
SQ_ErrorCode SQ_GetRMSEcv (SQ_Model pModel, SQ_IntVector *pComponents, SQ_VectorData *pRMSEcv)
 
SQ_ErrorCode SQ_GetRMSEcvProgression (SQ_Model pModel, SQ_IntVector *pColumnYIndices, SQ_VectorData *pRMSEcvProgression)
 
SQ_ErrorCode SQ_GetMBEE (SQ_Model pModel, SQ_IntVector *pComponents, SQ_VectorData *pMBEE)
 
SQ_ErrorCode SQ_GetMBEcv (SQ_Model pModel, SQ_IntVector *pComponents, SQ_VectorData *pMBEcv)
 
SQ_ErrorCode SQ_GetS (SQ_Model pModel, SQ_IntVector *pComponents, SQ_VectorData *pS)
 
SQ_ErrorCode SQ_GetS2X (SQ_Model pModel, SQ_VectorData *pS2X)
 
SQ_ErrorCode SQ_GetS2Y (SQ_Model pModel, SQ_VectorData *pS2Y)
 
SQ_ErrorCode SQ_GetS2VX (SQ_Model pModel, SQ_IntVector *pComponents, SQ_VectorData *pS2VX)
 
SQ_ErrorCode SQ_GetS2VY (SQ_Model pModel, SQ_IntVector *pComponents, SQ_VectorData *pS2VY)
 
SQ_ErrorCode SQ_GetSDT (SQ_Model pModel, SQ_VectorData *pSDT)
 
SQ_ErrorCode SQ_GetSDU (SQ_Model pModel, SQ_VectorData *pSDU)
 
SQ_ErrorCode SQ_GetSSX (SQ_Model pModel, SQ_VectorData *pSSX)
 
SQ_ErrorCode SQ_GetSSY (SQ_Model pModel, SQ_VectorData *pSSY)
 
SQ_ErrorCode SQ_GetSerrL (SQ_Model pModel, int iComponent, SQ_IntVector *pColumnYIndices, SQ_VectorData *pSerrL)
 
SQ_ErrorCode SQ_GetSerrU (SQ_Model pModel, int iComponent, SQ_IntVector *pColumnYIndices, SQ_VectorData *pSerrU)
 
SQ_ErrorCode SQ_GetT (SQ_Model pModel, SQ_IntVector *pComponents, SQ_VectorData *pT)
 
SQ_ErrorCode SQ_GetTCorrelation (SQ_Model pModel, SQ_IntVector *pComponents, SQ_BoolVector *pComponentIsPredictiveVector, SQ_VectorData *pTCorr)
 
SQ_ErrorCode SQ_GetTcv (SQ_Model pModel, int iComponent, SQ_VectorData *pTcv)
 
SQ_ErrorCode SQ_GetTcvSE (SQ_Model pModel, int iComponent, SQ_VectorData *pTcvSE)
 
SQ_ErrorCode SQ_GetTcvSEDF (SQ_Model pModel, int iComponent, float *pfTcvSEDF)
 
SQ_ErrorCode SQ_GetTCrit (SQ_Model pModel, int iComponent, float fLevel, float *pfTCrit)
 
SQ_ErrorCode SQ_GetToCrit (SQ_Model pModel, int iComponent, float fLevel, float *pfTCrit)
 
SQ_ErrorCode SQ_GetTMean (SQ_Model pModel, int iComponent, float *pfTMean)
 
SQ_ErrorCode SQ_GetTStandardDeviation (SQ_Model pModel, int iComponent, float *pfDF, float *pfTStdev)
 
SQ_ErrorCode SQ_GetT2Crit (SQ_Model pModel, int iComponent, float fLevel, float *pfT2Crit)
 
SQ_ErrorCode SQ_GetT2Range (SQ_Model pModel, int iCompFrom, int iCompTo, SQ_VectorData *pT2Range)
 
SQ_ErrorCode SQ_GetT2RangeCrit (SQ_Model pModel, int iComponentFrom, int iComponentTo, float fLevel, float *pfT2RangeCrit)
 
SQ_ErrorCode SQ_GetTo (SQ_Model pModel, SQ_IntVector *pComponents, SQ_VectorData *pTo)
 
SQ_ErrorCode SQ_GetTocv (SQ_Model pModel, SQ_IntVector *pComponents, SQ_VectorData *pTocv)
 
SQ_ErrorCode SQ_GetTocvSE (SQ_Model pModel, int iComponent, SQ_VectorData *pTocvSE)
 
SQ_ErrorCode SQ_GetToCorr (SQ_Model pModel, SQ_IntVector *pComponents, SQ_BoolVector *pComponentIsPredictiveVector, SQ_VectorData *pToCorr)
 
SQ_ErrorCode SQ_GetU (SQ_Model pModel, SQ_IntVector *pComponents, SQ_VectorData *pU)
 
SQ_ErrorCode SQ_GetUo (SQ_Model pModel, SQ_IntVector *pComponents, SQ_VectorData *pUo)
 
SQ_ErrorCode SQ_GetUocv (SQ_Model pModel, SQ_IntVector *pYCompontentsList, SQ_VectorData *pUocv)
 
SQ_ErrorCode SQ_GetUcv (SQ_Model pModel, SQ_IntVector *pCompontentsList, SQ_VectorData *pUcv)
 
SQ_ErrorCode SQ_GetVIP (SQ_Model pModel, SQ_IntVector *pComponents, SQ_ReconstructState bReconstruct, SQ_VectorData *pVIP)
 
SQ_ErrorCode SQ_GetVIPCI (SQ_Model pModel, int iComponent, SQ_ReconstructState bReconstruct, SQ_VectorData *pVIPCI)
 
SQ_ErrorCode SQ_GetVIPcv (SQ_Model pModel, int iComponent, SQ_ReconstructState bReconstruct, SQ_VectorData *pVIPcv)
 
SQ_ErrorCode SQ_GetVIPcvSE (SQ_Model pModel, int iComponent, SQ_ReconstructState bReconstruct, SQ_VectorData *pVIPcvSE)
 
SQ_ErrorCode SQ_GetVIPLag (SQ_Model pModel, int iComponent, int iColumnXIndex, SQ_VectorData *pVIPLag)
 
SQ_ErrorCode SQ_GetVIPPredictive (SQ_Model pModel, SQ_ReconstructState bReconstruct, SQ_VectorData *pVIP)
 
SQ_ErrorCode SQ_GetVIPOrthogonal (SQ_Model pModel, SQ_ReconstructState bReconstruct, SQ_VectorData *pVIP)
 
SQ_ErrorCode SQ_GetVIPPredictiveLag (SQ_Model pModel, int iColumnXIndex, SQ_VectorData *pVIPLag)
 
SQ_ErrorCode SQ_GetVIPOrthogonalLag (SQ_Model pModel, int iColumnXIndex, SQ_VectorData *pVIPLag)
 
SQ_ErrorCode SQ_GetW (SQ_Model pModel, SQ_IntVector *pComponents, SQ_ReconstructState bReconstruct, SQ_VectorData *pW)
 
SQ_ErrorCode SQ_GetWcv (SQ_Model pModel, int iComponent, SQ_ReconstructState bReconstruct, SQ_VectorData *pWcv)
 
SQ_ErrorCode SQ_GetWcvSE (SQ_Model pModel, int iComponent, SQ_ReconstructState bReconstruct, SQ_VectorData *pWcvSE)
 
SQ_ErrorCode SQ_GetWcvSEDF (SQ_Model pModel, int iComponent, float *pfWcvSEDF)
 
SQ_ErrorCode SQ_GetWLag (SQ_Model pModel, int iComponent, int iColumnXIndex, SQ_VectorData *pWLag)
 
SQ_ErrorCode SQ_GetWStar (SQ_Model pModel, SQ_IntVector *pComponents, SQ_ReconstructState bReconstruct, SQ_VectorData *pWStar)
 
SQ_ErrorCode SQ_GetWStarC (SQ_Model pModel, SQ_IntVector *pComponents, SQ_ReconstructState bReconstruct, SQ_VectorData *pWStarC)
 
SQ_ErrorCode SQ_GetWStarCcvSE (SQ_Model pModel, int iComponent, SQ_ReconstructState bReconstruct, SQ_VectorData *pWStarCcvSE)
 
SQ_ErrorCode SQ_GetWStarcv (SQ_Model pModel, int iComponent, SQ_ReconstructState bReconstruct, SQ_VectorData *pWStarcv)
 
SQ_ErrorCode SQ_GetWStarcvSE (SQ_Model pModel, int iComponent, SQ_ReconstructState bReconstruct, SQ_VectorData *pWStarcvSE)
 
SQ_ErrorCode SQ_GetWStarcvSEDF (SQ_Model pModel, int iComponent, float *pfWStarcvSEDF)
 
SQ_ErrorCode SQ_GetWStarLag (SQ_Model pModel, int iComponent, int iColumnXIndex, SQ_VectorData *pWStarLag)
 
SQ_ErrorCode SQ_GetWo (SQ_Model pModel, SQ_IntVector *pComponents, SQ_ReconstructState bReconstruct, SQ_VectorData *pWo)
 
SQ_ErrorCode SQ_GetWocv (SQ_Model pModel, int iComponent, SQ_ReconstructState bReconstruct, SQ_VectorData *pWocv)
 
SQ_ErrorCode SQ_GetWocvSE (SQ_Model pModel, int iComponent, SQ_ReconstructState bReconstruct, SQ_VectorData *pWocvSE)
 
SQ_ErrorCode SQ_GetXObs (SQ_Model pModel, SQ_UnscaledState bUnscaled, SQ_BacktransformedState bBackTransformed, SQ_IntVector *pObservations, SQ_ReconstructState bReconstruct, SQ_VectorData *pXObs)
 
SQ_ErrorCode SQ_GetXObsPred (SQ_Model pModel, int iComponent, SQ_UnscaledState bUnscaled, SQ_BacktransformedState bBackTransformed, SQ_IntVector *pObservations, SQ_ReconstructState bReconstruct, SQ_VectorData *pXObsPred)
 
SQ_ErrorCode SQ_GetXObsRes (SQ_Model pModel, int iComponent, SQ_UnscaledState bUnscaled, SQ_BacktransformedState bBackTransformed, SQ_IntVector *pObservations, SQ_ReconstructState bReconstruct, SQ_VectorData *pXObsRes)
 
SQ_ErrorCode SQ_GetXOffsets (SQ_Model pModel, SQ_ReconstructState bReconstruct, SQ_VectorData *pXOffsets)
 
SQ_ErrorCode SQ_GetXVar (SQ_Model pModel, SQ_UnscaledState bUnscaled, SQ_BacktransformedState bBackTransformed, SQ_IntVector *pColumnXIndices, SQ_VectorData *pXVar)
 
SQ_ErrorCode SQ_GetXVarRes (SQ_Model pModel, int iComponent, SQ_IntVector *pColumnXIndices, SQ_UnscaledState bUnscaled, SQ_BacktransformedState bBackTransformed, SQ_StandardizedState bStandardized, SQ_VectorData *pXVarRes)
 
SQ_ErrorCode SQ_GetXVarPred (SQ_Model pModel, int iComponent, SQ_IntVector *pColumnXIndices, SQ_UnscaledState bUnscaled, SQ_BacktransformedState bBackTransformed, SQ_VectorData *pXVarPred)
 
SQ_ErrorCode SQ_GetXVarResYRelated (SQ_Model pModel, SQ_UnscaledState bUnscaled, SQ_BacktransformedState bBackTransformed, SQ_StandardizedState bStandardized, SQ_IntVector *pColumnXIndices, SQ_VectorData *pXVarResYRelated)
 
SQ_ErrorCode SQ_GetXVarResO2PLS (SQ_Model pModel, int iPredComponent, int iXSideOrthoComponent, int iYSideOrthoComponent, SQ_UnscaledState bUnscaled, SQ_BacktransformedState bBackTransformed, SQ_StandardizedState bStandardized, SQ_IntVector *pColumnXIndices, SQ_VectorData *pXVarResO2PLS)
 
SQ_ErrorCode SQ_GetXWeights (SQ_Model pModel, SQ_ReconstructState bReconstruct, SQ_VectorData *pXWeights)
 
SQ_ErrorCode SQ_GetYObs (SQ_Model pModel, SQ_UnscaledState bUnscaled, SQ_BacktransformedState bBackTransformed, SQ_IntVector *pObservations, SQ_VectorData *pYObs)
 
SQ_ErrorCode SQ_GetYObsRes (SQ_Model pModel, int iComponent, SQ_UnscaledState bUnscaled, SQ_BacktransformedState bBackTransformed, SQ_IntVector *pObservations, SQ_VectorData *pYObsRes)
 
SQ_ErrorCode SQ_GetYOffsets (SQ_Model pModel, SQ_VectorData *pYOffsets)
 
SQ_ErrorCode SQ_GetYPred (SQ_Model pModel, int iComponent, SQ_UnscaledState bUnscaled, SQ_BacktransformedState bBackTransformed, SQ_IntVector *pColumnYIndices, SQ_VectorData *pYPred)
 
SQ_ErrorCode SQ_GetYPredCV (SQ_Model pModel, int iComponent, SQ_IntVector *pColumnYIndices, SQ_VectorData *pYPredCV)
 
SQ_ErrorCode SQ_GetYPredCVErr (SQ_Model pModel, int iComponent, SQ_IntVector *pColumnYIndices, SQ_VectorData *pYPredCVErr)
 
SQ_ErrorCode SQ_GetYPredCVErrSE (SQ_Model pModel, SQ_IntVector *pColumnYIndices, SQ_VectorData *pYPredCVErrSE)
 
SQ_ErrorCode SQ_GetYVar (SQ_Model pModel, SQ_IntVector *pColumnYIndices, SQ_UnscaledState bUnscaled, SQ_BacktransformedState bBackTransformed, SQ_VectorData *pYVar)
 
SQ_ErrorCode SQ_GetYVarRes (SQ_Model pModel, int iComponent, SQ_IntVector *pColumnYIndices, SQ_UnscaledState bUnscaled, SQ_BacktransformedState bBackTransformed, SQ_StandardizedState bStandardized, SQ_VectorData *pYVarRes)
 
SQ_ErrorCode SQ_GetYWeights (SQ_Model pModel, SQ_VectorData *pYWeights)
 
SQ_ErrorCode SQ_GetYRelatedProfile (SQ_Model pModel, SQ_IntVector *pColumnYIndices, SQ_VectorData *pYRelated)
 
SQ_ErrorCode SQ_GetModelAlarmLimits (SQ_Model pModel, char *szJsonLimits, int iBufferLength)
 

Typedef Documentation

◆ SQ_Model

typedef struct tagSQ_ModelHandle * SQ_Model

The object used to identify an opened model. IMPORTANT: Always initialize it to NULL!

Function Documentation

◆ SQ_GetC()

SQ_ErrorCode SQ_GetC ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_VectorData pC 
)

Retrieves the C matrix from a model. In every dimension, the c's are the weights used to combine the Y's (linearly) to form the scores u. The c's express the correlation between the Y's and the t's (X scores). The function fails if the model is not a PLS model or if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component Indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used.
[out]pCA pointer to the C matrix. Number of rows in matrix = number of components chosen (length of piComponents). Number of columns in matrix = number of Y-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetCCorrelation()

SQ_ErrorCode SQ_GetCCorrelation ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_VectorData pCCorr 
)

Retrieves the Y-loadings(C) correlation scaled matrix from a model. The function fails if the model is not a PLS model or if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component Indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used.
[out]pCCorrA pointer to the CCorr matrix. Number of rows in matrix = number of components chosen (length of piComponents). Number of columns in matrix = number of Y-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetCcv()

SQ_ErrorCode SQ_GetCcv ( SQ_Model  pModel,
int  iComponent,
SQ_VectorData pCcv 
)

The c weights for a selected model dimension, computed from all cross validation rounds in the model The function fails if the model is not a PLS model or if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]iComponentThe component to use 1 for component 1 in the model, 2 for component 2 and so on.
[out]pCcvA pointer to the Ccv matrix. Number of rows in matrix = number of cross-validation rounds in the model. Number of columns in matrix = number of Y-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetCcvSE()

SQ_ErrorCode SQ_GetCcvSE ( SQ_Model  pModel,
int  iComponent,
SQ_VectorData pCcvSE 
)

The jack-knife standard error of the weights c computed from the cross validations. The function fails if the model is not a PLS model or if the model doesn't have any components. to get the confidence interval, see GetcvSEPercentile(...

Parameters
[in]pModelThe model handle to use
[in]iComponentThe component to use 1 for component 1 in the model, 2 for component 2 and so on.
[out]pCcvSEA pointer to the CcvSE matrix. Number of rows in matrix = 1 Number of columns in matrix = number of Y-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetCcvStdDevDF()

SQ_ErrorCode SQ_GetCcvStdDevDF ( SQ_Model  pModel,
int  iComponent,
float *  pfCcvStdDevDF 
)

The degrees of freedom for CcvSE. The function fails if the model is not a PLS model or if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]iComponentThe component to use 1 for component 1 in the model, 2 for component 2 and so on.
[out]pfCcvStdDevDFA pointer to the CcvStdDevDF result.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetCo()

SQ_ErrorCode SQ_GetCo ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_VectorData pCo 
)

Retrieves the Co matrix from a model. Weights that combine the Y variables (first dimension) or the Y residuals (subsequent dimensions) to form the scores Uo. These weights are selected so as to minimize the correlation between Uo and T, thereby indirectly between Uo and X. The function fails if the model is not an OPLS/O2PLS model.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of Y side orthogonal component indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components should be used.
[out]pCoA pointer to the Co matrix. Number of rows in matrix = number of components chosen (length of piComponents). Number of columns in matrix = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetCocv()

SQ_ErrorCode SQ_GetCocv ( SQ_Model  pModel,
int  iComponent,
SQ_VectorData pCocv 
)

Retrieves the Cocv matrix from a model. Orthogonal weights co from the Y-part of the model, for a selected model dimension, computed from the selected cross validation round. The function fails if the model is not an OPLS/O2PLS model.

Parameters
[in]pModelThe model handle to use
[in]iComponentThe component to use. 1 for component 1 in the model, 2 for component 2 and so on.
[out]pCocvA pointer to the Cocv matrix. Number of rows in matrix = number of components chosen (length of piComponents). Number of columns in matrix = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetCocvSE()

SQ_ErrorCode SQ_GetCocvSE ( SQ_Model  pModel,
int  iComponent,
SQ_VectorData pCocvSE 
)

Retrieves the CocvSE matrix from a model. Standard error of the cross validated loadings co. The function fails if the model is not an OPLS/O2PLS model. to get the confidence interval, see GetcvSEPercentile(...

Parameters
[in]pModelThe model handle to use
[in]iComponentThe component to use. 1 for component 1 in the model, 2 for component 2 and so on.
[out]pCocvSEA pointer to the CocvSE matrix. Number of rows in matrix = number of components chosen (length of piComponents). Number of columns in matrix = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetCoefficients()

SQ_ErrorCode SQ_GetCoefficients ( SQ_Model  pModel,
int  iComponent,
SQ_IntVector pColumnYIndices,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pCoeff 
)

Retrieves the Coefficients from a model. PLS Regression coefficients corresponding to the unscaled and uncentered X and Y. The function fails if the model is not a PLS model or if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]iComponentThe component to use For an OPLS model, the last predictive component is the only valid one.
[in]pColumnYIndicesA list of Y column Indices to use. NULL if all y columns in the model should be used
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is true the returned matrix will be back transformed to the original domain.
[out]pCoeffA pointer to the pCoeff matrix. Number of rows in matrix = number of Y-variables chosen (length of pnColumnYIndices). Number of columns in matrix = number of X-variables + 1 (Constant).
Returns
Returns SQ_E_OK if success or an error code
See also
SQ_GetColumnYIndexByName

◆ SQ_GetCoefficientsCenterd()

SQ_ErrorCode SQ_GetCoefficientsCenterd ( SQ_Model  pModel,
int  iComponent,
SQ_IntVector pColumnYIndices,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pCoeffCenterd 
)

PLS Regression coefficients corresponding to the unscaled but centered X and unscaled Y. The function fails if the model is not a PLS model or if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]iComponentThe component to use For an OPLS model, the last predictive component is the only valid one.
[in]pColumnYIndicesA list of Y column Indices to use. NULL if all y columns in the model should be used
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is true the returned matrix will be back transformed to the original domain.
[out]pCoeffCenterdA pointer to the pCoeffCenterd matrix. Number of rows in matrix = number of Y-variables chosen (length of pnColumnYIndices). Number of columns in matrix = number of X-variables + 1 (Constant).
Returns
Returns SQ_E_OK if success or an error code
See also
SQ_GetColumnYIndexByName

◆ SQ_GetCoefficientsCS()

SQ_ErrorCode SQ_GetCoefficientsCS ( SQ_Model  pModel,
int  iComponent,
SQ_IntVector pColumnYIndices,
SQ_ReconstructState  bReconstruct,
SQ_ResolveHierachicalState  bResolveHierarchical,
SQ_VectorData pCoeffCS 
)

Retrieves the centered scaled coefficients from a model. PLS Regression coefficients corresponding to the centered and scaled X and the scaled (but uncentered) Y. The function fails if the model is not a PLS model or if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]iComponentThe component to use For an OPLS model, the last predictive component is the only valid one.
[in]pColumnYIndicesA list of Y column Indices to use. NULL if all y columns in the model should be used
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is true the returned matrix will be back transformed to the original domain.
[in]bResolveHierarchicalIf the hierarchical coefficiants should be resolved or not
[out]pCoeffCSA pointer to the pCoeffCS matrix. Number of rows in matrix = number of Y-variables chosen (length of pnColumnYIndices). Number of columns in matrix = number of X-variables + 1 (Constant).
Returns
Returns SQ_E_OK if success or an error code
See also
SQ_GetColumnYIndexByName

◆ SQ_GetCoefficientsCSCI()

SQ_ErrorCode SQ_GetCoefficientsCSCI ( SQ_Model  pModel,
int  iComponent,
SQ_IntVector pColumnYIndices,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pCoeffCSCI 
)

Confidence Interval for CoefficientsCS. The function fails if the model is not a PLS model and if the model is not cross-validated or if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]iComponentThe component to use For an OPLS model, the last predictive component is the only valid one.
[in]pColumnYIndicesA list of Y column Indices to use. NULL if all y columns in the model should be used
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is true the returned matrix will be back transformed to the original domain.
[out]pCoeffCSCIA pointer to the pCoeffCSCI matrix. Number of rows in matrix = number of Y-variables chosen (length of pnColumnYIndices). Number of columns in matrix = number of X-variables + 1 (Constant).
Returns
Returns SQ_E_OK if success or an error code
See also
SQ_GetColumnYIndexByName

◆ SQ_GetCoefficientsCScv()

SQ_ErrorCode SQ_GetCoefficientsCScv ( SQ_Model  pModel,
int  iComponent,
int  iColumnYIndex,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pCoeffCScv 
)

PLS Regression coefficients corresponding to the scaled and centered X and the scaled (but uncentered) Y computed from all the cross validation rounds in the model. The function fails if the model is not a PLS model or if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]iComponentThe component to use For an OPLS model, the last predictive component is the only valid one.
[in]iColumnYIndexThe index of the Y column to use.
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is true the returned matrix will be back transformed to the original domain.
[out]pCoeffCScvA pointer to the pCoeffCScv matrix. Number of rows in matrix = number of cross-validation rounds in the model. Number of columns in matrix = number of X-variables + 1 (Constant).
Returns
Returns SQ_E_OK if success or an error code
See also
SQ_GetColumnYIndexByName

◆ SQ_GetCoefficientsCScvSE()

SQ_ErrorCode SQ_GetCoefficientsCScvSE ( SQ_Model  pModel,
int  iComponent,
int  iColumnYIndex,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pCoeffCScvSE 
)

The jack-knife standard error of the coefficients CoeffCS computed from the cross validations. The function fails if the model is not a PLS model or if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]iComponentThe component to use For an OPLS model, the last predictive component is the only valid one.
[in]iColumnYIndexThe index of the Y column to use.
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is true the returned matrix will be back transformed to the original domain.
[out]pCoeffCScvSEA pointer to the pCoeffCScvSE matrix. Number of rows in matrix = 1 (only one Y-variable). Number of columns in matrix = number of X-variables + 1 (Constant).
Returns
Returns SQ_E_OK if success or an error code
See also
SQ_GetColumnYIndexByName

◆ SQ_GetCoefficientsCScvSEDF()

SQ_ErrorCode SQ_GetCoefficientsCScvSEDF ( SQ_Model  pModel,
int  iComponent,
float *  pfCoeffCScvSEDF 
)

The degrees of freedom for CoeffCScvSE The function fails if the model is not a PLS model or if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]iComponentThe component to use For an OPLS model, the last predictive component is the only valid one.
[out]pfCoeffCScvSEDFA floating point value.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetCoefficientsCScvSELag()

SQ_ErrorCode SQ_GetCoefficientsCScvSELag ( SQ_Model  pModel,
int  iComponent,
int  iColumnXIndex,
int  iColumnYIndex,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pCoeffCScvSELag 
)

The jack-knife standard error of the coefficients CoeffCS computed from the cross validations, of a lagged variable x, for a selected Y as a function of lags. The function fails if the model is not a PLS model or if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]iComponentThe component to use For an OPLS model, the last predictive component is the only valid one.
[in]iColumnXIndexThe index of the X column to use.
[in]iColumnYIndexThe index of the Y column to use.
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is true the returned matrix will be back transformed to the original domain.
[out]pCoeffCScvSELagA pointer to the pCoeffCScvSELag matrix. Number of rows in matrix = 1 (only one Y-variable). Number of columns in matrix = number of lagged variables in the model.
Returns
Returns SQ_E_OK if success or an error code
See also
SQ_GetColumnXIndexByName
SQ_GetColumnYIndexByName

◆ SQ_GetCoefficientsCSLag()

SQ_ErrorCode SQ_GetCoefficientsCSLag ( SQ_Model  pModel,
int  iComponent,
int  iColumnXIndex,
int  iColumnYIndex,
SQ_VectorData pCoeffCSLag 
)

Retrieves the lagged centered scaled coefficients from a model. Coefficients (for Scaled and centered data), of a lagged X variable, for a selected Y, as a functions of Lags. The function fails if the model is not a PLS model or if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]iComponentThe component to use For an OPLS model, the last predictive component is the only valid one.
[in]iColumnXIndexThe index of the X column to use.
[in]iColumnYIndexThe index of the Y column to use.
[out]pCoeffCSLagA pointer to the pCoeffCSLag matrix. Number of rows in matrix = 1 (only one Y-variable). Number of columns in matrix = number of lagged variables in the model.
Returns
Returns SQ_E_OK if success or an error code
See also
SQ_GetColumnXIndexByName
SQ_GetColumnYIndexByName

◆ SQ_GetCoefficientsMLR()

SQ_ErrorCode SQ_GetCoefficientsMLR ( SQ_Model  pModel,
int  iComponent,
SQ_IntVector pColumnYIndices,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pCoeffMLR 
)

PLS Regression coefficients corresponding to the scaled and centered X but the unscaled and uncentered Y. (the double scaling of the extended terms has been removed). The function fails if the model is not a PLS model or if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]iComponentThe component to use For an OPLS model, the last predictive component is the only valid one.
[in]pColumnYIndicesA list of Y column Indices to use. NULL if all y columns in the model should be used
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is true the returned matrix will be back transformed to the original domain.
[out]pCoeffMLRA pointer to the pCoeffMLR matrix. Number of rows in matrix = number of Y-variables chosen (length of pnColumnYIndices). Number of columns in matrix = number of X-variables + 1 (Constant).
Returns
Returns SQ_E_OK if success or an error code
See also
SQ_GetColumnYIndexByName

◆ SQ_GetCoefficientsRotated()

SQ_ErrorCode SQ_GetCoefficientsRotated ( SQ_Model  pModel,
int  iComponent,
SQ_IntVector pColumnYIndices,
SQ_ReconstructState  bReconstruct,
SQ_CoefficientsRotatedType  eCoeffRotatedType,
SQ_VectorData pCoeffRotated 
)

PLS rotated regression coefficients. The function fails if the model is not a PLS model or if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]iComponentThe component to use For an OPLS model, the last predictive component is the only valid one.
[in]pColumnYIndicesA list of Y column Indices to use. NULL if all y columns in the model should be used
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is true the returned matrix will be back transformed to the original domain.
[in]eCoeffRotatedTypeThe type of CoefficientRotated. Can be one of following: SQ_XYUnscaledUncenterd SQ_XUnscaledCenterdYUnscaledUncenterd SQ_XScaledCenterdYScaledUncenterd @ see SQ_CoefficientsRotatedType
[out]pCoeffRotatedA pointer to the pCoeffRotated matrix. Number of rows in matrix = number of Y-variables chosen (length of pnColumnYIndices). Number of columns in matrix = number of X-variables + 1 (Constant).
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetColumnXIndexByName()

SQ_ErrorCode SQ_GetColumnXIndexByName ( SQ_Model  pModel,
const char *  szColumnXName,
int  iVarID,
int *  piColumnXIndex 
)

Retrieves the index of a X column given a name in a specific model

Parameters
[in]pModelThe model handle to use
[in]szColumnXNameThe name of the given column to get the index from, UTF-8 encoded.
[in]iVarIDThe index of the Variable ID that will be used to identify the variables in the project. The variable names in the selected variable ID must be unique or the initialization will fail.
[out]piColumnXIndexThe index of the named column.
Returns
Returns SQ_E_OK if success or an error code
See also
GetNumberOfVariableIDs

◆ SQ_GetColumnXNameByIndex()

SQ_ErrorCode SQ_GetColumnXNameByIndex ( SQ_Model  pModel,
int  iColumnXIndex,
int  iVarID,
char *  szColumnXName,
int  iBufferLength 
)

Retrieves the name of a X column given an index in a specific model.

Parameters
[in]pModelThe model handle to use
[in]iColumnXIndexThe index of the column to get the name of.
[in]iVarIDThe index of the Variable ID that will be used to identify the variables in the project. The variable names in the selected variable ID must be unique or the initialization will fail.
[out]szColumnXNameThe name of the given column, UTF-8 encoded. This parameter could be overwritten at the next call to a SIMCA-Q function.
[in]iBufferLengthThe length of the buffer.
Returns
Returns SQ_E_OK if success or an error code
See also
GetNumberOfVariableIDs

◆ SQ_GetColumnXSize()

SQ_ErrorCode SQ_GetColumnXSize ( SQ_Model  pModel,
int *  piColumnXSize 
)

Retrieves the number of X columns in a specific model

Parameters
[in]pModelThe model handle to use
[out]piColumnXSizeThe number of X columns in the model
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetColumnYIndexByName()

SQ_ErrorCode SQ_GetColumnYIndexByName ( SQ_Model  pModel,
const char *  szColumnYName,
int  iVarID,
int *  piColumnYIndex 
)

Retrieves the index of a Y column given a name in a specific model

Parameters
[in]pModelThe model handle to use
[in]szColumnYNameThe name of the given column to get the index from, UTF-8 encoded.
[in]iVarIDThe index of the Variable ID that will be used to identify the variables in the project. The variable names in the selected variable ID must be unique or the initialization will fail.
[out]piColumnYIndexThe index of the named column.
Returns
Returns SQ_E_OK if success or an error code
See also
GetNumberOfVariableIDs

◆ SQ_GetColumnYNameByIndex()

SQ_ErrorCode SQ_GetColumnYNameByIndex ( SQ_Model  pModel,
int  iColumnYIndex,
int  iVarID,
char *  szColumnYName,
int  iBufferLength 
)

Retrieves the name of a Y column given an index in a specific model

Parameters
[in]pModelThe model handle to use
[in]iColumnYIndexThe index of the column to get the name of.
[in]iVarIDThe index of the Variable ID that will be used to identify the variables in the project. The variable names in the selected variable ID must be unique or the initialization will fail.
[out]szColumnYNameThe name of the given column, UTF-8 encoded. This parameter could be overwritten at the next call to a SIMCA-Q function.
[in]iBufferLengthThe length of the buffer.
Returns
Returns SQ_E_OK if success or an error code
See also
GetNumberOfVariableIDs

◆ SQ_GetColumnYSize()

SQ_ErrorCode SQ_GetColumnYSize ( SQ_Model  pModel,
int *  piColumnYSize 
)

Retrieves the number of Y columns in a specific model

Parameters
[in]pModelThe model handle to use
[out]piColumnYSizeThe number of Y columns in the model
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetConfidenceLevel()

SQ_ErrorCode SQ_GetConfidenceLevel ( SQ_Model  pModel,
float *  pfConfidenceLevel 
)

Retrieves the confidence level. The confidence level is used when computing confidence intervals on the parameters.

Parameters
[in]pModelThe model to use
[out]pfConfidenceLevelA pointer to the confidence level.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetContributionsDModX()

SQ_ErrorCode SQ_GetContributionsDModX ( SQ_Model  pModel,
int  iObsIx,
SQ_WeightType  eWeightType,
int  iComponent,
int  iYVar,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pContrDModX 
)

DModX contribution. Contribution is used to understand how an observation differs from the others in DModX. See the document "SIMCA-Q Interface Description.doc" for a more detailed description on contributions. The function fails if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]iObsIxIndex in the observation matrix (the training set) .
[in]eWeightTypeThe type of weight. If the model is a PCA model this parameter must be Normalized, RX. If the model is a PLS model this parameter must be Normalized, RX, CoeffCS or VIP.
[in]iComponentThe component of the weight. For an OPLS model the component must be the last predictive.
[in]iYVarThe index of the Y variable to use if eWeightType is CoeffCS. If eWeightType is something else, this parameter is ignored.
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is true the returned matrix will be back transformed to the original domain.
[out]pContrDModXA pointer to the DModX contribution matrix. Number of rows in matrix = 1. Number of columns in matrix = number of x-variables in the model.
Returns
Returns SQ_E_OK if success or an error code
See also
SQ_GetColumnYIndexByName

◆ SQ_GetContributionsDModXGroup()

SQ_ErrorCode SQ_GetContributionsDModXGroup ( SQ_Model  pModel,
SQ_IntVector pObsIx,
SQ_WeightType  eWeightType,
int  iComponent,
int  iYVar,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pContrDModX 
)

DModX group contribution. Contribution is used to understand how an observation differs from the others in an X score(t) or in DModX. See the document "SIMCA-Q Interface Description.doc" for a more detailed description on contributions. The function fails if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]pObsIxA list of indices in the observation matrix (the training set)
[in]eWeightTypeThe type of weight. If the model is a PCA model this parameter must be Normalized, RX. If the model is a PLS model this parameter must be Normalized, RX, CoeffCS or VIP.
[in]iComponentThe component of the weight. For an OPLS model the component must be the last predictive.
[in]iYVarThe index of the Y variable to use if eWeightType is CoeffCS. If eWeightType is something else, this parameter is ignored.
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is true the returned matrix will be back transformed to the original domain.
[out]pContrDModXA pointer to the Scores single weight group contribution matrix. Number of rows in matrix = 1. Number of columns in matrix = number of x-variables in the model.
Returns
Returns SQ_E_OK if success or an error code
See also
SQ_GetColumnYIndexByName

◆ SQ_GetContributionsDModY()

SQ_ErrorCode SQ_GetContributionsDModY ( SQ_Model  pModel,
int  iObsIx,
SQ_WeightType  eWeightType,
int  iComponent,
SQ_VectorData pContrDModY 
)

DModY contribution. Contribution is used to understand how an observation differs from the others in DModY. See the document "SIMCA-Q Interface Description.doc" for a more detailed description on contributions. The function fails if the model doesn't have any components or if the model isn't a PLS model.

Parameters
[in]pModelThe model handle to use
[in]iObsIxIndex in the observation matrix (the training set) .
[in]eWeightTypeThe type of weight. This parameter must be Normalized or RY.
[in]iComponentThe component of the weight. For an OPLS model the component must be the last predictive.
[out]pContrDModYA pointer to the DModY contribution matrix. Number of rows in matrix = 1. Number of columns in matrix = number of Y-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetContributionsDModYGroup()

SQ_ErrorCode SQ_GetContributionsDModYGroup ( SQ_Model  pModel,
SQ_IntVector pObsIx,
SQ_WeightType  eWeightType,
int  iComponent,
SQ_VectorData pContrDModY 
)

DModY group contribution. Contribution is used to understand how an observation differs from the others in DModY. See the document "SIMCA-Q Interface Description.doc" for a more detailed description on contributions. The function fails if the model doesn't have any components or if the model isn't a PLS model.

Parameters
[in]pModelThe model handle to use
[in]pObsIxA list of indices in the observation matrix (the training set)
[in]eWeightTypeThe type of weight. This parameter must be Normalized or RY.
[in]iComponentThe component of the weight. For an OPLS model the component must be the last predictive.
[out]pContrDModYA pointer to the DModY contribution matrix. Number of rows in matrix = 1. Number of columns in matrix = number of Y-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetContributionsScoresMultiWeight()

SQ_ErrorCode SQ_GetContributionsScoresMultiWeight ( SQ_Model  pModel,
int  iObs1Ix,
int  iObs2Ix,
SQ_IntVector pWeightType,
SQ_IntVector pComponents,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pContrSMW 
)

Scores multi weight contribution. Contribution is used to understand how an observation differs from the others in an X score(t) or in DModX. See the document "SIMCA-Q Interface Description.doc" for a more detailed description on contributions. The function fails if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]iObs1IxIndex in the observation matrix (the training set) for the reference observation (from observation). 0 if the average is to be used.
[in]iObs2IxIndex in the observation matrix (the training set) of the observation for which the contributions are to be calculated (to observation).
[in]pWeightTypeAn int vector containing SQ_WeightType enums If the model is a PCA model this parameter must be P. If the model is a PLS model this parameter must be P or WStar. If the model is a OPLS model this parameter must be P or PO.
[in]pComponentsA list of component Indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used. for OPLS models and PRange weight the component argument is ignored, all components are used, for weight Po the component argument is the orthogonal component number for P_Po, supply 2 components, one predictive component and one orthogonal component.
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is true the returned matrix will be back transformed to the original domain.
[out]pContrSMWA pointer to the Scores multi weight contribution matrix. Number of rows in matrix = 1. Number of columns in matrix = number of x-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetContributionsScoresMultiWeightGroup()

SQ_ErrorCode SQ_GetContributionsScoresMultiWeightGroup ( SQ_Model  pModel,
SQ_IntVector pObs1Ix,
SQ_IntVector pObs2Ix,
SQ_IntVector pWeightType,
SQ_IntVector pComponents,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pContrSMW 
)

Scores multi weight group contribution. Contribution is used to understand how an observation differs from the others in an X score(t) or in DModX. See the document "SIMCA-Q Interface Description.doc" for a more detailed description on contributions. The function fails if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]pObs1IxA list of indices in the observation matrix (the training set) for the reference observations (from observation). NULL if the average is to be used.
[in]pObs2IxA list of indices in the observation matrix (the training set) of the observations for which the contributions are to be calculated (to observation).
[in]pWeightTypeAn int vector containing SQ_WeightType enums. If the model is a PCA model this parameter must be P. If the model is a PLS model this parameter must be P or WStar. If the model is a OPLS model this parameter must be P or PO.
[in]pComponentsA list of component Indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used. for OPLS models and PRange weight the component argument is ignored, all components are used, for weight Po the component argument is the orthogonal component number for P_Po, supply 2 components, one predictive component and one orthogonal component.
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is true the returned matrix will be back transformed to the original domain.
[out]pContrSMWA pointer to the Scores multi weight group contribution matrix. Number of rows in matrix = 1. Number of columns in matrix = number of x-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetContributionsScoresSingleWeight()

SQ_ErrorCode SQ_GetContributionsScoresSingleWeight ( SQ_Model  pModel,
int  iObs1Ix,
int  iObs2Ix,
SQ_WeightType  eWeightType,
int  iComponent,
int  iYVar,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pContrSSW 
)

Scores single weight contribution. Contribution is used to understand how an observation differs from the others in an X score(t) or in DModX. See the document "SIMCA-Q Interface Description.doc" for a more detailed description on contributions. The function fails if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]iObs1IxIndex in the observation matrix (the training set) for the reference observation (from observation). 0 if the average is to be used.
[in]iObs2IxIndex in the observation matrix (the training set) of the observation for which the contributions are to be calculated (to observation).
[in]eWeightTypeThe type of weight. If the model is a PCA model this parameter must be Normalized, Raw, RX or P. If the model is a PLS model this parameter can be any weight defined in SQ_WeightType.
[in]iComponentThe component of the weight. Ignored if eWeightType=Normalized or Raw. For an OPLS model with weight CoeffCS or VIP the component must be the last predictive.
[in]iYVarThe index of the Y variable to use if eWeightType is CoeffCS or CoeffCSRaw. If eWeightType is something else, this parameter is ignored.
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is true the returned matrix will be back transformed to the original domain.
[out]pContrSSWA pointer to the Scores single weight contribution matrix. Number of rows in matrix = 1. Number of columns in matrix = number of x-variables in the model.
Returns
Returns SQ_E_OK if success or an error code
See also
SQ_GetColumnYIndexByName

◆ SQ_GetContributionsScoresSingleWeightGroup()

SQ_ErrorCode SQ_GetContributionsScoresSingleWeightGroup ( SQ_Model  pModel,
SQ_IntVector pObs1Ix,
SQ_IntVector pObs2Ix,
SQ_WeightType  eWeightType,
int  iComponent,
int  iYVar,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pContrSSW 
)

Scores single weight group contribution. Contribution is used to understand how an observation differs from the others in an X score(t) or in DModX. See the document "SIMCA-Q Interface Description.doc" for a more detailed description on contributions. The function fails if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]pObs1IxA list of indices in the observation matrix (the training set) for the reference observations (from observation). NULL if the average is to be used.
[in]pObs2IxA list of indices in the observation matrix (the training set) of the observations for which the contributions are to be calculated (to observation).
[in]eWeightTypeThe type of weight. If the model is a PCA model this parameter must be Normalized, Raw, RX or P. If the model is a PLS model this parameter can be any weight defined in SQ_WeightType.
[in]iComponentThe component of the weight. Ignored if eWeightType=Normalized or Raw. For an OPLS model with weight CoeffCS or VIP the component must be the last predictive.
[in]iYVarThe index of the Y variable to use if eWeightType is CoeffCS or CoeffCSRaw. If eWeightType is something else, this parameter is ignored.
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is true the returned matrix will be back transformed to the original domain.
[out]pContrSSWA pointer to the Scores single weight group contribution matrix. Number of rows in matrix = 1. Number of columns in matrix = number of x-variables in the model.
Returns
Returns SQ_E_OK if success or an error code
See also
SQ_GetColumnYIndexByName

◆ SQ_GetCorrelationMatrix()

SQ_ErrorCode SQ_GetCorrelationMatrix ( SQ_Model  pModel,
SQ_VectorData pCorrMatrix 
)

Retrieves the Correlation matrix from a model. The correlation matrix shows the pair-wise correlation between all variables (X and Y) in the current workset, scaled and transformed as the workset. Each variable is displayed on one row and one column in the correlation matrix, and the correlation between two variables is shown in the cell where the two variables intersect. The function fails if the model is not a class model.

Parameters
[in]pModelThe model handle to use
[out]pCorrMatrixA pointer to the Correlation matrix. Number of rows in matrix = number of variables in the model. Number of columns in matrix = number of variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetCrossValidationRounds()

SQ_ErrorCode SQ_GetCrossValidationRounds ( SQ_Model  pModel,
int *  iCVRounds 
)

Retrieves the number of cross-validation rounds in a model.

Parameters
[in]pModelThe model handle to use
[out]iCVRoundsThe number of cross-validation rounds in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetCVAnovaTable()

SQ_ErrorCode SQ_GetCVAnovaTable ( SQ_Model  pModel,
SQ_VectorData poCVAnovaTable 
)

CV-ANOVA, ANalysis Of VAriance testing of Cross-Validated predictive residuals, is a diagnostic tool for assessing the reliability of PLS, OPLS and O2PLS models.

SS - Total corr (Total corrected), SS of the Y of the workset corrected for the mean. Regression, Fraction of Total Corrected SS accounted for by the model, estimated via the cross validation principle. Residual, Difference between Total Corrected and Regression SS, i.e., the fraction of Total Corrected unaccounted for by the model. DF - Total corr, Regression, residual, The number of degrees of freedom (DF). This is an approximate number based on the experience that PLS needs half the components to reach the same explanation of Y as principal components regression. MS - Total corr, Regression, residual, By dividing each SS by the respective DF, the corresponding mean squares (MS), or variances, are obtained. F - The F-test, based on the ratio MS Regression/MS Residual, then formally assesses the significance of the model. p - The p-value indicates the probability level where a model with this F-value may be the result of just chance. The common practice is to interpret a p-value lower than 0.05 as pointing to a significant model. SD - Standard deviation, Square root of MS.

An example: Returns the following matrix Model SS DF MS F p SD Mean 3,75 15 0,25
OPLS(A=1) 0,954741379 13 0,073441645 19,03047405 0,000137421 diff 2,795258621 2 1,39762931

Parameters
[in]pModelThe model handle to use
[out]poCVAnovaTableA pointer to a SQ_VectorData containing the anova table for the the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetCVGroups()

SQ_ErrorCode SQ_GetCVGroups ( SQ_Model  pModel,
SQ_VectorData pCVGroups 
)

CV groups. The cross validation groups that the observations in the model belongs to.

Parameters
[in]pModelThe model handle to use
[out]pCVGroupsA pointer to the CV groups vector. Number of entries in the vector = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetcvSEPercentile()

SQ_ErrorCode SQ_GetcvSEPercentile ( SQ_Model  pModel,
float  fSignificance,
float *  pfStudentsT 
)

Calculates the percentile for the cvSE vectors which can be used to calculate confidence intervalsl, for example PcvSE. to get confidence intervals, multiply the cvSE values with the percentile value. see GetCcvSE, GetCocvSE, GetCoefficientsCScvSE,GetPcvSE,GetPccvSE,GetPocvSE,GetPqcvSE,GetQcvSE GetQocvSE,GetVIPcvSE,GetWcvSE,GetWStarCcvSE,GetWStarcvSE and GetWocvSE

Parameters
[in]pModelThe model handle to use to the original domain.
[in]fSignificancethe significance level. 0.05 means 95% probability.
[out]pfStudentsTthe t value needed to get the confidence intervals
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetDefaultProbabilityLevel()

SQ_ErrorCode SQ_GetDefaultProbabilityLevel ( SQ_Model  pModel,
float *  pfPLevel 
)

Get the default probability level from the model. .95 means 95% probability In SIMCA the probability level is the critical limit for PModXPS, PModXPS values outside the limit will be colored in red in the predictionset.

Parameters
[in]pModelThe model to use
[out]pfPLevelDefault probability level.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetDModX()

SQ_ErrorCode SQ_GetDModX ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_NormalizedState  bNormalized,
SQ_ModelingPowerWeightedState  bModelingPowerWeighted,
SQ_VectorData pDModX 
)

Retrieves the DModX matrix from a model.

Distance to the model in X space (row residual SD), after A components (the selected dimension), for the observations used to fit the model. If you select component 0, it is the standard deviation of the observations with scaling and centering as specified in the workset (no row means subtracted), i.e., it is the distance to the origin of the scaled coordinate system.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used. If NULL is used, the returned matrix will contain the number of components + 1 rows, i.e. the first row will contain the data after 0 components. For an OPLS model, the last predictive component is the only valid one.
[in]bNormalizedIf True, the results will be in units of standard deviation of the pooled RSD of the model If False, they will be in absolute values.
[in]bModelingPowerWeightedIf True, the function will weight the residuals by the modeling power of the variables.
[out]pDModXA pointer to the DModX matrix. Number of rows in matrix = number of components chosen (length of pComponents). Number of columns in matrix = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetDModXCrit()

SQ_ErrorCode SQ_GetDModXCrit ( SQ_Model  pModel,
int  iComponent,
SQ_NormalizedState  bNormalized,
float  fLevel,
float *  pfDModXCrit 
)

Retrieves the DModXCrit matrix from a model. The critical limit for DModX for a certain component and probability level.

Parameters
[in]pModelThe model handle to use
[in]iComponentIndex of the component to use For an OPLS model, the last predictive component is the only valid one.
[in]bNormalizedIf SQ_True, the results will be in units of standard deviation of the pooled RSD of the model If SQ_False, they will be in absolute values.
[in]fLevelThe probability level, .95 means 95% probability. The value should be between 0.00001 and 0.99999. If -1, the default level from the project is used.
[out]pfDModXCritA pointer to the DModXCrit result.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetDModY()

SQ_ErrorCode SQ_GetDModY ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_NormalizedState  bNormalized,
SQ_VectorData pDModY 
)

Retrieves the DModY matrix from a model.

Distance to the model in the Y space, after A components (the selected dimension), for the observations used to fit the model. If you select, component 0, it is the Standard deviation (no row means subtracted) of the observations with scaling (or none) as specified in the workset, i.e., it is the distance to the origin of the coordinate system.

The function fails if the model isn't a PLS model.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component Indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used. If NULL is used, the returned matrix will contain the number of components + 1 rows, i.e. the first row will contain the data after 0 components. For an OPLS model, the last predictive component and zero are the only valid ones.
[in]bNormalizedIf true, the results will be in units of standard deviation of the pooled RSD of the model If false, they will be in absolute values.
[out]pDModYA pointer to the DModY matrix. Number of rows in matrix = number of components chosen (length of piComponents). Number of columns in matrix = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetEigenValues()

SQ_ErrorCode SQ_GetEigenValues ( SQ_Model  pModel,
SQ_VectorData pEigenValues 
)

Retrieves the Eigen values matrix from a model. Eigen values of the X matrix.

Parameters
[in]pModelThe model handle to use
[out]pEigenValuesA pointer to the Iterations matrix. Number of rows in matrix = number of components in the model. Number of columns in matrix = 1
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetImpulseResponse()

SQ_ErrorCode SQ_GetImpulseResponse ( SQ_Model  pModel,
int  iComponent,
int  iColumnXIndex,
int  iIntegrationStartLag,
int  iIntegrationEndLag,
SQ_VectorData pRespons 
)

Retrieves the Finite Impulse Response from a model.

The model has to be a Finite Impulse Response model (FIR). FIR models have a name that starts with 'FIR'.

Parameters
[in]pModelThe model handle to use
[in]iComponentThe component to use 1 for component 1 in the model, 2 for component 2 and so on.
[in]iColumnXIndexThe index of X column to use
[in]iIntegrationStartLagThe start lag for the integration.
[in]iIntegrationEndLagThe end lag for the integration.
[out]pResponsA pointer to the Finite Impulse Response matrix. Number of rows in matrix = number of lagged variables between the interval iIntegrationStartLag and iIntegrationEndLag. Number of columns in matrix = number of y-variables in the model.
Returns
Returns SQ_E_OK if success or an error code
See also
SQ_GetColumnXIndexByName

◆ SQ_GetIterations()

SQ_ErrorCode SQ_GetIterations ( SQ_Model  pModel,
SQ_VectorData pIterations 
)

Retrieves the Iteration matrix from a model. Number of iterations of the algorithm till convergence

Parameters
[in]pModelThe model handle to use
[out]pIterationsA pointer to the Iterations matrix. Number of rows in matrix = number of components in the model. Number of columns in matrix = 1
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetMBEcv()

SQ_ErrorCode SQ_GetMBEcv ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_VectorData pMBEcv 
)

Retrieves the MBEcv matrix from a model. Cross validated root mean square error for observations in the workset. The function fails if the model is not a PLS model or if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component Indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used. For an OPLS model, the last predictive component is the only valid one.
[out]pMBEcvA pointer to the MBEcv matrix. Number of rows in matrix = number of components chosen (length of piComponents). Number of columns in matrix = number of y-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetMBEE()

SQ_ErrorCode SQ_GetMBEE ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_VectorData pMBEE 
)

Retrieves the MBEE matrix from a model. Root mean square error of the fit for observations in the workset. The function fails if the model is not a PLS model or if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component Indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used. For an OPLS model, the last predictive component is the only valid one.
[out]pMBEEA pointer to the MBEE matrix. Number of rows in matrix = number of components chosen (length of piComponents). Number of columns in matrix = number of y-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetModelAlarmLimits()

SQ_ErrorCode SQ_GetModelAlarmLimits ( SQ_Model  pModel,
char *  szJsonLimits,
int  iBufferLength 
)

Retrieves the model alarm limits (used in SIMCA-online) formatted as a JSON string

Parameters
[in]pModelThe model handle to use
[out]szJsonLimitsJson formatted string containing the alarm and limits for this model. Note that returned value will be of maximum iBufferLength. Available types are : var, t, DModX, DModX+, PModX, PModX+ and T2Range. For each type of vector there are target, lolo, lo, hi and hihi limits. Each alarm type can have triggers to raise an alarm. Example 1 : A score vector alarm with limits. Extra argument is which component the alarm is for. "[{\"type" : "DModX", "comp" : 1, "limits" : { "lolo" : -4, "lo" : -3, "hi" : 3, "hihi" : 4 }]" Example 2 : A variable vector alarm with limits. Extra argument is 'name' to specify the variable name to set the alarm for. "[{\"type" : "var", "name" : "Agitation speed", "limits" : { "lolo" : -100, "target" : 100, "hihi" : 200 }]" Example 3 : A DModX vector alarm. "[{\"type" : "DModX", "limits" : { "hihi" : 20 }]" Example 4 : A T2Range vector alarm. Extra argument \"comp" is used for setting the component range. The "comp" argument is not used for OPLS models. "[{\"type" : "T2Range", "comp" : { "from" : 1, "to" : 4 }, "limits'" : { "hihi" : 20 }]" Triggers are represented by a "triggerLogic" member to the alarm. "{ "numObservations' : 3, "missing" : True, "numObsInWindow" : 8, "sizeWindow" : 100 }" Available members are 'numObservations' which is how many consecutive observations that can be outside the limits before triggering alarm. 'missing' is used when a missing observation should trigger alarms. "numObsInWindow" and "sizeWindow" fields are used for how many observations that can be outside limits withing a window before triggering an alarm. This is a moving window across all observations. The settings "numObsInWindow" : 8 and "sizeWindow" : 100 means that an alarm will be triggered if there are more than 8 observations in a window of 100 observations.
[in]iBufferLengthThe maximum length of szJsonLimits.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetModelClass()

SQ_ErrorCode SQ_GetModelClass ( SQ_Model  pModel,
int *  piClass 
)

Retrieves the class of a PCA_Class or PLS_Class model.

Parameters
[in]pModelThe model handle to use
[out]piClassthe class of this model, if the model is not a class model piClass is set to -1.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetModelDatasets()

SQ_ErrorCode SQ_GetModelDatasets ( SQ_Model  pModel,
SQ_IntVector pDatasetNumbers 
)

Retrieves the dataset numbers that the model was created from.

Parameters
[in]pModelThe model handle to use
[out]pDatasetNumbersA vector with the dataset numbers that the model was created from. The vector must be cleared with SQ_ClearIntVector.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetModelLastModified()

SQ_ErrorCode SQ_GetModelLastModified ( SQ_Model  pModel,
long *  lModifiedTime 
)

Retrieves the time of a model when it was last modified.

Parameters
[in]pModelThe model handle to use
[out]lModifiedTimeThe time and date when the model was created or modified, representing the number of seconds elapsed since 00:00 hours, Jan 1, 1970 UTC.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetModelName()

SQ_ErrorCode SQ_GetModelName ( SQ_Model  pModel,
char *  szModelName,
int  iBufferLength 
)

Retrieves the name of a model.

Parameters
[in]pModelThe model handle to use
[in,out]szModelNameThe name of the model, UTF-8 encoded. The user is responsible to allocate and deallocate the buffer.
[in]iBufferLengthThe length of the buffer.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetModelNumber()

SQ_ErrorCode SQ_GetModelNumber ( SQ_Model  pModel,
int *  iModelNumber 
)

Retrieves the number of the model.

Parameters
[in]pModelThe model handle to use
[out]iModelNumberThe model number.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetModelOptions()

SQ_ErrorCode SQ_GetModelOptions ( SQ_Model  pModel,
SQ_ModelOptions poModelOptions 
)

Retrieves different options from how a model is created

Parameters
[in]pModelThe model handle to use
[out]poModelOptionsA pointer to a SQ_ModelOptions struct containing information about the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetModelTitle()

SQ_ErrorCode SQ_GetModelTitle ( SQ_Model  pModel,
char *  szModelTitle,
int  iBufferLength 
)

Retrieves the title of a model.

Parameters
[in]pModelThe model handle to use
[in,out]szModelTitleThe title of the model, UTF-8 encoded. The user is responsible to allocate and deallocate the buffer.
[in]iBufferLengthThe length of the buffer.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetModelType()

SQ_ErrorCode SQ_GetModelType ( SQ_Model  pModel,
SQ_ModelType eModelType 
)

Retrieves the type of a model.

Parameters
[in]pModelThe model handle to use
[out]eModelTypeThe type of the model.
Returns
Returns SQ_E_OK if success or an error code
See also
ModelType

◆ SQ_GetModelTypeString()

SQ_ErrorCode SQ_GetModelTypeString ( SQ_Model  pModel,
char *  szModelType,
int  iBufferLength 
)

Retrieves the type of a model as a string.

Parameters
[in]pModelThe model handle to use
[in,out]szModelTypeThe type of the model, UTF-8 encoded. The user is responsible to allocate and deallocate the buffer.
[in]iBufferLengthThe length of the buffer.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetMPowX()

SQ_ErrorCode SQ_GetMPowX ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_VectorData pMPowX 
)

Retrieves the MPowX matrix from a model. The modeling power of variable X is the fraction of its standard deviation explained by the model after the specified component. The function fails if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component Indices to use. 1 for component 1 in the model, 2 for component 2 and so on.
[out]pMPowXA pointer to the MPowX matrix. Number of rows in matrix = number of components entered. Number of columns in matrix = number of x variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetNumberOfComponents()

SQ_ErrorCode SQ_GetNumberOfComponents ( SQ_Model  pModel,
int *  piNumComp 
)

Retrieves the number of components in a model. It will return number of predictive components despite model type. Note: for unfitted models the function returns false and sets piNumComp to -1.

Parameters
[in]pModelThe model handle to use
[out]piNumCompThe number of components in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetNumberOfObservations()

SQ_ErrorCode SQ_GetNumberOfObservations ( SQ_Model  pModel,
int *  piNumObs 
)

Retrieves the number of observations in a model.

Parameters
[in]pModelThe model handle to use
[out]piNumObsThe number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetNumberOfPredictiveComponents()

SQ_ErrorCode SQ_GetNumberOfPredictiveComponents ( SQ_Model  pModel,
int *  piNumComp 
)

Retrieves the number of predictive components in an OPLS model. Note: for unfitted models the function returns false and sets piNumComp to -1.

Parameters
[in]pModelThe model handle to use
[out]piNumCompThe number of predictive components in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetNumberOfXOrthogonalComponents()

SQ_ErrorCode SQ_GetNumberOfXOrthogonalComponents ( SQ_Model  pModel,
int *  piNumComp 
)

Retrieves the number of X orthogonal components in an OPLS/O2PLS model. Note: for unfitted models the function returns false and sets piNumComp to -1.

Parameters
[in]pModelThe model handle to use
[out]piNumCompThe number of X orthogonal components in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetNumberOfYOrthogonalComponents()

SQ_ErrorCode SQ_GetNumberOfYOrthogonalComponents ( SQ_Model  pModel,
int *  piNumComp 
)

Retrieves the number of Y orthogonal components in an O2PLS model. Note: for unfitted models the function returns false and sets piNumComp to -1.

Parameters
[in]pModelThe model handle to use
[out]piNumCompThe number of Y orthogonal components in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetObservationClasses()

SQ_ErrorCode SQ_GetObservationClasses ( SQ_Model  pModel,
SQ_IntVector piClasses 
)

Gets the class numbers for each observation in a model

Parameters
[in]pModelThe model handle to use
[out]piClassesA vector with the class numbers for each observation in the workset. NOTE: this vector is of ZERO length if the model has no classes.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetObservationName()

SQ_ErrorCode SQ_GetObservationName ( SQ_Model  pModel,
int  iObsIx,
int  iObsID,
char *  szObsName,
int  iBufferLength 
)

Retrieves the name of an observation in a model.

Parameters
[in]pModelThe model handle to use
[in]iObsIxThe index of the observation to get the name of.
[in]iObsIDThe observation ID to get.
[out]szObsNameThe name of the observation, UTF-8 encoded. This parameter could be overwritten at the next call to a SIMCA-Q function.
[in]iBufferLengthThe length of the buffer.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetObservationNames()

SQ_ErrorCode SQ_GetObservationNames ( SQ_Model  pModel,
int  iObsID,
SQ_StringVector pObservationNames 
)

Retrieves the names of the observations in a model.

Parameters
[in]pModelThe model handle to use
[in]iObsIDThe index of the Observation ID. 1 for the primary ID in the data set, 2 for the first level of secondary ID, 3 for the second level of secondary ID and so on.
[out]pObservationNamesThe names of the observations.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetOLevX()

SQ_ErrorCode SQ_GetOLevX ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_VectorData pOLevX 
)

Retrieves the OLevX matrix from a model. The leverage is a measure of the influence of a point (observation) on the PC model or the PLS model in the X space. The observations leverages are computed as the diagonal elements of the matrix H0 after A dimensions. H0 = T[T'T]-1T'. The function fails if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component Indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used.
[out]pOLevXA pointer to the OLevX matrix. Number of rows in matrix = number of components entered. Number of columns in matrix = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetOLevY()

SQ_ErrorCode SQ_GetOLevY ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_VectorData pOLevY 
)

Retrieves the OLevY matrix from a model. The leverage is a measure of the influence of a point (observation) on the PLS model in the Y space. The observations leverages are computed as the diagonal elements of the matrix Hy after A dimensions. Hy = U[U'U]-1U'. The function fails if the model isn't a PLS model or if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component Indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used.
[out]pOLevYA pointer to the OLevY matrix. Number of rows in matrix = number of components entered. Number of columns in matrix = 1
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetOPLSR2Q2Overview()

SQ_ErrorCode SQ_GetOPLSR2Q2Overview ( SQ_Model  pModel,
SQ_VectorData pModelR2Q2Overview 
)

Returns the R2/Q2 overview part of the model information matrix for an OPLS model. The returned matrix is defined as follows: A matrix containing six rows, the first contains R2X values, the second R2XCum values, the third Q2 values, the fourth Q2Cum values, the fifth R2Y values and the sixth R2YCum values. There will be as many columns as the number of components. The first columns contains values for the predictive components. If there are orthogonal components, they will follow the predictive components.

Parameters
[in]pModelThe model handle to use
[out]pModelR2Q2OverviewThe overview results.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetORisk()

SQ_ErrorCode SQ_GetORisk ( SQ_Model  pModel,
int  iColumnYIndex,
SQ_IntVector pComponents,
SQ_VectorData pORisk 
)

Retrieves the ORisk matrix from a model. This is a measure of the sensitivity of the residual, of a selected Y, for an observation in the training set. It is computed from the difference between the residual standard deviation of the selected Y, when the observation is and is not in the training set model.

The function fails if the model isn't a PLS model or if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]iColumnYIndexThe index of Y column to use
[in]pComponentsA list of component Indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used. For an OPLS model, the last predictive component is the only valid one.
[out]pORiskA pointer to the ORisk matrix. Number of rows in matrix = number of components entered. Number of columns in matrix = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code
See also
SQ_GetColumnYIndexByName

◆ SQ_GetORiskPooled()

SQ_ErrorCode SQ_GetORiskPooled ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_VectorData pORiskPooled 
)

Retrieves the ORiskPooled matrix from a model. This is a measure of the sensitivity of the pooled Y residuals, of an observation in the training set. It is computed from the difference between the pooled Y residual standard deviation, when the observation is and is not in the training set model.

The function fails if the model isn't a PLS model or if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component Indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used. For an OPLS model, the last predictive component is the only valid one.
[out]pORiskPooledA pointer to the ORiskPooled matrix. Number of rows in matrix = number of components entered. Number of columns in matrix = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetP()

SQ_ErrorCode SQ_GetP ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pP 
)

Retrieves the P matrix from a model. The Loading weights of the X part of the model. With a PC model, the p's represent the importance of the variables in that dimension. With a PLS model, the p's express the importance of the variables in approximating X. The function fails if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component Indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used.
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is true the returned matrix will be back transformed to the original domain.
[out]pPA pointer to the P matrix. Number of rows in matrix = number of components chosen (length of piComponents). Number of columns in matrix = number of x-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetPc()

SQ_ErrorCode SQ_GetPc ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pPc 
)

Retrieves the Pc matrix from a model. X loading p and Y loading weight c combined to one vector. The function fails if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components should be used.
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is true the returned matrix will be back transformed to the original domain.
[out]pPcA pointer to the Pc matrix. Number of rows in matrix = number of components chosen (length of pComponents). Number of columns in matrix = number of x-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetPcCorr()

SQ_ErrorCode SQ_GetPcCorr ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_VectorData pPcCorr 
)

Retrieves the PcCorr matrix from a model. X loading p and Y loading weight c scaled as correlation coefficients between X and t (p) and Y and u (c), and combined to one vector. The function fails if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components should be used.
[out]pPcCorrA pointer to the PcCorr matrix. Number of rows in matrix = number of components chosen (length of pComponents). Number of columns in matrix = number of x-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetPccvSE()

SQ_ErrorCode SQ_GetPccvSE ( SQ_Model  pModel,
int  iCompontent,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pPccvSE 
)

Retrieves the PccvSE matrix from a model. Jack Knife standard error of the combined X loading P and Y loading weight c computed from all rounds of cross-validation. The function fails if the model is not a OPLS model and if the model doesn't have any Y side orthogonal components. to get the confidence interval, see GetcvSEPercentile(...

Parameters
[in]pModelThe model handle to use
[in]iCompontentComponents to use.
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is True the returned matrix will be back transformed to the original domain.
[out]pPccvSEA pointer to the PccvSE matrix. Number of rows in matrix = 1. Number of columns in matrix = number of y-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetPCorrelation()

SQ_ErrorCode SQ_GetPCorrelation ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_VectorData pPCorr 
)

Retrieves the loadings(P) correlation scaled matrix from a model. The function fails if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component Indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used.
[out]pPCorrA pointer to the PCorr matrix. Number of rows in matrix = number of components chosen (length of piComponents). Number of columns in matrix = number of x-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetPcv()

SQ_ErrorCode SQ_GetPcv ( SQ_Model  pModel,
int  iComponent,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pPcv 
)

Retrieves the Pcv matrix from a model. The p weights for a selected model dimension, computed from the cross validation round CV=the number set in the project. The function fails if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]iComponentThe component to use 1 for component 1 in the model, 2 for component 2 and so on.
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is true the returned matrix will be back transformed to the original domain.
[out]pPcvA pointer to the Pcv matrix. Number of rows in matrix = number of cross-validation rounds set the project. Number of columns in matrix = number of x-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetPcvSE()

SQ_ErrorCode SQ_GetPcvSE ( SQ_Model  pModel,
int  iComponent,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pPcvSE 
)

Retrieves the PcvSE matrix from a model. The jack knife standard error of the loadings p computed from the cross validations. The function fails if the model doesn't have any components. to get the confidence interval, see GetcvSEPercentile(...

Parameters
[in]pModelThe model handle to use
[in]iComponentThe component to use 1 for component 1 in the model, 2 for component 2 and so on.
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is true the returned matrix will be back transformed to the original domain.
[out]pPcvSEA pointer to the PcvSE matrix. Number of rows in matrix = 1 Number of columns in matrix = number of x-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetPcvSEDF()

SQ_ErrorCode SQ_GetPcvSEDF ( SQ_Model  pModel,
int  iComponent,
float *  pfPcvSEDF 
)

The degrees of freedom for PcvSE. The function fails if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]iComponentThe component to use 1 for component 1 in the model, 2 for component 2 and so on.
[out]pfPcvSEDFThe degrees of freedom for PcvSE.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetPermutationTest()

SQ_ErrorCode SQ_GetPermutationTest ( SQ_Model  pModel,
int  iYvariable,
int  iNumOfPermutations,
SQ_FloatMatrix pPermutationTest 
)

Retrieves the permutation test matrix from a model. Only valid for PLS and PLS-DA models. The function fails if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]iYvariableThe Y variable to calculate the permutation test for.
[in]iNumOfPermutationsNumber of permutations to do.
[out]pPermutationTestA float matrix with three columns, Correlation, R2 and Q2. Number of rows equals number of permutations.
Returns
Returns SQ_E_OK if success or an error code.

◆ SQ_GetPLag()

SQ_ErrorCode SQ_GetPLag ( SQ_Model  pModel,
int  iComponent,
int  iColumnXIndex,
SQ_VectorData pPLag 
)

Retrieves the PLag matrix from a model. Loadings p of a lagged variable as a function of the Lags. The function fails if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]iComponentThe component to use 1 for component 1 in the model, 2 for component 2 and so on.
[in]iColumnXIndexThe index of X column to use
[out]pPLagA pointer to the PLag matrix. Number of rows in matrix = 1 (only one x-variable). Number of columns in matrix = number of lagged variables in the model.
Returns
Returns SQ_E_OK if success or an error code
See also
SQ_GetColumnXIndexByName

◆ SQ_GetPModX()

SQ_ErrorCode SQ_GetPModX ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_VectorData pPModX 
)

Retrieves the PModX matrix from a model. Probability of belonging to the model in the X space, for observations used to fit the model. Component 0 corresponds to a point model, i.e., the center of the coordinate system. Observations with probability of belonging of less than 5% are considered to be non-members, i.e., they are different from the normal observations used to build the model.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component Indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used. If NULL is used, the returned matrix will contain the number of components + 1 rows, i.e. the first row will contain the data after 0 components. For an OPLS model, the last predictive component is the only valid one.
[out]pPModXA pointer to the PModX matrix. Number of rows in matrix = number of components chosen (length of piComponents). Number of columns in matrix = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetPModY()

SQ_ErrorCode SQ_GetPModY ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_VectorData pPModY 
)

Retrieves the PModY matrix from a model. Probability of belonging to the model in the Y space, for observations used to fit the model. Component 0 corresponds to a point model, i.e., the center of the coordinate system. Observations with probability of belonging of less than 5% are considered to be non-members, i.e., they are different from the normal observations used to build the model.

The function fails if the model isn't a PLS model.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component Indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used. If NULL is used, the returned matrix will contain the number of components + 1 rows, i.e. the first row will contain the data after 0 components. For an OPLS model, the last predictive component is the only valid one.
[out]pPModYA pointer to the PModY matrix. Number of rows in matrix = number of components chosen (length of piComponents). Number of columns in matrix = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetPo()

SQ_ErrorCode SQ_GetPo ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pPo 
)

Retrieves the Po matrix from a model. Orthogonal loadings of the X-part of the model. Po expresses the importance of the variables in approximating X variation orthogonal to Y, in the selected component. The function fails if the model is not an O2PLS or OPLS model.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components should be used.
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is True the returned matrix will be back transformed to the original domain.
[out]pPoA pointer to the Po matrix. Number of rows in matrix = number of components chosen (length of piComponents). Number of columns in matrix = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetPoCorrelation()

SQ_ErrorCode SQ_GetPoCorrelation ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_VectorData pPoCorr 
)

Retrieves the PoCorr matrix from a model. Orthogonal loadings Po, scaled as the correlation coefficient between X and To, in the selected component. The function fails if the model is not an O2PLS or OPLS model.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components should be used.
[out]pPoCorrA pointer to the PoCorr matrix. Number of rows in matrix = number of components chosen (length of piComponents). Number of columns in matrix = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetPocv()

SQ_ErrorCode SQ_GetPocv ( SQ_Model  pModel,
int  iComponent,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pPocv 
)

Retrieves the Pocv matrix from a model. Orthogonal loadings Po from the X-part of the model, for a selected model dimension, computed from the selected cross validation round. The function fails if the model is not an O2PLS or OPLS model.

Parameters
[in]pModelThe model handle to use
[in]iComponentThe component to use. 1 for component 1 in the model, 2 for component 2 and so on.
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is true the returned matrix will be back transformed to the original domain.
[out]pPocvA pointer to the Pocv matrix. Number of rows in matrix = number of components chosen (length of piComponents). Number of columns in matrix = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetPocvSE()

SQ_ErrorCode SQ_GetPocvSE ( SQ_Model  pModel,
int  iComponent,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pPocvSE 
)

Retrieves the PocvSE matrix from a model. Standard error of the cross validated loadings po. The function fails if the model is not an O2PLS or OPLS model. to get the confidence interval, see GetcvSEPercentile(...

Parameters
[in]pModelThe model handle to use
[in]iComponentThe component to use. 1 for component 1 in the model, 2 for component 2 and so on.
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is true the returned matrix will be back transformed to the original domain.
[out]pPocvSEA pointer to the PocvSE matrix. Number of rows in matrix = number of components chosen (length of piComponents). Number of columns in matrix = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetPoSo()

SQ_ErrorCode SQ_GetPoSo ( SQ_Model  pModel,
SQ_IntVector pCompontentsList,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pPoso 
)

Retrieves the PoSo matrix from a model. Loading of the Y-part of the model (po) and the projection of To on Y (so) concatenated to one vector. The function fails if the model is not a OPLS model and if the model doesn't have any Y side orthogonal components.

Parameters
[in]pModelThe model handle to use
[in]pCompontentsListA list of X side components to use. NULL if all components model should be used
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is True the returned matrix will be back transformed to the original domain.
[out]pPosoA pointer to the pPoso matrix. Number of rows in matrix = 1. Number of columns in matrix = number of y-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetPoSoCorr()

SQ_ErrorCode SQ_GetPoSoCorr ( SQ_Model  pModel,
SQ_IntVector pCompontentsList,
SQ_VectorData pPosoCorr 
)

Retrieves the PoSoCorr matrix from a model. Loading of the Y-part of the model (po) and the projection of To on Y (so) scaled as correlation coefficients concatenated to one vector. The function fails if the model is not a OPLS model and if the model doesn't have any Y side orthogonal components.

Parameters
[in]pModelThe model handle to use
[in]pCompontentsListA list of components to use. NULL if all components in the model should be used
[out]pPosoCorrA pointer to the PosoCorr matrix. Number of rows in matrix = x side orthogonal components. Number of columns in matrix = the x and Y terms of the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetPq()

SQ_ErrorCode SQ_GetPq ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pPq 
)

Retrieves the Pq matrix from a model. X loading weight p and Y loading weight q combined to one vector. The function fails if the model is not an O2PLS or OPLS model.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all predictive components in the model will be used.
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is true the returned matrix will be back transformed to the original domain.
[out]pPqA pointer to the Pq matrix. Number of rows in matrix = number of components chosen (length of pComponents). Number of columns in matrix = number of x-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetPqCorr()

SQ_ErrorCode SQ_GetPqCorr ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_VectorData pPqCorr 
)

Retrieves the PqCorr matrix from a model. X loading weight p and Y loading weight q scaled as correlation coefficients, combined to one vector. The function fails if the model is not an O2PLS or OPLS model.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all predictive components in the model will be used.
[out]pPqCorrA pointer to the PqCorr matrix. Number of rows in matrix = number of components chosen (length of pComponents). Number of columns in matrix = number of x-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetPqcvSE()

SQ_ErrorCode SQ_GetPqcvSE ( SQ_Model  pModel,
int  iComponent,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pPqcvSE 
)

Retrieves the PqcvSE matrix from a model. The jack knife standard error of the X loading weight p and Y loading weight q computed from the cross validations, combined to one vector. The function fails if the model is not an O2PLS or OPLS model. to get the confidence interval, see GetcvSEPercentile(...

Parameters
[in]pModelThe model handle to use
[in]iComponentThe predictive component to use. 1 for component 1 in the model, 2 for component 2 and so on.
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is true the returned matrix will be back transformed to the original domain.
[out]pPqcvSEA pointer to the PqcvSE matrix. Number of rows in matrix = 1. Number of columns in matrix = number of x-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetPreparePrediction()

SQ_ErrorCode SQ_GetPreparePrediction ( SQ_Model  pModel,
SQ_PreparePrediction pPreparePrediction 
)

Retrieves the PreparePrediction object that should be used to set data for a prediction. The returned object must be released by SQ_ClearPreparePrediction.

Parameters
[in]pModelThe model to perform a prediction on.
[out]pPreparePredictionThe PreparePrediction object that should be used to set data for a prediction.
Must be released by SQ_ClearPreparePrediction or is removed when the model is closed.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetQ()

SQ_ErrorCode SQ_GetQ ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_VectorData pQ 
)

Retrieves the Q matrix from a model. Loadings of the Y-part of the model. Q expresses the importance of the variables in approximating Y variation correlated to X, in the selected component. Y variables with large Q (positive or negative) are highly correlated with T (and X). The function fails if the model is not an OPLS/O2PLS model.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used.
[out]pQA pointer to the Q matrix. Number of rows in matrix = number of components chosen (length of piComponents). Number of columns in matrix = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetQ2()

SQ_ErrorCode SQ_GetQ2 ( SQ_Model  pModel,
SQ_VectorData pQ2 
)

Retrieves the Q2 matrix from a model. The fraction of the total variation of the X's (PC) or Y's (PLS) that can be predicted by each component.

Parameters
[in]pModelThe model handle to use
[out]pQ2A pointer to the Q2 matrix. Number of rows in matrix = 1. Number of columns in matrix = number of components in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetQ2Cum()

SQ_ErrorCode SQ_GetQ2Cum ( SQ_Model  pModel,
SQ_VectorData pQ2Cum 
)

Retrieves the Q2Cum matrix from a model. The cumulative Q2 for each component.

Parameters
[in]pModelThe model handle to use
[out]pQ2CumA pointer to the Q2Cum matrix. Number of rows in matrix = 1. Number of columns in matrix = number of components in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetQ2CumProgression()

SQ_ErrorCode SQ_GetQ2CumProgression ( SQ_Model  pModel,
SQ_VectorData pQ2CumProgression 
)

Retrieves the Q2CumProgression matrix from a model. Cumulative Q2 for the extracted components, showing the progression of cumulative values for each added orthogonal component in the OPLS model, e.g. 1+0, 1+1, 1+2. The function fails if the model is not a 1+x+0 OPLS model.

Parameters
[in]pModelThe model handle to use
[out]pQ2CumProgressionA pointer to the Q2CumProgression matrix. Number of rows in matrix = 1 + XSideOrthogonalComponents + XSidePCAComponents. Number of columns in matrix = 1.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetQ2VX()

SQ_ErrorCode SQ_GetQ2VX ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_VectorData pQ2VX 
)

Retrieves the Q2VX matrix from a model. The predicted fraction (according to cross-validation) of the variation of the X variable for the selected components. For a PC model. The function fails if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component Indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used.
[out]pQ2VXA pointer to the Q2VX matrix. Number of rows in matrix = number of components chosen (length of piComponents) Number of columns in matrix = number of x-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetQ2VXCum()

SQ_ErrorCode SQ_GetQ2VXCum ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_VectorData pQ2VXCum 
)

Retrieves the Q2VXCum matrix from a model. The cumulative predicted fraction (cross-validation) of the variation of the X variables for a PC model for the selected components. The function fails if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component Indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used.
[out]pQ2VXCumA pointer to the Q2VXCum matrix. Number of rows in matrix = number of components chosen (length of piComponents) Number of columns in matrix = number of x-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetQ2VY()

SQ_ErrorCode SQ_GetQ2VY ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_VectorData pQ2VY 
)

Retrieves the Q2VY matrix from a model. The predicted fraction (according to cross-validation) of the variation of the Y variables for the selected components. The function fails if the model is not a PLS model or if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component Indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used.
[out]pQ2VYA pointer to the Q2VY matrix. Number of rows in matrix = number of components chosen (length of piComponents) Number of columns in matrix = number of y-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetQ2VYCum()

SQ_ErrorCode SQ_GetQ2VYCum ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_VectorData pQ2VYCum 
)

Retrieves the Q2VYCum matrix from a model. The cumulative Q2, for the selected components, for the Y variables. The function fails if the model is not a PLS model or if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component Indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used.
[out]pQ2VYCumA pointer to the Q2VYCum matrix. Number of rows in matrix = number of components chosen (length of piComponents) Number of columns in matrix = number of y-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetQCorrelation()

SQ_ErrorCode SQ_GetQCorrelation ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_VectorData pQCorr 
)

Retrieves the QCorr matrix from a model. The function fails if the model is not an OPLS/O2PLS model.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used.
[out]pQCorrA pointer to the QCorr matrix. Number of rows in matrix = number of components chosen (length of piComponents). Number of columns in matrix = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetQcv()

SQ_ErrorCode SQ_GetQcv ( SQ_Model  pModel,
int  iComponent,
SQ_VectorData pQcv 
)

Retrieves the Qcv matrix from a model. The q loadings for a selected model dimension, computed from the selected cross validation round. The function fails if the model is not an OPLS/O2PLS model.

Parameters
[in]pModelThe model handle to use
[in]iComponentThe component to use. 1 for component 1 in the model, 2 for component 2 and so on.
[out]pQcvA pointer to the Qcv matrix. Number of rows in matrix = number of components chosen (length of piComponents). Number of columns in matrix = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetQcvSE()

SQ_ErrorCode SQ_GetQcvSE ( SQ_Model  pModel,
int  iComponent,
SQ_VectorData pQcvSE 
)

Retrieves the QcvSE matrix from a model. Standard error of the cross validated loadings q. The function fails if the model is not an OPLS/O2PLS model. to get the confidence interval, see GetcvSEPercentile(...

Parameters
[in]pModelThe model handle to use
[in]iComponentThe component to use. 1 for component 1 in the model, 2 for component 2 and so on.
[out]pQcvSEA pointer to the QcvSE matrix. Number of rows in matrix = number of components chosen (length of piComponents). Number of columns in matrix = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetQo()

SQ_ErrorCode SQ_GetQo ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_VectorData pQo 
)

Retrieves the Qo matrix from a model. Orthogonal loadings of the Y-part of the model. Qo expresses the importance of the variables in approximating Y variation orthogonal to X, in the selected component. The function fails if the model is not an OPLS/O2PLS model.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components should be used.
[out]pQoA pointer to the Qo matrix. Number of rows in matrix = number of components chosen (length of piComponents). Number of columns in matrix = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetQocv()

SQ_ErrorCode SQ_GetQocv ( SQ_Model  pModel,
int  iComponent,
SQ_VectorData pQocv 
)

Retrieves the Qocv matrix from a model. Orthogonal loadings Qo from the Y-part of the model, for a selected model dimension, computed from the selected cross validation round. The function fails if the model is not an OPLS/O2PLS model.

Parameters
[in]pModelThe model handle to use
[in]iComponentThe component to use. 1 for component 1 in the model, 2 for component 2 and so on.
[out]pQocvA pointer to the Qocv matrix. Number of rows in matrix = number of components chosen (length of piComponents). Number of columns in matrix = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetQocvSE()

SQ_ErrorCode SQ_GetQocvSE ( SQ_Model  pModel,
int  iComponent,
SQ_VectorData pQocvSE 
)

Retrieves the QocvSE matrix from a model. Standard error of the cross validated loadings qo. The function fails if the model is not an OPLS/O2PLS model. to get the confidence interval, see GetcvSEPercentile(...

Parameters
[in]pModelThe model handle to use
[in]iComponentThe component to use. 1 for component 1 in the model, 2 for component 2 and so on.
[out]pQocvSEA pointer to the QocvSE matrix. Number of rows in matrix = number of components chosen (length of piComponents). Number of columns in matrix = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetR()

SQ_ErrorCode SQ_GetR ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_VectorData pR 
)

Retrieves the R matrix from a model. R is the projection of Uo on X. The function fails if the model is not an OPLS/O2PLS model.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used.
[out]pRA pointer to the R matrix. Number of rows in matrix = number of components chosen (length of piComponents). Number of columns in matrix = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetR2CumProgression()

SQ_ErrorCode SQ_GetR2CumProgression ( SQ_Model  pModel,
SQ_VectorData pR2CumProgression 
)

Retrieves the R2CumProgression matrix from a model. Cumulative R2 for the extracted components, showing the progression of cumulative values for each added orthogonal component in the OPLS model, e.g. 1+0, 1+1, 1+2. The function fails if the model is not a 1+x+0 OPLS model.

Parameters
[in]pModelThe model handle to use
[out]pR2CumProgressionA pointer to the R2CumProgression matrix. Number of rows in matrix = 1 + XSideOrthogonalComponents + XSidePCAComponents. Number of columns in matrix = 1.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetR2VX()

SQ_ErrorCode SQ_GetR2VX ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_VectorData pR2VX 
)

Retrieves the R2VX matrix from a model. The fraction of the variation of the X variables explained by the selected components. The function fails if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component Indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used.
[out]pR2VXA pointer to the R2VX matrix. Number of rows in matrix = number of components chosen (length of piComponents) Number of columns in matrix = number of x-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetR2VXAdj()

SQ_ErrorCode SQ_GetR2VXAdj ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_VectorData pR2VXAdj 
)

Retrieves the R2VXAdj matrix from a model. The fraction of the variation of the X variables explained by the selected components, adjusted for degrees of freedom. (Variance explained by that component). The function fails if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component Indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used.
[out]pR2VXAdjA pointer to the R2VXAdj matrix. Number of rows in matrix = number of components chosen (length of piComponents) Number of columns in matrix = number of x-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetR2VXAdjCum()

SQ_ErrorCode SQ_GetR2VXAdjCum ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_VectorData pR2VXAdjCum 
)

Retrieves the R2VXAdjCum matrix from a model. The cumulative fraction of the variation of the X variables explained after the selected component, adjusted for degrees of freedom. (Cumulative Variance explained after the selected component). The function fails if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component Indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used.
[out]pR2VXAdjCumA pointer to the R2VXAdjCum matrix. Number of rows in matrix = number of components chosen (length of piComponents) Number of columns in matrix = number of x-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetR2VXCum()

SQ_ErrorCode SQ_GetR2VXCum ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_VectorData pR2VXCum 
)

Retrieves the R2VXCum matrix from a model. The cumulative fraction of the variation of the X variables explained after the selected component. The function fails if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component Indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used.
[out]pR2VXCumA pointer to the R2VXCum matrix. Number of rows in matrix = number of components chosen (length of piComponents). Number of columns in matrix = number of x-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetR2VY()

SQ_ErrorCode SQ_GetR2VY ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_VectorData pR2VY 
)

Retrieves the R2VY matrix from a model. The fraction of the variation of the Y variables explained by the selected component. The function fails if the model is not a PLS model or if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component Indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used.
[out]pR2VYA pointer to the R2VY matrix. Number of rows in matrix = number of components chosen (length of piComponents) Number of columns in matrix = number of y-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetR2VYAdj()

SQ_ErrorCode SQ_GetR2VYAdj ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_VectorData pR2VYAdj 
)

Retrieves the R2VYAdj matrix from a model. The fraction of the variation of the Y variables explained by the selected component, adjusted for degrees of freedom. (Variance explained by that component). The function fails if the model is not a PLS model, if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component Indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used.
[out]pR2VYAdjA pointer to the R2VYAdj matrix. Number of rows in matrix = number of components chosen (length of piComponents) Number of columns in matrix = number of y-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetR2VYAdjCum()

SQ_ErrorCode SQ_GetR2VYAdjCum ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_VectorData pR2VYAdjCum 
)

Retrieves the R2VYAdjCum matrix from a model. The cumulative fraction of the variation of the Y variables explained after the selected component, adjusted for degrees of freedom. (Cumulative Variance explained after the selected component). The function fails if the model is not a PLS model, if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component Indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used.
[out]pR2VYAdjCumA pointer to the R2VYAdjCum matrix. Number of rows in matrix = number of components chosen (length of piComponents). Number of columns in matrix = number of y-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetR2VYCum()

SQ_ErrorCode SQ_GetR2VYCum ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_VectorData pR2VYCum 
)

Retrieves the R2VYCum matrix from a model. The cumulative fraction of the variation of the Y variables explained after the selected component. The function fails if the model is not a PLS model or if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component Indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used.
[out]pR2VYCumA pointer to the R2VYCum matrix. Number of rows in matrix = number of components chosen (length of piComponents). Number of columns in matrix = number of y-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetR2X()

SQ_ErrorCode SQ_GetR2X ( SQ_Model  pModel,
SQ_VectorData pR2X 
)

Retrieves the R2X matrix from a model. Fraction of Sum of Squares (SS) of all the X's explained by each component.

Parameters
[in]pModelThe model handle to use
[out]pR2XA pointer to the R2X matrix. Number of rows in matrix = 1. Number of columns in matrix = number of components in the model
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetR2XAdj()

SQ_ErrorCode SQ_GetR2XAdj ( SQ_Model  pModel,
SQ_VectorData pR2XAdj 
)

Retrieves the R2XAdj matrix from a model. Variance of all the X's explained by each component.

Parameters
[in]pModelThe model handle to use
[out]pR2XAdjA pointer to the R2XAdj matrix. Number of rows in matrix = 1. Number of columns in matrix = number of components in the model
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetR2XAdjCum()

SQ_ErrorCode SQ_GetR2XAdjCum ( SQ_Model  pModel,
SQ_VectorData pR2XAdjCum 
)

Retrieves the R2XAdjCum matrix from a model. Cumulative variance of all the X's explained after each extracted component.

Parameters
[in]pModelThe model handle to use
[out]pR2XAdjCumA pointer to the R2XAdjCum matrix. Number of rows in matrix = 1. Number of columns in matrix = number of components in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetR2XCum()

SQ_ErrorCode SQ_GetR2XCum ( SQ_Model  pModel,
SQ_VectorData pR2XCum 
)

Retrieves the R2XCum matrix from a model. Cumulative fraction of Sum of Squares (SS) of all the X's explained after each extracted component.

Parameters
[in]pModelThe model handle to use
[out]pR2XCumA pointer to the R2XCum matrix. Number of rows in matrix = 1. Number of columns in matrix = number of components in the model
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetR2Y()

SQ_ErrorCode SQ_GetR2Y ( SQ_Model  pModel,
SQ_VectorData pR2Y 
)

Retrieves the R2Y matrix from a model. Fraction of Sum of Squares (SS) of all the Y's explained by each component. The function fails if the model is not a PLS model.

Parameters
[in]pModelThe model handle to use
[out]pR2YA pointer to the R2Y matrix. Number of rows in matrix = 1. Number of columns in matrix = number of components in the model
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetR2YAdj()

SQ_ErrorCode SQ_GetR2YAdj ( SQ_Model  pModel,
SQ_VectorData pR2YAdj 
)

Retrieves the R2YAdj matrix from a model. Variance of all the Y's explained by each component. The function fails if the model is not a PLS model.

Parameters
[in]pModelThe model handle to use
[out]pR2YAdjA pointer to the R2YAdj matrix. Number of rows in matrix = 1. Number of columns in matrix = number of components in the model
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetR2YAdjCum()

SQ_ErrorCode SQ_GetR2YAdjCum ( SQ_Model  pModel,
SQ_VectorData pR2YAdjCum 
)

Retrieves the R2YAdjCum matrix from a model. Cumulative variance of all the Y's explained after each extracted component. The function fails if the model is not a PLS model.

Parameters
[in]pModelThe model handle to use
[out]pR2YAdjCumA pointer to the R2YAdjCum matrix. Number of rows in matrix = 1. Number of columns in matrix = number of components in the model
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetR2YCum()

SQ_ErrorCode SQ_GetR2YCum ( SQ_Model  pModel,
SQ_VectorData pR2YCum 
)

Retrieves the R2YCum matrix from a model. Cumulative fraction of Sum of Squares (SS) of all the Y's explained after each extracted component. The function fails if the model is not a PLS model.

Parameters
[in]pModelThe model handle to use
[out]pR2YCumA pointer to the R2YCum matrix. Number of rows in matrix = 1. Number of columns in matrix = number of components in the model
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetRMSEcv()

SQ_ErrorCode SQ_GetRMSEcv ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_VectorData pRMSEcv 
)

Retrieves the RMSEcv matrix from a model. Cross validated root mean square error for observations in the workset. The function fails if the model is not a PLS model or if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component Indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used. For an OPLS model, the last predictive component is the only valid one.
[out]pRMSEcvA pointer to the RMSEcv matrix. Number of rows in matrix = number of components chosen (length of piComponents). Number of columns in matrix = number of y-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetRMSEcvProgression()

SQ_ErrorCode SQ_GetRMSEcvProgression ( SQ_Model  pModel,
SQ_IntVector pColumnYIndices,
SQ_VectorData pRMSEcvProgression 
)

Retrieves the RMSEcvProgression matrix from a model. Root mean square error showing the progression of RMSEcv for each added orthogonal component in the OPLS model, e.g. 1+0, 1+1, 1+2. The function fails if the model is not a 1+x+0 OPLS model.

Parameters
[in]pModelThe model handle to use
[in]pColumnYIndicesA list of Y column indices to use. NULL if all y columns in the model should be used
[out]pRMSEcvProgressionA pointer to the RMSEcvProgression matrix. Number of rows in matrix = 1 + XSideOrthogonalComponents + XSidePCAComponents. Number of columns in matrix = 1.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetRMSEE()

SQ_ErrorCode SQ_GetRMSEE ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_VectorData pRMSEE 
)

Retrieves the RMSEE matrix from a model. Root mean square error of the fit for observations in the workset. The function fails if the model is not a PLS model or if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component Indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used. For an OPLS model, the last predictive component is the only valid one.
[out]pRMSEEA pointer to the RMSEE matrix. Number of rows in matrix = number of components chosen (length of piComponents). Number of columns in matrix = number of y-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetS()

SQ_ErrorCode SQ_GetS ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_VectorData pS 
)

Retrieves the S matrix from a model. S is the projection of To on Y. S contains non-zero entries when the score matrix To is not completely orthogonal to Y. The norm of this matrix is usually very small but is used to enhance the predictions of Y. The function fails if the model is not an OPLS/O2PLS model.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used.
[out]pSA pointer to the S matrix. Number of rows in matrix = number of components chosen (length of piComponents). Number of columns in matrix = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetS2VX()

SQ_ErrorCode SQ_GetS2VX ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_VectorData pS2VX 
)

Retrieves the S2VX matrix from a model. Residual variance of the X variables, after the selected component, scaled as in the workset. Component 0 is the variance of the X variables scaled as in the workset.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used. If NULL is used, the returned matrix will contain the number of components + 1 rows, i.e. the first row will contain the data after 0 components.
[out]pS2VXA pointer to the S2VX matrix. Number of rows in matrix = number of components chosen (length of piComponents). Number of columns in matrix = number of x-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetS2VY()

SQ_ErrorCode SQ_GetS2VY ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_VectorData pS2VY 
)

Retrieves the S2VY matrix from a model. Residual variance of the Y variables, after the selected component, scaled as in the workset. Component 0 is the variance of the Y variables scaled as in the workset. The function fails if the model is not a PLS model,

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used. If NULL is used, the returned matrix will contain the number of components + 1 rows, i.e. the first row will contain the data after 0 components.
[out]pS2VYA pointer to the S2VY matrix. Number of rows in matrix = number of components chosen (length of piComponents). Number of columns in matrix = number of y-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetS2X()

SQ_ErrorCode SQ_GetS2X ( SQ_Model  pModel,
SQ_VectorData pS2X 
)

Retrieves the S2X matrix from a model. The variance of the X matrix. For component number xx,it is the residual variance of X after component xx.

Parameters
[in]pModelThe model handle to use
[out]pS2XA pointer to the S2X matrix. Number of rows in matrix = 1 Number of columns in matrix = number of components in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetS2Y()

SQ_ErrorCode SQ_GetS2Y ( SQ_Model  pModel,
SQ_VectorData pS2Y 
)

Retrieves the S2Y matrix from a model. The variance of the Y matrix. For component number xx, it is the residual variance of Y after component xx. The function fails if the model is not a PLS model.

Parameters
[in]pModelThe model handle to use
[out]pS2YA pointer to the S2Y matrix. Number of rows in matrix = 1 Number of columns in matrix = number of components in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetSDT()

SQ_ErrorCode SQ_GetSDT ( SQ_Model  pModel,
SQ_VectorData pSDT 
)

Retrieves the SDT matrix from a model. Standard deviation of the X scores (t). The function fails if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[out]pSDTA pointer to the SDT matrix. Number of rows in matrix = 1. Number of columns in matrix = number of components in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetSDU()

SQ_ErrorCode SQ_GetSDU ( SQ_Model  pModel,
SQ_VectorData pSDU 
)

Retrieves the SDU matrix from a model. Standard deviation of the Y scores (u). The function fails if the model is not a PLS model or if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[out]pSDUA pointer to the SDU matrix. Number of rows in matrix = 1. Number of columns in matrix = number of components in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetSerrL()

SQ_ErrorCode SQ_GetSerrL ( SQ_Model  pModel,
int  iComponent,
SQ_IntVector pColumnYIndices,
SQ_VectorData pSerrL 
)

Retrieves the SerrL matrix from a model. Lower limit of the Standard error of the predicted response Y for an observation used to fit the model. SerrL is always in original units, i.e. back transformed when the response Y was back transformed. The function fails if the model is not a PLS model, if the model doesn't have any components

Parameters
[in]pModelThe model handle to use
[in]iComponentThe component to use For an OPLS model, the last predictive component is the only valid one.
[in]pColumnYIndicesA list of Y column Indices to use. NULL if all y columns in the model should be used
[out]pSerrLA pointer to the SerrL matrix. Number of rows in matrix = number of y-variables chosen (length of pnColumnYIndices). Number of columns in matrix = number of observations in the model.
See also
SQ_GetColumnYIndexByName
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetSerrU()

SQ_ErrorCode SQ_GetSerrU ( SQ_Model  pModel,
int  iComponent,
SQ_IntVector pColumnYIndices,
SQ_VectorData pSerrU 
)

Retrieves the SerrU matrix from a model. Upper limit of the Standard error of the predicted response Y for an observation used to fit the model. SerrU is always in original units, i.e. back transformed when the response Y was back transformed. The function fails if the model is not a PLS model, if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]iComponentThe component to use For an OPLS model, the last predictive component is the only valid one.
[in]pColumnYIndicesA list of Y column Indices to use. NULL if all y columns in the model should be used
[out]pSerrUA pointer to the SerrU matrix. Number of rows in matrix = number of y-variables chosen (length of pColumnYIndices). Number of columns in matrix = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code
See also
SQ_GetColumnYIndexByName

◆ SQ_GetSignificanceLevel()

SQ_ErrorCode SQ_GetSignificanceLevel ( SQ_Model  pModel,
float *  pfSignificanceLevel 
)

Retrieves the significance level. The significance level is used when computing the critical limits for DModX and the Hotelling's T2 ellipse

Parameters
[in]pModelThe model to use
[out]pfSignificanceLevelA pointer to the significance level. 0.05 means 95% probability.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetSSX()

SQ_ErrorCode SQ_GetSSX ( SQ_Model  pModel,
SQ_VectorData pSSX 
)

Retrieves the SSX matrix from a model. Sum of squares of the X matrix. For component number xx, it is the X residual Sum of Squares after component xx.

Parameters
[in]pModelThe model handle to use
[out]pSSXA pointer to the SSX matrix. Number of rows in matrix = 1. Number of columns in matrix = number of components in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetSSY()

SQ_ErrorCode SQ_GetSSY ( SQ_Model  pModel,
SQ_VectorData pSSY 
)

Retrieves the SSY matrix from a model. Sum of squares of the Y matrix. For component number xx, it is the Y residual Sum of Squares after component xx. The function fails if the model is not a PLS model.

Parameters
[in]pModelThe model handle to use
[out]pSSYA pointer to the SSY matrix. Number of rows in matrix = 1. Number of columns in matrix = number of components in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetStatistics()

SQ_ErrorCode SQ_GetStatistics ( SQ_Model  pModel,
SQ_IntVector pColumnXIndices,
SQ_IntVector pColumnYIndices,
SQ_ModelStatistics pModelStatistics 
)

Displays descriptive statistics on the selected variables.

The statistics are computed on the included observations as specified in the workset of the active model, and on the raw or transformed or trimmed (if specified in the workset) variables. If the model is a DA model (PLS-DA, OPLS-DA, O2PLS-DA) the Statistics will be calculated for all classes, if the model is a regular class model (PCA-Class, PLS-Class etc) the Statistics will be calculated only for the class included in the model.

Parameters
[in]pModelThe model handle to use
[in]pColumnXIndicesA list of X column indices to use. NULL if all x columns in the model should be used
[in]pColumnYIndicesA list of Y column indices to use. NULL if all y columns in the model should be used
[in,out]pModelStatisticsA pointer to the model statistics
Returns
Returns SQ_E_OK if success or an error code
See also
SQ_GetColumnXIndexByName
SQ_GetColumnYIndexByName
SQ_ModelStatistics

◆ SQ_GetT()

SQ_ErrorCode SQ_GetT ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_VectorData pT 
)

Retrieves the T matrix from a model. The scores t, one vector for each model dimension, are new variables, computed as linear combination of the X's. They summarize X, to best approximate X (PC model), and both approximate X and predict Y (PLS model). The function fails if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used.
[out]pTA pointer to the T vector data. Number of rows in vector data = number of components chosen (length of pComponents). Number of columns in vector data = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetT2Crit()

SQ_ErrorCode SQ_GetT2Crit ( SQ_Model  pModel,
int  iComponent,
float  fLevel,
float *  pfT2Crit 
)

Retrieves the T2Crit from a model. The critical limit for T2 for a certain component and probability level. The function fails if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]iComponentIndex of the component to use 1 for component 1 in the model, 2 for component 2 and so on.
[in]fLevelThe probability level, .95 means 95% probability. If -1, the default level from the project is used.
[out]pfT2CritA pointer to the T2Crit result.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetT2Range()

SQ_ErrorCode SQ_GetT2Range ( SQ_Model  pModel,
int  iCompFrom,
int  iCompTo,
SQ_VectorData pT2Range 
)

Retrieves the T2Range matrix from a model. Hotelling T2Range, is a combination of all the scores (t) in the selected range of components. It is a measure of how far away an observation is from the center of a PC or PLS model hyperplane in the selected range of components. If the prediction handle comes from the observation level of a batch project, the results will be T2RangeBCC. T2RangeBCC is a combination of all the scores in the selected range computed at every time point. It is a measure of how far a batch time point is from the average trajectory at the same time point. The function fails if the model doesn't have any components. T2Range for an OPLS model is only valid for component 1 to last (Predictive + X Side orthogonal).

Parameters
[in]pModelThe model handle to use
[in]iCompFromThe first component in the requested range.
[in]iCompToThe last component in the requested range. Use -1 if you want it to be the last component in model. This is the preferred way for OPLS which always requires the last component.
[out]pT2RangeA pointer to the T2Range matrix. Number of rows in matrix = 1. Number of columns in matrix = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetT2RangeCrit()

SQ_ErrorCode SQ_GetT2RangeCrit ( SQ_Model  pModel,
int  iComponentFrom,
int  iComponentTo,
float  fLevel,
float *  pfT2RangeCrit 
)

Retrieves the T2RangeCrit from a model. The critical limit for T2 for a certain component and probability level. The function fails if the model doesn't have any components. T2RangeCrit for an OPLS model is only valid for component 1 to last (Predictive + X Side orthogonal).

Parameters
[in]pModelThe model handle to use
[in]iComponentFromIndex of the first component to use 1 for component 1 in the model, 2 for component 2 and so on.
[in]iComponentToIndex of the second component to use Use -1 if you want it to be the last component in model. This is the preferred way for OPLS which always requires the last component.
[in]fLevelThe probability level, .95 means 95% probability. If -1, the default level from the project is used.
[out]pfT2RangeCritA pointer to the T2Crit result.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetTCorrelation()

SQ_ErrorCode SQ_GetTCorrelation ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_BoolVector pComponentIsPredictiveVector,
SQ_VectorData pTCorr 
)

Retrieves the scores(T) correlation scaled from a model. T(corr) is used to create the Loadings Bi-plot in SIMCA. The function fails if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all predictive components in the model will be used.
[in]pComponentIsPredictiveVectorA bool vector with the same size as the pComponents vector. Set to true for each component that represents a predictive component and to false for the components that represents an orthogonal component. If NULL, the components are assumed to be predictive.
[out]pTCorrA pointer to the T(corr) vector. Number of entries = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetTCrit()

SQ_ErrorCode SQ_GetTCrit ( SQ_Model  pModel,
int  iComponent,
float  fLevel,
float *  pfTCrit 
)

Retrieves the TCrit from a model. The critical limit for T for a certain component and probability level. The axis length on the T2 ellips. The function fails if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]iComponentIndex of the component to use 1 for component 1 in the model, 2 for component 2 and so on.
[in]fLevelThe probability level, .95 means 95% probability. If -1, the default level from the project is used.
[out]pfTCritA pointer to the TCrit result.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetTcv()

SQ_ErrorCode SQ_GetTcv ( SQ_Model  pModel,
int  iComponent,
SQ_VectorData pTcv 
)

Retrieves the Tcv matrix from a model. X score t for the selected model dimension, computed from the selected cross validation round. For PLS/OPLS/O2PLS tcv contains one value per observation and for PCA one value per observation and cross validation round. The function fails if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]iComponentIndex of the component to use 1 for component 1 in the model, 2 for component 2 and so on.
[out]pTcvA pointer to the Tcv matrix. Number of rows in matrix = number of cross-validation rounds set in the project. Number of columns in matrix = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetTcvSE()

SQ_ErrorCode SQ_GetTcvSE ( SQ_Model  pModel,
int  iComponent,
SQ_VectorData pTcvSE 
)

Retrieves the TcvSE matrix from a model. Jack knife standard error of the scores t computed from the cross validations. The function fails if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]iComponentIndex of the component to use 1 for component 1 in the model, 2 for component 2 and so on.
[out]pTcvSEA pointer to the TcvSE matrix. Number of rows in matrix = 1 Number of columns in matrix = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetTcvSEDF()

SQ_ErrorCode SQ_GetTcvSEDF ( SQ_Model  pModel,
int  iComponent,
float *  pfTcvSEDF 
)

The degrees of freedom of TcvSE from a model. The function fails if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]iComponentIndex of the component to use 1 for component 1 in the model, 2 for component 2 and so on.
[out]pfTcvSEDFThe DoF TcvSE.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetTMean()

SQ_ErrorCode SQ_GetTMean ( SQ_Model  pModel,
int  iComponent,
float *  pfTMean 
)

Retrieves the TMean from a model. The function fails if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]iComponentIndex of the component to use 1 for component 1 in the model, 2 for component 2 and so on.
[out]pfTMeanA pointer to the TMean result.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetTo()

SQ_ErrorCode SQ_GetTo ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_VectorData pTo 
)

Retrieves the To matrix from a model. Scores that summarizes the X variation orthogonal to Y. The function fails if the model is not an O2PLS or OPLS model.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components should be used.
[out]pToA pointer to the To matrix. Number of rows in matrix = number of components chosen (length of piComponents). Number of columns in matrix = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetToCorr()

SQ_ErrorCode SQ_GetToCorr ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_BoolVector pComponentIsPredictiveVector,
SQ_VectorData pToCorr 
)

Retrieves the ToCorr matrix from a model. Scores scaled as correlation coefficients that summarizes the X variation orthogonal to Y. The function fails if the model is not an O2PLS or OPLS model.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all predictive components in the model will be used.
[in]pComponentIsPredictiveVectorA bool vector with the same size as the pComponents vector. Set to true for each component that represents a predictive component and to false for the components that represents an orthogonal component. If NULL, the components are assumed to be predictive.tocorr
[out]pToCorrA pointer to the ToCorr results. Number of rows in matrix = number of components chosen (length of pComponents). Number of columns in matrix = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetToCrit()

SQ_ErrorCode SQ_GetToCrit ( SQ_Model  pModel,
int  iComponent,
float  fLevel,
float *  pfTCrit 
)

Retrieves the ToCrit from a model. The critical limit for To for a certain orthogonal component and probability level. The function fails for non OPLS models.

Parameters
[in]pModelThe model handle to use
[in]iComponentthe orthogonal component to use
[in]fLevelThe probability level, .95 means 95% probability. If -1, the default level from the project is used.
[out]pfTCritA pointer to the TCrit result.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetTocv()

SQ_ErrorCode SQ_GetTocv ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_VectorData pTocv 
)

Retrieves the Tocv matrix from a model. Cross validated scores that summarizes the X variation orthogonal to Y. The function fails if the model is not an O2PLS or OPLS model.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components should be used.
[out]pTocvA pointer to the Tocv matrix. Number of rows in matrix = number of components chosen (length of piComponents). Number of columns in matrix = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetTocvSE()

SQ_ErrorCode SQ_GetTocvSE ( SQ_Model  pModel,
int  iComponent,
SQ_VectorData pTocvSE 
)

Retrieves the TocvSE matrix from a model. Standard error of the cross validated scores orthogonal to Y. The function fails if the model is not an O2PLS or OPLS model.

Parameters
[in]pModelThe model handle to use
[in]iComponentThe component to use. 1 for component 1 in the model, 2 for component 2 and so on.
[out]pTocvSEA pointer to the TocvSE matrix. Number of rows in matrix = number of components chosen (length of piComponents). Number of columns in matrix = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetTStandardDeviation()

SQ_ErrorCode SQ_GetTStandardDeviation ( SQ_Model  pModel,
int  iComponent,
float *  pfDF,
float *  pfTStdev 
)

Retrieves the TStandardDeviation and degrees of freedom from a model. Standard deviation of the X scores (t) for each component. The function fails if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]iComponentIndex of the component to use 1 for component 1 in the model, 2 for component 2 and so on.
[out]pfDFThe degrees of freedom
[out]pfTStdevA pointer to the T standard deviation result.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetU()

SQ_ErrorCode SQ_GetU ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_VectorData pU 
)

Retrieves the U matrix from a model. The u scores, one vector for each model dimension, are new variables summarizing Y so as to maximizes the correlation with the scores t. The function fails if the model is not a PLS model or if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used.
[out]pUA pointer to the U matrix. Number of rows in matrix = number of components chosen (length of piComponents). Number of columns in matrix = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetUcv()

SQ_ErrorCode SQ_GetUcv ( SQ_Model  pModel,
SQ_IntVector pCompontentsList,
SQ_VectorData pUcv 
)

Retrieves the Ucv matrix from a model. Y score u for the selected model dimension, computed from the selected cross validation rounds. The function fails if the model is not a OPLS model.

Parameters
[in]pModelThe model handle to use
[in]pCompontentsListA list of predictive components to use. NULL if all Y components in the model should be used
[out]pUcvA pointer to the Ucv matrix. Number of rows in matrix = number of predictive components. Number of columns in matrix = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetUo()

SQ_ErrorCode SQ_GetUo ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_VectorData pUo 
)

Retrieves the Uo matrix from a model. Scores that summarizes the Y variation orthogonal to X. The function fails if the model is not an OPLS/O2PLS model.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used.
[out]pUoA pointer to the Uo matrix. Number of rows in matrix = number of components chosen (length of piComponents). Number of columns in matrix = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetUocv()

SQ_ErrorCode SQ_GetUocv ( SQ_Model  pModel,
SQ_IntVector pYCompontentsList,
SQ_VectorData pUocv 
)

Retrieves the Uocv matrix from a model. Orthogonal Y score uo of the Y-part of the OPLS model, computed from the selected cross validation rounds. The function fails if the model is not a OPLS model or if the model doesn't have any Y side orthogonal components.

Parameters
[in]pModelThe model handle to use
[in]pYCompontentsListA list of Y side orthogonal components to use. NULL if all Y components in the model should be used
[out]pUocvA pointer to the Uocv matrix. Number of rows in matrix = number of predictive components. Number of columns in matrix = number of y-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetVIP()

SQ_ErrorCode SQ_GetVIP ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pVIP 
)

Retrieves the VIP matrix from a model. The influence on all the Y's (all responses) of every term (xk) in the model. Term with VIP>1 have an above average influence on Y. The function fails if the model is not a PLS model or if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used. For an OPLS model, the last predictive component is the only valid one.
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is true the returned matrix will be back transformed to the original domain.
[out]pVIPA pointer to the VIP matrix. Number of rows in matrix = number of components chosen (length of piComponents). Number of columns in matrix = number of x-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetVIPCI()

SQ_ErrorCode SQ_GetVIPCI ( SQ_Model  pModel,
int  iComponent,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pVIPCI 
)

Retrieves the VIPCI matrix from a model. The confidence interval for VIP. The function fails if the model is not a PLS model or if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]iComponentIndex of the component to use For an OPLS model, the last predictive component is the only valid one.
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is true the returned matrix will be back transformed to the original domain.
[out]pVIPCIA pointer to the VIPCI matrix. Number of rows in matrix = 1. Number of columns in matrix = number of x-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetVIPcv()

SQ_ErrorCode SQ_GetVIPcv ( SQ_Model  pModel,
int  iComponent,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pVIPcv 
)

Retrieves the VIPcv matrix from a model. The VIP, computed from all the cross validation rounds in the model. The function fails if the model is not a PLS model or if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]iComponentIndex of the component to use For an OPLS model, the last predictive component is the only valid one.
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is true the returned matrix will be back transformed to the original domain.
[out]pVIPcvA pointer to the VIPcv matrix. Number of rows in matrix = number of cross-validation rounds in the model. Number of columns in matrix = number of x-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetVIPcvSE()

SQ_ErrorCode SQ_GetVIPcvSE ( SQ_Model  pModel,
int  iComponent,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pVIPcvSE 
)

Retrieves the VIPcvSE matrix from a model. The jack knife standard error of the VIP computed from the cross validations. The function fails if the model is not a PLS model or if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]iComponentIndex of the component to use For an OPLS model, the last predictive component is the only valid one.
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is true the returned matrix will be back transformed to the original domain.
[out]pVIPcvSEA pointer to the VIPcvSE matrix. Number of rows in matrix = 1 Number of columns in matrix = number of x-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetVIPLag()

SQ_ErrorCode SQ_GetVIPLag ( SQ_Model  pModel,
int  iComponent,
int  iColumnXIndex,
SQ_VectorData pVIPLag 
)

Retrieves the VIPLag matrix from a model. VIP of a lagged variable as a function of the Lags. The function fails if the model is not a PLS model or if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]iComponentThe component to use For an OPLS model, the last predictive component is the only valid one.
[in]iColumnXIndexThe index of X column to use
[out]pVIPLagA pointer to the VIPLag matrix. Number of rows in matrix = 1. Number of columns in matrix = number of lagged variables in the model.
Returns
Returns SQ_E_OK if success or an error code
See also
SQ_GetColumnXIndexByName

◆ SQ_GetVIPOrthogonal()

SQ_ErrorCode SQ_GetVIPOrthogonal ( SQ_Model  pModel,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pVIP 
)

Get orthogonal VIP matrix from an OPLS model.

Parameters
[in]pModelThe model handle to use
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is true the returned matrix will be back transformed to the original domain.
[out]pVIPA pointer to the VIP matrix Number of rows in matrix = number of components in the model.

◆ SQ_GetVIPOrthogonalLag()

SQ_ErrorCode SQ_GetVIPOrthogonalLag ( SQ_Model  pModel,
int  iColumnXIndex,
SQ_VectorData pVIPLag 
)

Retrieves the orthogonal VIPLag matrix from a model. VIP of a lagged variable as a function of the Lags. The function fails if the model is not a OPLS model or if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]iColumnXIndexThe index of X column to use
[out]pVIPLagA pointer to the VIPLag matrix. Number of rows in matrix = 1. Number of columns in matrix = number of lagged variables in the model.
Returns
Returns SQ_E_OK if success or an error code
See also
SQ_GetColumnXIndexByName

◆ SQ_GetVIPPredictive()

SQ_ErrorCode SQ_GetVIPPredictive ( SQ_Model  pModel,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pVIP 
)

Get predictive VIP matrix from an OPLS model.

Parameters
[in]pModelThe model handle to use
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is true the returned matrix will be back transformed to the original domain.
[out]pVIPA pointer to the VIP matrix Number of rows in matrix = number of components in the model.

◆ SQ_GetVIPPredictiveLag()

SQ_ErrorCode SQ_GetVIPPredictiveLag ( SQ_Model  pModel,
int  iColumnXIndex,
SQ_VectorData pVIPLag 
)

Retrieves the predictive VIPLag matrix from a model. VIP of a lagged variable as a function of the Lags. The function fails if the model is not a OPLS model or if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]iColumnXIndexThe index of X column to use
[out]pVIPLagA pointer to the VIPLag matrix. Number of rows in matrix = 1. Number of columns in matrix = number of lagged variables in the model.
Returns
Returns SQ_E_OK if success or an error code
See also
SQ_GetColumnXIndexByName

◆ SQ_GetW()

SQ_ErrorCode SQ_GetW ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pW 
)

Retrieves the W matrix from a model. The Weights that combine the X variables (1st dimension) or their residuals (subsequent dimensions) to form the scores t. These weights are selected to maximize the correlation between t and u. Large w's indicate high correlation with u (Y). The function fails if the model is not a PLS model or if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used.
[in]pComponentsA list of component indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used.
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is SQ_True the returned matrix will be back transformed to the original domain.
[out]pWA pointer to the W matrix. Number of rows in matrix = number of components chosen (length of pComponents). Number of columns in matrix = number of x-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetWcv()

SQ_ErrorCode SQ_GetWcv ( SQ_Model  pModel,
int  iComponent,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pWcv 
)

Retrieves the Wcv matrix from a model. The w weights for a selected model dimension, computed from all the cross validation rounds. The function fails if the model is not a PLS model or if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use 1 for component 1 in the model, 2 for component 2 and so on.
[in]iComponentIndex of the component to use 1 for component 1 in the model, 2 for component 2 and so on.
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is SQ_True the returned matrix will be back transformed to the original domain.
[out]pWcvA pointer to the Wcv matrix. Number of rows in matrix = number of cross-validation rounds. Number of columns in matrix = number of x-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetWcvSE()

SQ_ErrorCode SQ_GetWcvSE ( SQ_Model  pModel,
int  iComponent,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pWcvSE 
)

Retrieves the WcvSE matrix from a model. The jack knife standard error of the weights w computed from the cross validations. The function fails if the model is not a PLS model or if the model doesn't have any components. to get the confidence interval, see GetcvSEPercentile(...

Parameters
[in]pModelThe model handle to use 1 for component 1 in the model, 2 for component 2 and so on.
[in]iComponentIndex of the component to use 1 for component 1 in the model, 2 for component 2 and so on.
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is true the returned matrix will be back transformed to the original domain.
[out]pWcvSEA pointer to the WcvSE matrix. Number of rows in matrix = 1 Number of columns in matrix = number of x-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetWcvSEDF()

SQ_ErrorCode SQ_GetWcvSEDF ( SQ_Model  pModel,
int  iComponent,
float *  pfWcvSEDF 
)

Retrieves the degrees of freedom of WcvSE from a model.

The function fails if the model is not a PLS model or if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]iComponentIndex of the component to use 1 for component 1 in the model, 2 for component 2 and so on.
[out]pfWcvSEDFThe DoF of WcvSE.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetWLag()

SQ_ErrorCode SQ_GetWLag ( SQ_Model  pModel,
int  iComponent,
int  iColumnXIndex,
SQ_VectorData pWLag 
)

Retrieves the WLag matrix from a model. Weights w of a lagged variable as a function of the Lags. The function fails if the model is not a PLS model or if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]iComponentThe component to use 1 for component 1 in the model, 2 for component 2 and so on.
[in]iColumnXIndexThe index of X column to use
[out]pWLagA pointer to the WLag matrix. Number of rows in matrix = 1. Number of columns in matrix = number of lagged variables in the model.
Returns
Returns SQ_E_OK if success or an error code
See also
SQ_GetColumnXIndexByName

◆ SQ_GetWo()

SQ_ErrorCode SQ_GetWo ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pWo 
)

Retrieves the Wo matrix from a model. Weights that combine the X variables (first dimension) or the X residuals (subsequent dimensions) to form the scores To. These weights are selected so as to minimize the correlation between To and U, thereby indirectly between To and Y. The function fails if the model is not an OPLS/O2PLS model.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components should be used.
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is true the returned matrix will be back transformed to the original domain.
[out]pWoA pointer to the Wo matrix. Number of rows in matrix = number of components chosen (length of piComponents). Number of columns in matrix = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetWocv()

SQ_ErrorCode SQ_GetWocv ( SQ_Model  pModel,
int  iComponent,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pWocv 
)

Retrieves the Wocv matrix from a model. Orthogonal weights Wo from the X-part of the model, for a selected model dimension, computed from the selected cross validation round. The function fails if the model is not an OPLS/O2PLS model.

Parameters
[in]pModelThe model handle to use
[in]iComponentThe component to use. 1 for component 1 in the model, 2 for component 2 and so on.
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is true the returned matrix will be back transformed to the original domain.
[out]pWocvA pointer to the Wocv matrix. Number of rows in matrix = number of components chosen (length of piComponents). Number of columns in matrix = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetWocvSE()

SQ_ErrorCode SQ_GetWocvSE ( SQ_Model  pModel,
int  iComponent,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pWocvSE 
)

Retrieves the WocvSE matrix from a model. Standard error of the cross validated weights wo. The function fails if the model is not an OPLS/O2PLS model. to get the confidence interval, see GetcvSEPercentile(...

Parameters
[in]pModelThe model handle to use
[in]iComponentThe component to use. 1 for component 1 in the model, 2 for component 2 and so on.
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is true the returned matrix will be back transformed to the original domain.
[out]pWocvSEA pointer to the WocvSE matrix. Number of rows in matrix = number of components chosen (length of piComponents). Number of columns in matrix = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetWStar()

SQ_ErrorCode SQ_GetWStar ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pWStar 
)

Retrieves the W* matrix from a model. The Weights that combine the original X's (not their residuals) to form the scores t. In the first dimension w =w*. X variables with large w* are highly correlated with u and (Y). The function fails if the model is not a PLS model or if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used.
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is True the returned matrix will be back transformed to the original domain.
[out]pWStarA pointer to the WStar matrix. Number of rows in matrix = number of components chosen (length of pComponents). Number of columns in matrix = number of x-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetWStarC()

SQ_ErrorCode SQ_GetWStarC ( SQ_Model  pModel,
SQ_IntVector pComponents,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pWStarC 
)

Retrieves the W*C matrix from a model. Combined weights w* and c (see w* and c). The function fails if the model is not a PLS model or if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]pComponentsA list of component indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used.
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is True the returned matrix will be back transformed to the original domain.
[out]pWStarCA pointer to the WStarC matrix. Number of rows in matrix = number of components chosen (length of piComponents). Number of columns in matrix = number of x-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetWStarCcvSE()

SQ_ErrorCode SQ_GetWStarCcvSE ( SQ_Model  pModel,
int  iComponent,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pWStarCcvSE 
)

Retrieves the WStarCcvSE matrix from a model. The jack knife standard error of the w* and c weights computed from the cross validations. The function fails if the model is not a PLS model or if the model doesn't have any components. to get the confidence interval, see GetcvSEPercentile(...

Parameters
[in]pModelThe model handle to use
[in]iComponentIndex of the component to use 1 for component 1 in the model, 2 for component 2 and so on.
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is true the returned matrix will be back transformed to the original domain.
[out]pWStarCcvSEA pointer to the WStarCcvSE matrix. Number of rows in matrix = 1 Number of columns in matrix = number of x-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetWStarcv()

SQ_ErrorCode SQ_GetWStarcv ( SQ_Model  pModel,
int  iComponent,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pWStarcv 
)

Retrieves the WStarcv matrix from a model. The w* weights for a selected model dimension, computed from all the cross validation rounds. The function fails if the model is not a PLS model or if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]iComponentIndex of the component to use 1 for component 1 in the model, 2 for component 2 and so on.
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is true the returned matrix will be back transformed to the original domain.
[out]pWStarcvA pointer to the WStarcv matrix. Number of rows in matrix = number of cross-validation rounds. Number of columns in matrix = number of x-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetWStarcvSE()

SQ_ErrorCode SQ_GetWStarcvSE ( SQ_Model  pModel,
int  iComponent,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pWStarcvSE 
)

Retrieves the WStarcvSE matrix from a model. The jack knife standard error of the weights w* computed from the cross validations. The function fails if the model is not a PLS model or if the model doesn't have any components. to get the confidence interval, see GetcvSEPercentile(...

Parameters
[in]pModelThe model handle to use
[in]iComponentIndex of the component to use 1 for component 1 in the model, 2 for component 2 and so on.
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is true the returned matrix will be back transformed to the original domain.
[out]pWStarcvSEA pointer to the WStarcvSE matrix. Number of rows in matrix = 1 Number of columns in matrix = number of x-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetWStarcvSEDF()

SQ_ErrorCode SQ_GetWStarcvSEDF ( SQ_Model  pModel,
int  iComponent,
float *  pfWStarcvSEDF 
)

Retrieves the Degrees of freedom for WStarcvSE from a model.

The function fails if the model is not a PLS model or if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]iComponentIndex of the component to use 1 for component 1 in the model, 2 for component 2 and so on.
[out]pfWStarcvSEDFthe DoF of WStarcvSE.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetWStarLag()

SQ_ErrorCode SQ_GetWStarLag ( SQ_Model  pModel,
int  iComponent,
int  iColumnXIndex,
SQ_VectorData pWStarLag 
)

Retrieves the WStarLag matrix from a model. Weights w* of a lagged variable as a function of the Lags. The function fails if the model is not a PLS model or if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]iComponentThe component to use 1 for component 1 in the model, 2 for component 2 and so on.
[in]iColumnXIndexThe index of X column to use
[out]pWStarLagA pointer to the WStarLag matrix. Number of rows in matrix = 1. Number of columns in matrix = number of lagged variables in the model.
Returns
Returns SQ_E_OK if success or an error code
See also
SQ_GetColumnXIndexByName

◆ SQ_GetXObs()

SQ_ErrorCode SQ_GetXObs ( SQ_Model  pModel,
SQ_UnscaledState  bUnscaled,
SQ_BacktransformedState  bBackTransformed,
SQ_IntVector pObservations,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pXObs 
)

Retrieves the XObs matrix from a model. The X part of an observation in the workset, in original units. The function fails if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]bUnscaledIf True, the function will return the x-values in the (unscaled) metric of the dataset. If False, the returned x-values will be in the scaled and centered metric of the workset. Note that if bBackTransformed is False, the x-values will still be transformed. Note also that if bBackTransformed is True, this parameter is ignored. In this case x-values will always be unscaled.
[in]bBackTransformedIf True, the function will return the x-values in the unscaled untransformed metric of the workset. If False the returned x-values will be transformed in the same way as the workset. Note that if this variable is True, the returned x-values will always be unscaled irrespective of the value of bUnscaled.
[in]pObservationsA list of observation indices that exist in the model, NULL if all observations that exist in the model should be used.
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is True the returned matrix will be back transformed to the original domain.
[out]pXObsA pointer to the pXObs matrix. Number of rows in matrix = number of observations chosen (length of pnObservationList). Number of columns in matrix = number of x-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetXObsPred()

SQ_ErrorCode SQ_GetXObsPred ( SQ_Model  pModel,
int  iComponent,
SQ_UnscaledState  bUnscaled,
SQ_BacktransformedState  bBackTransformed,
SQ_IntVector pObservations,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pXObsPred 
)

Retrieves the XObsPred matrix from a model. A reconstructed observation as X=TP? from the training set The function fails if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]iComponentThe number of the component in the model we want the results from For an OPLS model, the last predictive component is the only valid one.
[in]bUnscaledIf true, the function will return the x-values in the (unscaled) metric of the dataset. If false, the returned x-values will be in the scaled and centered metric of the workset. Note that if bBackTransformed is false, the x-values will still be transformed. Note also that if bBackTransformed is true, this parameter is ignored. In this case x-values will always be unscaled.
[in]bBackTransformedIf true, the function will return the x-values in the unscaled untransformed metric of the workset. If false the returned x-values will be transformed in the same way as the workset. Note that if this variable is true, the returned x-values will always be unscaled irrespective of the value of bUnscaled.
[in]pObservationsA list of observation Indices that exist in the model, NULL if all observations that exist in the model should be used.
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is true the returned matrix will be back transformed to the original domain.
[out]pXObsPredA pointer to the pXObsPred matrix. Number of rows in matrix = number of observations chosen (length of pnObservationList). Number of columns in matrix = number of x-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetXObsRes()

SQ_ErrorCode SQ_GetXObsRes ( SQ_Model  pModel,
int  iComponent,
SQ_UnscaledState  bUnscaled,
SQ_BacktransformedState  bBackTransformed,
SQ_IntVector pObservations,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pXObsRes 
)

Retrieves the XObsRes matrix from a model. The residuals of an X observation in the workset, in original units. The function fails if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]iComponentThe number of the component in the model we want the results from For an OPLS model, the last predictive component is the only valid one.
[in]bUnscaledIf True, the function will return the residuals in the (unscaled) metric of the dataset. If False, the returned residuals will be in the scaled and centered metric of the workset. Note that if bBackTransformed is False, the residuals will still be transformed. Note also that if bBackTransformed is True, this parameter is ignored. In this case residuals will always be unscaled.
[in]bBackTransformedIf True, the function will return the residuals in the unscaled untransformed metric of the workset. If False the returned residuals will be transformed in the same way as the workset. Note that if this variable is True, the returned residuals will always be unscaled irrespective of the value of bUnscaled.
[in]pObservationsA list of observation indices that exist in the model, NULL if all observations that exist in the model should be used.
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is True the returned matrix will be back transformed to the original domain.
[out]pXObsResA pointer to the pXObsRes matrix. Number of rows in matrix = number of observations chosen (length of pnObservationList). Number of columns in matrix = number of x-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetXOffsets()

SQ_ErrorCode SQ_GetXOffsets ( SQ_Model  pModel,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pXOffsets 
)

Retrieves the XOffsets matrix from a model. (Xavg in SIMCA) The center of X variables, as specified, in original units. When the variable is UV scaled the center is the variable average. If the variable is transformed, the center is in the transformed metric.

Parameters
[in]pModelThe model handle to use
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is True the returned matrix will be back transformed to the original domain.
[out]pXOffsetsA pointer to the XOffsets matrix. Number of rows in matrix = 1. Number of columns in matrix = number of x-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetXVar()

SQ_ErrorCode SQ_GetXVar ( SQ_Model  pModel,
SQ_UnscaledState  bUnscaled,
SQ_BacktransformedState  bBackTransformed,
SQ_IntVector pColumnXIndices,
SQ_VectorData pXVar 
)

Retrieves the XVar matrix from a model. X variable from the workset, in original units.

Parameters
[in]pModelThe model handle to use
[in]bUnscaledIf True, the function will return the x-values in the (unscaled) metric of the dataset. If False, the returned x-values will be in the scaled and centered metric of the workset. Note that if bBackTransformed is False, the x-values will still be transformed. Note also that if bBackTransformed is True, this parameter is ignored. In this case x-values will always be unscaled.
[in]bBackTransformedIf True, the function will return the x-values in the unscaled untransformed metric of the workset. If False the returned x-values will be transformed in the same way as the workset. Note that if this variable is True, the returned x-values will always be unscaled irrespective of the value of bUnscaled.
[in]pColumnXIndicesA list of X column indices to use. NULL if all x columns in the model should be used
[out]pXVarA pointer to the XVar matrix. Number of rows in matrix = number of x-variables chosen (length of pnColumnXIndices). Number of columns in matrix = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code
See also
SQ_GetColumnXIndexByName

◆ SQ_GetXVarPred()

SQ_ErrorCode SQ_GetXVarPred ( SQ_Model  pModel,
int  iComponent,
SQ_IntVector pColumnXIndices,
SQ_UnscaledState  bUnscaled,
SQ_BacktransformedState  bBackTransformed,
SQ_VectorData pXVarPred 
)

Retrieves the XVarPred matrix from a model. For PLS and PCA models, X variables, from the training set, reconstructed as X=TP'. For OPLS/O2PLS models it is the X-values predicted from from the given Y-values. The function fails if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]iComponentThe component to use For an OPLS model, the last predictive component is the only valid one.
[in]pColumnXIndicesA list of X column indices to use. NULL if all x columns in the model should be used
[in]bUnscaledIf True, the function will return the residuals in the (unscaled) metric of the dataset. If False, the returned residuals will be in the scaled and centered metric of the workset. Note that if bBackTransformed is False, the residuals will still be transformed. Note also that if bBackTransformed is True, this parameter is ignored. In this case residuals will always be unscaled.
[in]bBackTransformedIf True, the function will return the residuals in the unscaled untransformed metric of the workset. If False the returned residuals will be transformed in the same way as the workset. Note that if this variable is True, the returned residuals will always be unscaled irrespective of the value of bUnscaled.
[out]pXVarPredA pointer to the XVarPred matrix. Number of rows in matrix = number of x-variables chosen (length of pnColumnXIndices). Number of columns in matrix = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code
See also
SQ_GetColumnXIndexByName

◆ SQ_GetXVarRes()

SQ_ErrorCode SQ_GetXVarRes ( SQ_Model  pModel,
int  iComponent,
SQ_IntVector pColumnXIndices,
SQ_UnscaledState  bUnscaled,
SQ_BacktransformedState  bBackTransformed,
SQ_StandardizedState  bStandardized,
SQ_VectorData pXVarRes 
)

Retrieves the XVarRes matrix from a model. X Variable residuals unscaled, i.e. original units, for observations in the workset.

Parameters
[in]pModelThe model handle to use
[in]iComponentThe component to use For an OPLS model, the last predictive component and zero are the only valid ones.
[in]pColumnXIndicesA list of X column indices to use. NULL if all x columns in the model should be used
[in]bUnscaledIf True, the function will return the residuals in the (unscaled) metric of the dataset. If False, the returned residuals will be in the scaled and centered metric of the workset. Note that if bBackTransformed is False, the residuals will still be transformed. Note also that if bBackTransformed is True, this parameter is ignored. In this case residuals will always be unscaled.
[in]bBackTransformedIf True, the function will return the residuals in the unscaled untransformed metric of the workset. If False the returned residuals will be transformed in the same way as the workset. Note that if this variable is True, the returned residuals will always be unscaled irrespective of the value of bUnscaled.
[in]bStandardizedIf True, the function will use the standardized residuals (the unscaled residuals divided by their standard deviation).
[out]pXVarResA pointer to the XVarRes matrix. Number of rows in matrix = number of x-variables chosen (length of pnColumnXIndices). Number of columns in matrix = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code
See also
SQ_GetColumnXIndexByName

◆ SQ_GetXVarResO2PLS()

SQ_ErrorCode SQ_GetXVarResO2PLS ( SQ_Model  pModel,
int  iPredComponent,
int  iXSideOrthoComponent,
int  iYSideOrthoComponent,
SQ_UnscaledState  bUnscaled,
SQ_BacktransformedState  bBackTransformed,
SQ_StandardizedState  bStandardized,
SQ_IntVector pColumnXIndices,
SQ_VectorData pXVarResO2PLS 
)

Retrieves the XVarResO2PLS matrix from a model. The function is only available for O2PLS models that have X-Side orthogonal components.

Parameters
[in]pModelThe model handle to use
[in]iPredComponentThe predictive component to use. 1 for component 1 in the model, 2 for component 2 and so on.
[in]iXSideOrthoComponentThe orthogonal component to use. 1 for component 1 in the model, 2 for component 2 and so on.
[in]iYSideOrthoComponentThe unrelated to X component to use. 1 for component 1 in the model, 2 for component 2 and so on.
[in]bUnscaledIf True, the function will return the x-values in the (unscaled) metric of the dataset. If False, the returned x-values will be in the scaled and centered metric of the workset. Note that if bBackTransformed is False, the x-values will still be transformed. Note also that if bBackTransformed is True, this parameter is ignored. In this case x-values will always be unscaled.
[in]bBackTransformedIf True, the function will return the x-values in the unscaled untransformed metric of the workset. If False the returned x-values will be transformed in the same way as the workset. Note that if this variable is True, the returned x-values will always be unscaled irrespective of the value of bUnscaled.
[in]bStandardizedIf True, the function will return the standardized residuals (the unscaled residuals divided by their standard deviation).
[in]pColumnXIndicesA list of X column Indices to use. NULL if all X columns in the model should be used
[out]pXVarResO2PLSA pointer to the XVarResO2PLS matrix. Number of rows in matrix = number of components chosen (length of piComponents). Number of columns in matrix = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetXVarResYRelated()

SQ_ErrorCode SQ_GetXVarResYRelated ( SQ_Model  pModel,
SQ_UnscaledState  bUnscaled,
SQ_BacktransformedState  bBackTransformed,
SQ_StandardizedState  bStandardized,
SQ_IntVector pColumnXIndices,
SQ_VectorData pXVarResYRelated 
)

Retrieves the XVarResYRelated matrix from a model. The estimated pure profiles of the underlying constituents in X under the assumption of additive Y-variables. Estimation includes a linear transformation of the Coefficient matrix, Bp(BpTBp)-1, where Bp is the Coefficient matrix using only the predictive components to compute the Coefficient matrix (i.e., the components orthogonal to Y are not included in the computation of Bp). The function fails if the model is not an OPLS/O2PLS model.

Parameters
[in]pModelThe model handle to use
[in]bUnscaledIf True, the function will return the x-values in the (unscaled) metric of the dataset. If False, the returned x-values will be in the scaled and centered metric of the workset. Note that if bBackTransformed is False, the x-values will still be transformed. Note also that if bBackTransformed is True, this parameter is ignored. In this case x-values will always be unscaled.
[in]bBackTransformedIf True, the function will return the x-values in the unscaled untransformed metric of the workset. If False the returned x-values will be transformed in the same way as the workset. Note that if this variable is True, the returned x-values will always be unscaled irrespective of the value of bUnscaled.
[in]bStandardizedIf True, the function will return the standardized residuals (the unscaled residuals divided by their standard deviation).
[in]pColumnXIndicesA list of X column Indices to use. NULL if all X columns in the model should be used
[out]pXVarResYRelatedA pointer to the XVarResYRelated matrix. Number of rows in matrix = number of components chosen (length of piComponents). Number of columns in matrix = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetXWeights()

SQ_ErrorCode SQ_GetXWeights ( SQ_Model  pModel,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pXWeights 
)

Retrieves the XWeights matrix from a model. Scaling weights of the X Variables.

Parameters
[in]pModelThe model handle to use
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is True the returned matrix will be back transformed to the original domain.
[out]pXWeightsA pointer to the XWeights matrix. Number of rows in matrix = 1. Number of columns in matrix = number of x-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetYObs()

SQ_ErrorCode SQ_GetYObs ( SQ_Model  pModel,
SQ_UnscaledState  bUnscaled,
SQ_BacktransformedState  bBackTransformed,
SQ_IntVector pObservations,
SQ_VectorData pYObs 
)

Retrieves the YObs matrix from a model. The Y part of an observation in the workset, in original units. The function fails if the model is not a PLS model, if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]bUnscaledIf True, the function will return the y-values in the (unscaled) metric of the dataset. If False, the returned y-values will be in the scaled and centered metric of the workset. Note that if bBackTransformed is False, the y-values will still be transformed. Note also that if bBackTransformed is True, this parameter is ignored. In this case y-values will always be unscaled.
[in]bBackTransformedIf True, the function will return the y-values in the unscaled untransformed metric of the workset. If False the returned y-values will be transformed in the same way as the workset. Note that if this variable is True, the returned y-values will always be unscaled irrespective of the value of bUnscaled.
[in]pObservationsA list of observation indices that exist in the model, NULL if all observations that exist in the model should be used.
[out]pYObsA pointer to the pYObs matrix. Number of rows in matrix = number of observations chosen (length of pnObservationList). Number of columns in matrix = number of y-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetYObsRes()

SQ_ErrorCode SQ_GetYObsRes ( SQ_Model  pModel,
int  iComponent,
SQ_UnscaledState  bUnscaled,
SQ_BacktransformedState  bBackTransformed,
SQ_IntVector pObservations,
SQ_VectorData pYObsRes 
)

Retrieves the YObsRes matrix from a model. The residuals of a Y observation in the workset, in original units. The function fails if the model is not a PLS model.

Parameters
[in]pModelThe model handle to use
[in]iComponentThe number of the component in the model we want the results from
[in]bUnscaledIf True, the function will return the residuals in the (unscaled) metric of the dataset. If False, the returned residuals will be in the scaled and centered metric of the workset. Note that if bBackTransformed is False, the residuals will still be transformed. Note also that if bBackTransformed is True, this parameter is ignored. In this case residuals will always be unscaled.
[in]bBackTransformedIf True, the function will return the residuals in the unscaled untransformed metric of the workset. If False the returned residuals will be transformed in the same way as the workset. Note that if this variable is True, the returned residuals will always be unscaled irrespective of the value of bUnscaled.
[in]pObservationsA list of observation indices that exist in the model, NULL if all observations that exist in the model should be used.
[out]pYObsResA pointer to the pYObsRes matrix. Number of rows in matrix = number of observations chosen (length of pnObservationList). Number of columns in matrix = number of y-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetYOffsets()

SQ_ErrorCode SQ_GetYOffsets ( SQ_Model  pModel,
SQ_VectorData pYOffsets 
)

Retrieves the YOffsets matrix from a model. The center of Y variables, as specified, in original units. When the variable is UV scaled the center is the variable average. If the variable is transformed, the center is in the transformed metric. The function fails if the model is not a PLS model.

Parameters
[in]pModelThe model handle to use
[out]pYOffsetsA pointer to the YOffsets matrix. Number of rows in matrix = 1. Number of columns in matrix = number of y-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetYPred()

SQ_ErrorCode SQ_GetYPred ( SQ_Model  pModel,
int  iComponent,
SQ_UnscaledState  bUnscaled,
SQ_BacktransformedState  bBackTransformed,
SQ_IntVector pColumnYIndices,
SQ_VectorData pYPred 
)

Retrieves the YPred matrix from a model. Predicted values of Y variables for observations in the workset, used to fit the model. The function fails if the model is not a PLS model.

Parameters
[in]pModelThe model handle to use
[in]iComponentThe component to use For an OPLS model, the last predictive component or zero are the only valid ones.
[in]bUnscaledIf true, the function will return the y-values in the (unscaled) metric of the dataset. If false, the returned y-values will be in the scaled and centered metric of the workset. Note that if bBackTransformed is false, the y-values will still be transformed. Note also that if bBackTransformed is true, this parameter is ignored. In this case y-values will always be unscaled.
[in]bBackTransformedIf true, the function will return the y-values in the unscaled untransformed metric of the workset. If false the returned y-values will be transformed in the same way as the workset. Note that if this variable is true, the returned y-values will always be unscaled irrespective of the value of bUnscaled.
[in]pColumnYIndicesA list of Y column Indices to use. NULL if all y columns in the model should be used
[out]pYPredA pointer to the YPred matrix. Number of rows in matrix = number of y-variables chosen (length of pnColumnYIndices). Number of columns in matrix = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code
See also
SQ_GetColumnYIndexByName

◆ SQ_GetYPredCV()

SQ_ErrorCode SQ_GetYPredCV ( SQ_Model  pModel,
int  iComponent,
SQ_IntVector pColumnYIndices,
SQ_VectorData pYPredCV 
)

Retrieves the YPredCV matrix from a model. Prediction for an observation in the workset computed from the model with that observation removed. The function fails if the model is not a PLS model, if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]iComponentThe component to use For an OPLS model, the last predictive component is the only valid one.
[in]pColumnYIndicesA list of Y column Indices to use. NULL if all y columns in the model should be used
[out]pYPredCVA pointer to the YPredCV matrix. Number of rows in matrix = number of y-variables chosen (length of pnColumnYIndices). Number of columns in matrix = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code
See also
SQ_GetColumnYIndexByName

◆ SQ_GetYPredCVErr()

SQ_ErrorCode SQ_GetYPredCVErr ( SQ_Model  pModel,
int  iComponent,
SQ_IntVector pColumnYIndices,
SQ_VectorData pYPredCVErr 
)

Retrieves the YPredCVErr matrix from a model. Prediction error for an observation in the workset computed from the model with that observation removed. The function fails if the model is not a PLS model, if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]iComponentThe component to use For an OPLS model, the last predictive component is the only valid one.
[in]pColumnYIndicesA list of Y column Indices to use. NULL if all y columns in the model should be used
[out]pYPredCVErrA pointer to the YPredCVErr matrix. Number of rows in matrix = number of y-variables chosen (length of pnColumnYIndices). Number of columns in matrix = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code
See also
SQ_GetColumnYIndexByName

◆ SQ_GetYPredCVErrSE()

SQ_ErrorCode SQ_GetYPredCVErrSE ( SQ_Model  pModel,
SQ_IntVector pColumnYIndices,
SQ_VectorData pYPredCVErrSE 
)

Retrieves the YPredCVErrSE matrix from a model. Jack knife standard error of the fitted Y computed from the cross validation rounds The function fails if the model is not a PLS model, if the model doesn't have any components.

Parameters
[in]pModelThe model handle to use
[in]pColumnYIndicesA list of Y column Indices to use. NULL if all y columns in the model should be used
[out]pYPredCVErrSEA pointer to the YPredCVErrSE matrix. Number of rows in matrix = number of y-variables chosen (length of pnColumnYIndices). Number of columns in matrix = number of components in the model.
Returns
Returns SQ_E_OK if success or an error code
See also
SQ_GetColumnYIndexByName

◆ SQ_GetYRelatedProfile()

SQ_ErrorCode SQ_GetYRelatedProfile ( SQ_Model  pModel,
SQ_IntVector pColumnYIndices,
SQ_VectorData pYRelated 
)

Retrieves the YRelatedProfile matrix from a model. X residuals where the systematic variation orthogonal to Y has been removed. The function fails if the model is not an OPLS/O2PLS model.

Parameters
[in]pModelThe model handle to use
[in]pColumnYIndicesA list of Y column Indices to use. NULL if all y columns in the model should be used
[out]pYRelatedA pointer to the PocvSE matrix. Number of rows in matrix = number of components chosen (length of piComponents). Number of columns in matrix = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetYVar()

SQ_ErrorCode SQ_GetYVar ( SQ_Model  pModel,
SQ_IntVector pColumnYIndices,
SQ_UnscaledState  bUnscaled,
SQ_BacktransformedState  bBackTransformed,
SQ_VectorData pYVar 
)

Retrieves the YVar matrix from a model. Y variable from the workset, in original units. The function fails if the model is not a PLS model.

Parameters
[in]pModelThe model handle to use
[in]pColumnYIndicesA list of Y column indices to use. NULL if all y columns in the model should be used
[in]bUnscaledIf True, the function will return the y-values in the (unscaled) metric of the dataset. If False, the returned y-values will be in the scaled and centered metric of the workset. Note that if bBackTransformed is False, the y-values will still be transformed. Note also that if bBackTransformed is True, this parameter is ignored. In this case y-values will always be unscaled.
[in]bBackTransformedIf True, the function will return the y-values in the unscaled untransformed metric of the workset. If False the returned y-values will be transformed in the same way as the workset. Note that if this variable is True, the returned y-values will always be unscaled irrespective of the value of bUnscaled.
[out]pYVarA pointer to the YVar matrix. Number of rows in matrix = number of y-variables chosen (length of pnColumnYIndices). Number of columns in matrix = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code
See also
SQ_GetColumnYIndexByName

◆ SQ_GetYVarRes()

SQ_ErrorCode SQ_GetYVarRes ( SQ_Model  pModel,
int  iComponent,
SQ_IntVector pColumnYIndices,
SQ_UnscaledState  bUnscaled,
SQ_BacktransformedState  bBackTransformed,
SQ_StandardizedState  bStandardized,
SQ_VectorData pYVarRes 
)

Retrieves the YVarRes matrix from a model. Y Variable residuals unscaled, i.e. original units, for observations in the workset. The function fails if the model is not a PLS model.

Parameters
[in]pModelThe model handle to use
[in]iComponentThe component to use For an OPLS model, the last predictive component is the only valid one.
[in]pColumnYIndicesA list of Y column indices to use. NULL if all y columns in the model should be used
[in]bUnscaledIf True, the function will return the residuals in the (unscaled) metric of the dataset. If False, the returned residuals will be in the scaled and centered metric of the workset. Note that if bBackTransformed is False, the residuals will still be transformed. Note also that if bBackTransformed is True, this parameter is ignored. In this case residuals will always be unscaled.
[in]bBackTransformedIf True, the function will return the residuals in the unscaled untransformed metric of the workset. If False the returned residuals will be transformed in the same way as the workset. Note that if this variable is True, the returned residuals will always be unscaled irrespective of the value of bUnscaled.
[in]bStandardizedIf True, the function will return the standardized residuals (the unscaled residuals divided by their standard deviation).
[out]pYVarResA pointer to the YVarRes matrix. Number of rows in matrix = number of y-variables chosen (length of pnColumnYIndices). Number of columns in matrix = number of observations in the model.
Returns
Returns SQ_E_OK if success or an error code
See also
SQ_GetColumnYIndexByName

◆ SQ_GetYWeights()

SQ_ErrorCode SQ_GetYWeights ( SQ_Model  pModel,
SQ_VectorData pYWeights 
)

Retrieves the YWeights matrix from a model. Scaling weights of the Y Variables. The function fails if the model is not a PLS model.

Parameters
[in]pModelThe model handle to use
[out]pYWeightsA pointer to the YWeights matrix. Number of rows in matrix = 1. Number of columns in matrix = number of y-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_IsImpulseResponseModel()

SQ_ErrorCode SQ_IsImpulseResponseModel ( SQ_Model  pModel,
SQ_Bool bIsFIR 
)

Returns 1 if the specified model is a Finite Impulse Response model (FIR).

FIR models have a name that starts with 'FIR'.

Parameters
[in]pModelThe model handle to use
[out]bIsFIRSQ_True if the model is a FIR model, SQ_False otherwise.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_IsModelClass()

SQ_ErrorCode SQ_IsModelClass ( SQ_Model  pModel,
SQ_Bool bIsClass 
)

Returns 1 if the model is any type of class model (PCA-Class, PLS-Class, OPLS-Class, O2PLS-Class, PLS-DA and O2PLS-DA).

Parameters
[in]pModelThe model handle to use
[out]bIsClassSQ_True if the model is a class model, otherwise SQ_False.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_IsModelCrossValidated()

SQ_ErrorCode SQ_IsModelCrossValidated ( SQ_Model  pModel,
SQ_Bool bIsCV 
)

Returns 1 if the model is cross-validated.

Parameters
[in]pModelThe model handle to use
[out]bIsCVSQ_True if the model is cross-validated, otherwise SQ_False.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_IsModelFitted()

SQ_ErrorCode SQ_IsModelFitted ( SQ_Model  pModel,
SQ_Bool bIsFitted 
)

Retrieves the fitted status of a model. Data can only be requested from a fitted model.

Parameters
[in]pModelThe model handle to use
[out]bIsFittedSQ_True if the model is fitted, SQ_False otherwise.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_IsModelPCA()

SQ_ErrorCode SQ_IsModelPCA ( SQ_Model  pModel,
SQ_Bool bIsPCA 
)

Returns 1 if the model is any type of PCA model (PCA-X, PCA-Y, PCA-Class).

Parameters
[in]pModelThe model handle to use
[out]bIsPCASQ_True if the model is a PCA model, otherwise SQ_False.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_IsModelPLS()

SQ_ErrorCode SQ_IsModelPLS ( SQ_Model  pModel,
SQ_Bool bIsPLS 
)

Returns 1 if the model is any type of PLS model (PLS, PLS-Class, PLS-DA, OPLS, OPLS-DA, OPLS-Class, O2PLS, O2PLS-DA, O2PLS-Class).

Parameters
[in]pModelThe model handle to use
[out]bIsPLSSQ_True if the model is a PLS model, otherwise SQ_False.
Returns
Returns SQ_E_OK if success or an error code

Copyright (C) Sartorius Stedim Data Analytics AB - Generated by Doxygen