Statistics and time-series analytics API
X-13ARIMA-SEATS Model

Seasonal ajustments using X-13ARIMA-SEATS functions. More...

Enumerations

enum  X13TRANSFORM_METHOD {
  X13TRANSFOR_NONE = 0 , X13TRANSFOR_AUTO = 1 , X13TRANSFOR_LOG = 2 , X13TRANSFOR_SQRT = 3 ,
  X13TRANSFOR_INV = 4 , X13TRANSFOR_LOGIST = 5 , X13TRANSFOR_BOXCOX = 6
}
 
enum  X13PRIORADJUST_TYPE { X13PRIORADJUST_RATIO = 0 , X13PRIORADJUST_PERCENT = 1 , X13PRIORADJUST_DIFF = 2 }
 

Functions

int __stdcall NDK_X13AS_ENV_CLEANUP (void)
 
int __stdcall NDK_X13AS_SCEN_INIT (LPCTSTR szScenarioName, LPCTSTR X13Options, size_t *ulModelHash)
 
int __stdcall NDK_X13AS_SCEN_SPEC (LPCTSTR szScenarioName, LPTSTR szOutBuffer, size_t *pLen)
 
int __stdcall NDK_X13AS_SCEN_PATH (LPCTSTR szScenarioName, LPTSTR szOutBuffer, size_t *pLen)
 
int __stdcall NDK_X13AS_SCEN_REFRESH (LPCTSTR szScenarioName)
 
int __stdcall NDK_X13AS_SCEN_CLEAUP (LPCTSTR szScenarioName)
 
int __stdcall NDK_X13AS_DATA_STARTOFFSET (double *pData, size_t nLen, size_t nForecastPeriods, size_t *startIndex)
 
int __stdcall NDK_X13AS_WRITE_DATA_FILE (LPCTSTR szScenarioName, LPCTSTR szOutputFile, double *X, size_t nLen, WORD freq, LONG startDate, WORD reserved, size_t *ulDataHash)
 
int __stdcall NDK_X13AS_WRITE_FACTORS_FILE (LPCTSTR szScenarioName, LPCTSTR szOutputFile, double **pXData, size_t nXSize, size_t nXVars, LPBYTE mask, size_t nMaskLen, WORD freq, LONG startDate, WORD reserved, size_t *ulDataHash)
 
int __stdcall NDK_X13AS_READ_DATA_FILE (LPCTSTR szScenarioName, LPCTSTR szDataFileName, WORD freq, double *pData, size_t *pLen, LONG *startDate, WORD fileType, size_t *ulDataHash)
 
int __stdcall NDK_X13AS_READ_FACTORS_FILE (LPCTSTR szScenarioName, LPCTSTR szOutputFile, double **pXData, size_t nXSize, size_t nXVars, LPBYTE mask, size_t nMaskLen, LPLONG startDate, WORD freq, WORD reserved, size_t *ulDataHash)
 
int __stdcall NDK_X13AS_WRITE_SPC_FILE (LPCTSTR szSPCFilename, LPCTSTR szOptions, size_t *ulModelHash)
 
int __stdcall NDK_X13AS_READ_SPC_FILE (LPCTSTR szSPCFilename, LPTSTR szOptions, size_t *nLen, size_t *ulModelHash)
 
int __stdcall NDK_X13AS_RUN_SPC_FILE (LPCTSTR szScenarioName, BOOL bValidateOnly)
 
int __stdcall NDK_X13AS_SCEN_ERROR_STATUS (LPCTSTR szScenarioName, LPTSTR szStatus, size_t *nLen)
 
int __stdcall NDK_X13AS_OUT_FILE (LPCTSTR szScenarioName, WORD retType, LPTSTR szOutFile, size_t *nLen, BOOL OpenFileFlag)
 
int __stdcall NDK_X13AS_OUT_SERIES (LPCTSTR szScenarioName, LPCTSTR szComponent, WORD freq, double *pData, size_t *nLen, LONG *startDate)
 
int __stdcall NDK_X13AS_FORE_SERIES (LPCTSTR szScenarioName, WORD freq, LONG dateSerial, WORD retType, double *pData)
 
int __stdcall NDK_X13AS_ADD_OUTPUT_SERIES (LPCTSTR szScenarioName, LPCTSTR szComponent)
 
int __stdcall NDK_X13AS_GET_PROP (LPCTSTR szScenarioName, LPCTSTR szPropert, LPTSTR szOutBuffer, size_t *pLen)
 
int __stdcall NDK_X13AS_SET_PROP (LPCTSTR szScenarioName, LPCTSTR szPropert, LPCTSTR szOutBuffer)
 
int __stdcall NDK_X13AS_GET_METADATA (LPCTSTR szScenarioName, LPCTSTR szkey, LPTSTR szOutBuffer, size_t *pLen)
 
int __stdcall NDK_X13AS_SET_METADATA (LPCTSTR szScenarioName, LPCTSTR szkey, LPCTSTR szValue)
 
int __stdcall NDK_X13AS_DATE_TO_DATEVALUE (LONG serialDate, WORD freq, LPTSTR szDateTxt, size_t *nLen)
 
int __stdcall NDK_X13AS_DATEVALE_TO_DATE (LPCTSTR szDateTxt, WORD freq, LONG *serialDate)
 

Detailed Description

The X-13ARIMA-SEATS software comes with extensive time series modeling and model selection capabilities for linear regression models with ARIMA errors (regARIMA models).

Enumeration Type Documentation

◆ X13PRIORADJUST_TYPE

X13 prior-adjustment methods

See also
Enumerator
X13PRIORADJUST_RATIO 

Ratio.

X13PRIORADJUST_PERCENT 

Percent.

X13PRIORADJUST_DIFF 

Difference.

◆ X13TRANSFORM_METHOD

X13 transformation methods

See also
Enumerator
X13TRANSFOR_NONE 

don't process the input data

X13TRANSFOR_AUTO 

don't process the input data

X13TRANSFOR_LOG 

don't process the input data

X13TRANSFOR_SQRT 

don't process the input data

X13TRANSFOR_INV 

don't process the input data

X13TRANSFOR_LOGIST 

don't process the input data

X13TRANSFOR_BOXCOX 

don't process the input data

Function Documentation

◆ NDK_X13AS_ADD_OUTPUT_SERIES()

int __stdcall NDK_X13AS_ADD_OUTPUT_SERIES ( LPCTSTR szScenarioName,
LPCTSTR szComponent )

Add an output component to the spc file.

Returns
status code of the operation
Return values
NDK_SUCCESSOperation successful
NDK_FAILEDoperation is unsuccessful ( )
See also
NDK_X12_ENV_INIT(), NDK_X12_ENV_CLEANUP(), NDK_X12_SCEN_INIT(), NDK_X12_SCEN_CLEAUP(), NDK_X12_SPC_FILE(), NDK_X12_RUN_BATCH(), NDK_X12_RUN_SCENARIO(), NDK_X12_RUN_STAT(), NDK_X12_OUT_FILE(), NDK_X12_OUT_SERIES(), NDK_X12_FORE_SERIES()
Parameters
[in]szScenarioNameis the scenario name or the model unique identifier
[in]szComponentis the name of the component to read

◆ NDK_X13AS_DATA_STARTOFFSET()

int __stdcall NDK_X13AS_DATA_STARTOFFSET ( double * pData,
size_t nLen,
size_t nForecastPeriods,
size_t * startIndex )

Get the start index of the data set to support maximum limit of X13AS

Returns
status code of the operation
Return values
NDK_SUCCESSOperation successful
NDK_FAILEDoperation is unsuccessful ( )
See also
NDK_X13_WRITE_DATA_FILE(), NDK_X12_ENV_CLEANUP(), NDK_X12_SCEN_INIT(), NDK_X12_DATA_FILE(), NDK_X12_SPC_FILE(), NDK_X12_RUN_BATCH(), NDK_X12_RUN_SCENARIO(), NDK_X12_RUN_STAT(), NDK_X12_OUT_FILE(), NDK_X12_OUT_SERIES(), NDK_X12_FORE_SERIES()
Parameters
[in]pDatais the input time series
[in]nLenis the number of observations in pData
[in]nForecastPeriodsis the requested number of forecast perios
[out]startIndexis the calculated new start index

◆ NDK_X13AS_DATE_TO_DATEVALUE()

int __stdcall NDK_X13AS_DATE_TO_DATEVALUE ( LONG serialDate,
WORD freq,
LPTSTR szDateTxt,
size_t * nLen )

Covert a serial datenumber to X13AS datevalue (Year.month/quarter).

Returns
status code of the operation
Return values
NDK_SUCCESSOperation successful
NDK_FAILEDoperation is unsuccessful ( )
See also
NDK_X12_ENV_INIT(), NDK_X12_ENV_CLEANUP(), NDK_X12_SCEN_INIT(), NDK_X12_SCEN_CLEAUP(), NDK_X12_SPC_FILE(), NDK_X12_RUN_BATCH(), NDK_X12_RUN_SCENARIO(), NDK_X12_RUN_STAT(), NDK_X12_OUT_FILE(), NDK_X12_OUT_SERIES(), NDK_X12_FORE_SERIES()
Parameters
[in]serialDateis the serial date number we wish to convert
[in]freqis thge frequency of the dataset (12=monthly)
[out]szDateTxtthe date expressed in DATEVALUE format
nLen[in,out] is the size of the buufer to hold the DATEVALUE

◆ NDK_X13AS_DATEVALE_TO_DATE()

int __stdcall NDK_X13AS_DATEVALE_TO_DATE ( LPCTSTR szDateTxt,
WORD freq,
LONG * serialDate )

Covert X13AS datevalue (Year.month/quarter) into date serial number.

Returns
status code of the operation
Return values
NDK_SUCCESSOperation successful
NDK_FAILEDoperation is unsuccessful ( )
See also
NDK_X12_ENV_INIT(), NDK_X12_ENV_CLEANUP(), NDK_X12_SCEN_INIT(), NDK_X12_SCEN_CLEAUP(), NDK_X12_SPC_FILE(), NDK_X12_RUN_BATCH(), NDK_X12_RUN_SCENARIO(), NDK_X12_RUN_STAT(), NDK_X12_OUT_FILE(), NDK_X12_OUT_SERIES(), NDK_X12_FORE_SERIES()
Parameters
[in]szDateTxtthe date expressed in DATEVALUE format
[in]freqis thge frequency of the dataset (12=monthly)
[out]serialDateis the return serial date of the DATEVALUE

◆ NDK_X13AS_ENV_CLEANUP()

int __stdcall NDK_X13AS_ENV_CLEANUP ( void )

Finalize the X13AS environment and release any resources allocated

Returns
status code of the operation
Return values
NDK_SUCCESSOperation successful
NDK_FAILEDoperation is unsuccessful ( )
See also
NDK_X13_SCEN_CLEAUP()

◆ NDK_X13AS_FORE_SERIES()

int __stdcall NDK_X13AS_FORE_SERIES ( LPCTSTR szScenarioName,
WORD freq,
LONG dateSerial,
WORD retType,
double * pData )

Parse the forecast output file

Returns
status code of the operation
Return values
NDK_SUCCESSOperation successful
NDK_FAILEDoperation is unsuccessful ( )
See also
NDK_X12_ENV_INIT(), NDK_X12_ENV_CLEANUP(), NDK_X12_SCEN_INIT(), NDK_X12_SCEN_CLEAUP(), NDK_X12_SPC_FILE(), NDK_X12_RUN_BATCH(), NDK_X12_RUN_SCENARIO(), NDK_X12_RUN_STAT(), NDK_X12_OUT_FILE(), NDK_X12_OUT_SERIES(), NDK_X12_FORE_SERIES()
Parameters
[in]szScenarioNameis the scenario name or the model unique identifier
[in]freqis thge frequency of the dataset (12=monthly)
[in]dateSerialthe target serial date
[in]retTypeis the type of output
[out]pDatais the returned value

◆ NDK_X13AS_GET_METADATA()

int __stdcall NDK_X13AS_GET_METADATA ( LPCTSTR szScenarioName,
LPCTSTR szkey,
LPTSTR szOutBuffer,
size_t * pLen )

Get the value of a model's metadata (by key: metadata.keys.key).

Returns
status code of the operation
Return values
NDK_SUCCESSOperation successful
NDK_FAILEDoperation is unsuccessful ( )
See also
NDK_X12_ENV_INIT(), NDK_X12_ENV_CLEANUP(), NDK_X12_SCEN_INIT(), NDK_X12_SCEN_CLEAUP(), NDK_X12_SPC_FILE(), NDK_X12_RUN_BATCH(), NDK_X12_RUN_SCENARIO(), NDK_X12_RUN_STAT(), NDK_X12_OUT_FILE(), NDK_X12_OUT_SERIES(), NDK_X12_FORE_SERIES()
Parameters
[in]szScenarioNameis the scenario name or the model unique identifier
[in]szkeyis the key name (in a tree structure)
[out]szOutBufferthe buffereto hold the value in,
pLen[in,out] the initial size of the szOutBuffer

◆ NDK_X13AS_GET_PROP()

int __stdcall NDK_X13AS_GET_PROP ( LPCTSTR szScenarioName,
LPCTSTR szPropert,
LPTSTR szOutBuffer,
size_t * pLen )

Return the model's option (given by a path: section.key).

Returns
status code of the operation
Return values
NDK_SUCCESSOperation successful
NDK_FAILEDoperation is unsuccessful ( )
See also
NDK_X12_ENV_INIT(), NDK_X12_ENV_CLEANUP(), NDK_X12_SCEN_INIT(), NDK_X12_SCEN_CLEAUP(), NDK_X12_SPC_FILE(), NDK_X12_RUN_BATCH(), NDK_X12_RUN_SCENARIO(), NDK_X12_RUN_STAT(), NDK_X12_OUT_FILE(), NDK_X12_OUT_SERIES(), NDK_X12_FORE_SERIES()
Parameters
[in]szScenarioNameis the scenario name or the model unique identifier
[in]szPropertis the property name (in a tree structure)
[out]szOutBufferthe buffereto hold the value in,
pLen[in,out] the initial size of the szOutBuffer

◆ NDK_X13AS_OUT_FILE()

int __stdcall NDK_X13AS_OUT_FILE ( LPCTSTR szScenarioName,
WORD retType,
LPTSTR szOutFile,
size_t * nLen,
BOOL OpenFileFlag )

Return the output filename, or open the file in a notepad

Returns
status code of the operation
Return values
NDK_SUCCESSOperation successful
NDK_FAILEDoperation is unsuccessful ( )
See also
NDK_X12_ENV_INIT(), NDK_X12_ENV_CLEANUP(), NDK_X12_SCEN_INIT(), NDK_X12_SCEN_CLEAUP(), NDK_X12_SPC_FILE(), NDK_X12_RUN_BATCH(), NDK_X12_RUN_SCENARIO(), NDK_X12_RUN_STAT(), NDK_X12_OUT_FILE(), NDK_X12_OUT_SERIES(), NDK_X12_FORE_SERIES()
Parameters
[in]szScenarioNameis the scenario name or the model unique identifier
[in]retTypetype of output time series
[out]szOutFileis the output buffer
nLen[in,out] is the initial size of pData
[in]OpenFileFlagis the openFile flag

◆ NDK_X13AS_OUT_SERIES()

int __stdcall NDK_X13AS_OUT_SERIES ( LPCTSTR szScenarioName,
LPCTSTR szComponent,
WORD freq,
double * pData,
size_t * nLen,
LONG * startDate )

Parse the output file of a given component.

Returns
status code of the operation
Return values
NDK_SUCCESSOperation successful
NDK_FAILEDoperation is unsuccessful ( )
See also
NDK_X12_ENV_INIT(), NDK_X12_ENV_CLEANUP(), NDK_X12_SCEN_INIT(), NDK_X12_SCEN_CLEAUP(), NDK_X12_SPC_FILE(), NDK_X12_RUN_BATCH(), NDK_X12_RUN_SCENARIO(), NDK_X12_RUN_STAT(), NDK_X12_OUT_FILE(), NDK_X12_OUT_SERIES(), NDK_X12_FORE_SERIES()
Parameters
[in]szScenarioNameis the scenario name or the model unique identifier
[in]szComponentis the name of the component
[in]freqis thge frequency of the dataset (12=monthly)
[out]pDatais the output buffer
nLen[in,out] is the initial size of pData
[out]startDateis the serial date of the 1st obs. in pData

◆ NDK_X13AS_READ_DATA_FILE()

int __stdcall NDK_X13AS_READ_DATA_FILE ( LPCTSTR szScenarioName,
LPCTSTR szDataFileName,
WORD freq,
double * pData,
size_t * pLen,
LONG * startDate,
WORD fileType,
size_t * ulDataHash )

Read the scenario data file into the given data into an X12a formatted data file

Returns
status code of the operation
Return values
NDK_SUCCESSOperation successful
NDK_FAILEDoperation is unsuccessful ( )
See also
NDK_X12_ENV_INIT(), NDK_X12_ENV_CLEANUP(), NDK_X12_SCEN_INIT(), NDK_X12_SCEN_CLEAUP(), NDK_X12_SPC_FILE(), NDK_X12_RUN_BATCH(), NDK_X12_RUN_SCENARIO(), NDK_X12_RUN_STAT(), NDK_X12_OUT_FILE(), NDK_X12_OUT_SERIES(), NDK_X12_FORE_SERIES()
Parameters
[in]szScenarioNameis the scenario name or the model unique identifier
[in]szDataFileNameis the basefilename of the datafile in the scenario folder
[in]freqis the sampling frequency per year (12=monthly, 4=Quarterly, 2=semi-annual, and 1=annual).
[out]pDatais the univariate time series data (a one dimensional array).
pLen[inout] is the number of observations in X, and original the size of the elements in pData
[out]startDateis the serial date number of the 1st observation in the series
[in]fileTypeis a reserved argument for future releases. must be set to 1
[out]ulDataHash(optional) is CRC hash of the data file (tab delimated).

◆ NDK_X13AS_READ_FACTORS_FILE()

int __stdcall NDK_X13AS_READ_FACTORS_FILE ( LPCTSTR szScenarioName,
LPCTSTR szOutputFile,
double ** pXData,
size_t nXSize,
size_t nXVars,
LPBYTE mask,
size_t nMaskLen,
LPLONG startDate,
WORD freq,
WORD reserved,
size_t * ulDataHash )

Read the 2D data file into the given data into an X13a formatted data file

Returns
status code of the operation
Return values
NDK_SUCCESSOperation successful
NDK_FAILEDoperation is unsuccessful ( )
See also
NDK_X12_ENV_INIT(), NDK_X12_ENV_CLEANUP(), NDK_X12_SCEN_INIT(), NDK_X12_SCEN_CLEAUP(), NDK_X12_SPC_FILE(), NDK_X12_RUN_BATCH(), NDK_X12_RUN_SCENARIO(), NDK_X12_RUN_STAT(), NDK_X12_OUT_FILE(), NDK_X12_OUT_SERIES(), NDK_X12_FORE_SERIES()
Parameters
[in]szScenarioNameis the scenario name or the model unique identifier
[in]szOutputFileis the base filename (and extension) of the output data file in the scenario folder
[in]pXDatais the independent (explanatory) variables data matrix, such that each column represents one variable.
[in]nXSizeis the number of observations (rows) in X
[in]nXVarsis the number of independent (explanatory) variables (columns) in X.
[in]maskis the boolean array to choose the explanatory variables in the model. If missing, all variables in X are included.
[in]nMaskLenis the number of elements in the "mask."
[out]startDateis the serial date number of the 1st observation in the series
[in]freqis the data sampling frequency (per year)
[in]reservedis a reserved argument for future releases. must be set to 1
ulDataHash[inout] (optional) is CRC hash of the data file (tab delimated).

◆ NDK_X13AS_READ_SPC_FILE()

int __stdcall NDK_X13AS_READ_SPC_FILE ( LPCTSTR szSPCFilename,
LPTSTR szOptions,
size_t * nLen,
size_t * ulModelHash )

Read an SPC file and convert it to a JSON formatted string

Returns
status code of the operation
Return values
NDK_SUCCESSOperation successful
NDK_FAILEDoperation is unsuccessful ( )
See also
NDK_X12_ENV_INIT(), NDK_X12_ENV_CLEANUP(), NDK_X12_SCEN_INIT(), NDK_X12_SCEN_CLEAUP(), NDK_X12_SPC_FILE(), NDK_X12_RUN_BATCH(), NDK_X12_RUN_SCENARIO(), NDK_X12_RUN_STAT(), NDK_X12_OUT_FILE(), NDK_X12_OUT_SERIES(), NDK_X12_FORE_SERIES()
Parameters
[in]szSPCFilenameis the scenario name or the model unique identifier
[out]szOptionsis the SPC value
nLen[in,out] is the size of output buffer
ulModelHash[in,out] is the calculated hash of the spc file.

◆ NDK_X13AS_RUN_SPC_FILE()

int __stdcall NDK_X13AS_RUN_SPC_FILE ( LPCTSTR szScenarioName,
BOOL bValidateOnly )

Invoke the x13as_ascii.exe file to process the spc file in a given scenario

Returns
status code of the operation
Return values
NDK_SUCCESSOperation successful
NDK_FAILEDoperation is unsuccessful ( )
See also
NDK_X12_ENV_INIT(), NDK_X12_ENV_CLEANUP(), NDK_X12_SCEN_INIT(), NDK_X12_SCEN_CLEAUP(), NDK_X12_SPC_FILE(), NDK_X12_RUN_BATCH(), NDK_X12_RUN_SCENARIO(), NDK_X12_RUN_STAT(), NDK_X12_OUT_FILE(), NDK_X12_OUT_SERIES(), NDK_X12_FORE_SERIES()
Parameters
[in]szScenarioNameis the scenario name or the model unique identifier
[in]bValidateOnlyis a switch to run X13 in verify mode or full-scale.

◆ NDK_X13AS_SCEN_CLEAUP()

int __stdcall NDK_X13AS_SCEN_CLEAUP ( LPCTSTR szScenarioName)

Finalize the given scenario/model and free allocated resources

Returns
status code of the operation
Return values
NDK_SUCCESSOperation successful
NDK_FAILEDoperation is unsuccessful ( )
See also
NDK_X12_ENV_INIT(), NDK_X12_ENV_CLEANUP(), NDK_X12_SCEN_INIT(), NDK_X12_DATA_FILE(), NDK_X12_SPC_FILE(), NDK_X12_RUN_BATCH(), NDK_X12_RUN_SCENARIO(), NDK_X12_RUN_STAT(), NDK_X12_OUT_FILE(), NDK_X12_OUT_SERIES(), NDK_X12_FORE_SERIES()
Parameters
[in]szScenarioNameis the scenario name or the model unique identifier

◆ NDK_X13AS_SCEN_ERROR_STATUS()

int __stdcall NDK_X13AS_SCEN_ERROR_STATUS ( LPCTSTR szScenarioName,
LPTSTR szStatus,
size_t * nLen )

Parse the error file in a given scenario for errors

Returns
status code of the operation
Return values
NDK_SUCCESSOperation successful
NDK_FAILEDoperation is unsuccessful ( )
See also
NDK_X12_ENV_INIT(), NDK_X12_ENV_CLEANUP(), NDK_X12_SCEN_INIT(), NDK_X12_SCEN_CLEAUP(), NDK_X12_SPC_FILE(), NDK_X12_RUN_BATCH(), NDK_X12_RUN_SCENARIO(), NDK_X12_RUN_STAT(), NDK_X12_OUT_FILE(), NDK_X12_OUT_SERIES(), NDK_X12_FORE_SERIES()
Parameters
[in]szScenarioNameis the scenario name or the model unique identifier
[out]szStatusis the runtime status
nLen[in,out] is the size of the buffer

◆ NDK_X13AS_SCEN_INIT()

int __stdcall NDK_X13AS_SCEN_INIT ( LPCTSTR szScenarioName,
LPCTSTR X13Options,
size_t * ulModelHash )

Initialize the required files for the given scenario/model

Returns
status code of the operation
Return values
NDK_SUCCESSOperation successful
NDK_FAILEDoperation is unsuccessful ( )
See also
NDK_X13_ENV_INIT(), NDK_X13_ENV_CLEANUP(), NDK_X13_SCEN_CLEAUP()
Parameters
[in]szScenarioNameis the scenario name, must be unique
[in]X13Optionsis Json data structure with all X13 model options.
ulModelHash[inout] (optional) the CRC hash for the spc file

◆ NDK_X13AS_SCEN_PATH()

int __stdcall NDK_X13AS_SCEN_PATH ( LPCTSTR szScenarioName,
LPTSTR szOutBuffer,
size_t * pLen )

Returns the filesystem path for the scenario's different files

Returns
status code of the operation
Return values
NDK_SUCCESSOperation successful
NDK_FAILEDoperation is unsuccessful ( )
See also
NDK_X13_SCEN_INIT(), NDK_X13_ENV_CLEANUP(), NDK_X13_SCEN_CLEAUP()
Parameters
[in]szScenarioNameis the scenario name, must be unique
[out]szOutBufferis the output buffer to write the spec file to
pLen[in,out] is the size of the buffer (i.e., szOutBuffer)

◆ NDK_X13AS_SCEN_REFRESH()

int __stdcall NDK_X13AS_SCEN_REFRESH ( LPCTSTR szScenarioName)

reconstruct the different (input/intermediate/output) files

Returns
status code of the operation
Return values
NDK_SUCCESSOperation successful
NDK_FAILEDoperation is unsuccessful ( )
See also
NDK_X13_ENV_INIT(), NDK_X13_ENV_CLEANUP(), NDK_X13_SCEN_CLEAUP()
Parameters
[in]szScenarioNameis the scenario name, must be unique

◆ NDK_X13AS_SCEN_SPEC()

int __stdcall NDK_X13AS_SCEN_SPEC ( LPCTSTR szScenarioName,
LPTSTR szOutBuffer,
size_t * pLen )

Query the properties/options of given scenario and return them in a JSON data string

Returns
status code of the operation
Return values
NDK_SUCCESSOperation successful
NDK_FAILEDoperation is unsuccessful ( )
See also
NDK_X13_SCEN_INIT(), NDK_X13_ENV_CLEANUP(), NDK_X13_SCEN_CLEAUP()
Parameters
[in]szScenarioNameis the scenario name, must be unique
[out]szOutBufferis the output buffer to write the spec file to
pLen[in,out] is the size of the bugger (i.e., szOutBuffer)

◆ NDK_X13AS_SET_METADATA()

int __stdcall NDK_X13AS_SET_METADATA ( LPCTSTR szScenarioName,
LPCTSTR szkey,
LPCTSTR szValue )

Set (or reset) the value of a model's metadata (by key: metadata.keys.key).

Returns
status code of the operation
Return values
NDK_SUCCESSOperation successful
NDK_FAILEDoperation is unsuccessful ( )
See also
NDK_X12_ENV_INIT(), NDK_X12_ENV_CLEANUP(), NDK_X12_SCEN_INIT(), NDK_X12_SCEN_CLEAUP(), NDK_X12_SPC_FILE(), NDK_X12_RUN_BATCH(), NDK_X12_RUN_SCENARIO(), NDK_X12_RUN_STAT(), NDK_X12_OUT_FILE(), NDK_X12_OUT_SERIES(), NDK_X12_FORE_SERIES()
Parameters
[in]szScenarioNameis the scenario name or the model unique identifier
[in]szkeyis the key name (in a tree structure)
[in]szValueis the new value to associate the key with

◆ NDK_X13AS_SET_PROP()

int __stdcall NDK_X13AS_SET_PROP ( LPCTSTR szScenarioName,
LPCTSTR szPropert,
LPCTSTR szOutBuffer )

Set (or reset) the value of a model's option (by path: section.key).

Returns
status code of the operation
Return values
NDK_SUCCESSOperation successful
NDK_FAILEDoperation is unsuccessful ( )
See also
NDK_X12_ENV_INIT(), NDK_X12_ENV_CLEANUP(), NDK_X12_SCEN_INIT(), NDK_X12_SCEN_CLEAUP(), NDK_X12_SPC_FILE(), NDK_X12_RUN_BATCH(), NDK_X12_RUN_SCENARIO(), NDK_X12_RUN_STAT(), NDK_X12_OUT_FILE(), NDK_X12_OUT_SERIES(), NDK_X12_FORE_SERIES()
Parameters
[in]szScenarioNameis the scenario name or the model unique identifier
[in]szPropertis the property name (in a tree structure)
[in]szOutBufferis the new value to associate the property

◆ NDK_X13AS_WRITE_DATA_FILE()

int __stdcall NDK_X13AS_WRITE_DATA_FILE ( LPCTSTR szScenarioName,
LPCTSTR szOutputFile,
double * X,
size_t nLen,
WORD freq,
LONG startDate,
WORD reserved,
size_t * ulDataHash )

Write the given data into an X13as formatted data file

Returns
status code of the operation
Return values
NDK_SUCCESSOperation successful
NDK_FAILEDoperation is unsuccessful ( )
See also
NDK_X13_ENV_INIT(), NDK_X13_ENV_CLEANUP(), NDK_X13_SCEN_INIT(), NDK_X13_SCEN_CLEAUP()
Parameters
[in]szScenarioNameis the scenario name or the model unique identifier
[in]szOutputFileis the name of the filename to write the data to
[in]Xis the univariate time series data (a one dimensional array).
[in]nLenis the number of observations in X
[in]freqis the sampling frequency per year (12=monthly, 4=Quarterly, 2=semi-annual, and 1=annual).
[in]startDateis the serial date number of the 1st observation in the series
[in]reservedis a reserved argument for future releases. must be set to 1
ulDataHash[inout] (optional) is CRC hash of the data file (tab delimated).

◆ NDK_X13AS_WRITE_FACTORS_FILE()

int __stdcall NDK_X13AS_WRITE_FACTORS_FILE ( LPCTSTR szScenarioName,
LPCTSTR szOutputFile,
double ** pXData,
size_t nXSize,
size_t nXVars,
LPBYTE mask,
size_t nMaskLen,
WORD freq,
LONG startDate,
WORD reserved,
size_t * ulDataHash )

Write the given 2-D data into an X13as formatted data file

Returns
status code of the operation
Return values
NDK_SUCCESSOperation successful
NDK_FAILEDoperation is unsuccessful ( )
See also
NDK_X13_ENV_INIT(), NDK_X13_ENV_CLEANUP(), NDK_X13_SCEN_INIT(), NDK_X13_SCEN_CLEAUP()
Parameters
[in]szScenarioNameis the scenario name or the model unique identifier
[in]szOutputFileis the base filename (and extension) of the output data file in the scenario folder
[in]pXDatais the independent (explanatory) variables data matrix, such that each column represents one variable.
[in]nXSizeis the number of observations (rows) in X
[in]nXVarsis the number of independent (explanatory) variables (columns) in X.
[in]maskis the boolean array to choose the explanatory variables in the model. If missing, all variables in X are included.
[in]nMaskLenis the number of elements in the "mask."
[in]freqis the sampling frequency per year (12=monthly, 4=Quarterly, 2=semi-annual, and 1=annual).
[in]startDateis the serial date number of the 1st observation in the series
[in]reservedis a reserved argument for future releases. must be set to 1
ulDataHash[inout] (optional) is CRC hash of the data file (tab delimated).

◆ NDK_X13AS_WRITE_SPC_FILE()

int __stdcall NDK_X13AS_WRITE_SPC_FILE ( LPCTSTR szSPCFilename,
LPCTSTR szOptions,
size_t * ulModelHash )

Write an SPC file from a JSON formatted string

Returns
status code of the operation
Return values
NDK_SUCCESSOperation successful
NDK_FAILEDoperation is unsuccessful ( )
See also
NDK_X12_ENV_INIT(), NDK_X12_ENV_CLEANUP(), NDK_X12_SCEN_INIT(), NDK_X12_SCEN_CLEAUP(), NDK_X12_SPC_FILE(), NDK_X12_RUN_BATCH(), NDK_X12_RUN_SCENARIO(), NDK_X12_RUN_STAT(), NDK_X12_OUT_FILE(), NDK_X12_OUT_SERIES(), NDK_X12_FORE_SERIES()
Parameters
[in]szSPCFilenameis the scenario name or the model unique identifier
[in]szOptionsis the SPC text
ulModelHash[in,out] is the calculated hash