X13-ARIMA-SEATS model and seasonal adjustment. 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) |
Finalize the X13AS environment and release any resources allocated. | |
int __stdcall | NDK_X13AS_SCEN_INIT (LPCTSTR szScenarioName, LPCTSTR X13Options, size_t *ulModelHash) |
Initialize the required files for the given scenario/model. | |
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. | |
int __stdcall | NDK_X13AS_SCEN_PATH (LPCTSTR szScenarioName, LPTSTR szOutBuffer, size_t *pLen) |
Returns the filesystem path for the scenario's different files. | |
int __stdcall | NDK_X13AS_SCEN_REFRESH (LPCTSTR szScenarioName) |
Reconstruct the different (input/intermediate/output) files. | |
int __stdcall | NDK_X13AS_SCEN_CLEAUP (LPCTSTR szScenarioName) |
Finalize the given scenario/model and free allocated resources. | |
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. | |
int __stdcall | NDK_X13AS_WRITE_DATA_FILE (LPCTSTR szScenarioName, LPCTSTR szOutputFileName, double *pData, size_t nLen, WORD freq, LONG startDate, WORD fileType, size_t *ulDataHash) |
Write the given data into an X13as formatted data file. | |
int __stdcall | NDK_X13AS_WRITE_FACTORS_FILE (LPCTSTR szScenarioName, LPCTSTR szOutputFile, double **pData, size_t nLen, 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. | |
int __stdcall | NDK_X13AS_READ_DATA_FILE (LPCTSTR szScenarioName, LPCTSTR szDataFileName, WORD freq, double *pData, size_t *nLen, LONG *startDate, WORD fileType, size_t *ulDataHash) |
Read the scenario data file into the given data into an X12a formatted data file. | |
int __stdcall | NDK_X13AS_READ_FACTORS_FILE (LPCTSTR szScenarioName, LPCTSTR szInputFile, double **pData, size_t nLen, 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. | |
int __stdcall | NDK_X13AS_WRITE_SPC_FILE (LPCTSTR szSPCFilename, LPCTSTR szOptions, size_t *ulModelHash) |
Write an SPC file from a JSON formatted string. | |
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. | |
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. | |
int __stdcall | NDK_X13AS_SCEN_ERROR_STATUS (LPCTSTR szScenarioName, LPTSTR szStatus, size_t *nLen) |
Parse the error file in a given scenario for errors. | |
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. | |
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. | |
int __stdcall | NDK_X13AS_FORE_SERIES (LPCTSTR szScenarioName, WORD freq, LONG dateSerial, WORD retType, double *pData) |
Parse the forecast output file. | |
int __stdcall | NDK_X13AS_ADD_OUTPUT_SERIES (LPCTSTR szScenarioName, LPCTSTR szComponent) |
Add an output component to the spc file. | |
int __stdcall | NDK_X13AS_GET_PROP (LPCTSTR szScenarioName, LPCTSTR szProperty, LPTSTR szOutBuffer, size_t *pLen) |
Return the model's option (given by a path: section.key). | |
int __stdcall | NDK_X13AS_SET_PROP (LPCTSTR szScenarioName, LPCTSTR szProperty, LPCTSTR argValue) |
Set (or reset) the value of a model's option (by path: section.key). | |
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). | |
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). | |
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). | |
int __stdcall | NDK_X13AS_DATEVALE_TO_DATE (LPCTSTR szDateTxt, WORD freq, LONG *serialDate) |
Covert X13AS datevalue (Year.month/quarter) into date serial number. | |
Seasonal adjustment is a statistical method for removing the seasonal component of a time series when analyzing non-seasonal trends. It is normal to report seasonally adjusted data for unemployment rates to reveal the underlying trends in labor markets.
Many economic phenomena have seasonal cycles, such as agricultural production and consumer consumption (e.g., greater consumption leading up to Christmas). It is necessary to adjust for this component to understand what underlying trends are in the economy; thus, official statistics are often adjusted to remove seasonal components.
NumXL supports the X-13ARIMA-SEATS method. X-13ARIMA-SEATS is the software produced, distributed, and maintained by the United States Census Bureau.
Behind the scenes, NumXL translates the user’s options into native X-13ARIMA-SEATS scripts, runs the program, and avails the outputs (e.g., seasonally adjusted trend, seasonal factor, irregulars, forecast) through a set of worksheet functions. Nevertheless, the user can view/access the generated input and output files using the NumXL wizard.
The ARIMA models, as discussed by Box and Jenkins (1976), are frequently used for seasonal time series. A general multiplicative seasonal ARIMA model for a time series \(z_t \) can be written:
\[\phi(L)\Phi(L^s)(1-L)^d (1-L^s)^D\times z_t = \theta(L)\Theta(L^s)a_t \]
Where:
\[\phi(L)=\phi_o+\phi_1 L+\phi_2 L^2 +\cdots +\phi_p L^p\]
\[\Phi(L)=\Phi_o+\Phi_1 L+\Phi_2 L^2 +\cdots +\Phi_P L^P\]
\[\theta(L)=\theta_o+\theta_1 L+\theta_2 L^2 +\cdots +\theta_q L^q \]
\[\Theta(L)=\Theta_o+\Theta_1 L+\Theta_2 L^2 +\cdots +\Theta_Q L^Q\]
\[z_t-\mu\]
Where:\[\mu=E[z_t] \]
A natural extension for the ARIMA model results from using a time-varying mean function modeled via linear regression effects.
\[ y_t=\sum_{i=1}^N{\beta_i x_{i,t}}+z_t \]
Where:
\[z_t= y_t-\sum_{i=1}^N{\beta_i x_{i,t}} \]
\[\phi(L)\Phi(L^s)(1-L)^d (1-L^s)^D\times (y_t-\sum_{i=1}^N{\beta_i x_{i,t}}) = \theta(L)\Theta(L^s)a_t \]
enum X13PRIORADJUST_TYPE |
enum X13TRANSFORM_METHOD |
int __stdcall NDK_X13AS_ADD_OUTPUT_SERIES | ( | LPCTSTR | szScenarioName, |
LPCTSTR | szComponent ) |
Add an output component to the spc file.
[in] | szScenarioName | (Required) The scenario name or the model unique identifier. | |||||||||||||||||||||||||||
[in] | szComponent | (Required) the desired output of the X13 output:
|
NDK_SUCCESS | success |
NDK_INVALID_ARG | failed (see remarks) |
NDK_LOW_LICENSE_ARG_LIMIT | failed (see remarks) |
NDK_FAILED | failed |
Requirement | Value |
---|---|
Target Platform | Windows |
Header | SFSDK.h (include Windows.h) |
Library | SFSDK.lib |
DLL | SFSDK.dll SFLUC.dll SFLOG.dll |
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.
[in] | pData | (Required) A univariate time series data (a one dimensional array). |
[in] | nLen | (Required) the number of observations in pData . |
[in] | nForecastPeriods | (Required) The requested number of forecast periods. |
[out] | startIndex | (Required) A pointer to a variable that holds the calculated new start index. |
NDK_SUCCESS | success |
NDK_INVALID_ARG | failed (see remarks) |
NDK_LOW_LICENSE_ARG_LIMIT | failed (see remarks) |
NDK_FAILED | failed |
Requirement | Value |
---|---|
Target Platform | Windows |
Header | SFSDK.h (include Windows.h) |
Library | SFSDK.lib |
DLL | SFSDK.dll SFLUC.dll SFLOG.dll |
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).
[in] | serialDate | (Required) The serial date number we wish to convert. |
[in] | freq | (Required) The sampling frequency per year (12=monthly, 4=Quarterly, 2=semi-annual, and 1=annual). |
[out] | szDateTxt | (Required) A pointer to a buffer to hold the calculated value. |
[in,out] | nLen | (Required) A pointer to a variable that holds the size of the szDateTxt . Upon return, this argument stores the actual number of characters copied. |
NDK_SUCCESS | success |
NDK_INVALID_ARG | failed (see remarks) |
NDK_LOW_LICENSE_ARG_LIMIT | failed (see remarks) |
NDK_FAILED | failed |
Requirement | Value |
---|---|
Target Platform | Windows |
Header | SFSDK.h (include Windows.h) |
Library | SFSDK.lib |
DLL | SFSDK.dll SFLUC.dll SFLOG.dll |
int __stdcall NDK_X13AS_DATEVALE_TO_DATE | ( | LPCTSTR | szDateTxt, |
WORD | freq, | ||
LONG * | serialDate ) |
Covert X13AS datevalue (Year.month/quarter) into date serial number.
[in] | szDateTxt | (Required) the date expressed in DATEVALUE format. |
[in] | freq | (Required) The sampling frequency per year (12=monthly, 4=Quarterly, 2=semi-annual, and 1=annual). |
[out] | serialDate | (Required) A pointer to a variable to hold the calculated serial date value. |
NDK_SUCCESS | success |
NDK_INVALID_ARG | failed (see remarks) |
NDK_LOW_LICENSE_ARG_LIMIT | failed (see remarks) |
NDK_FAILED | failed |
Requirement | Value |
---|---|
Target Platform | Windows |
Header | SFSDK.h (include Windows.h) |
Library | SFSDK.lib |
DLL | SFSDK.dll SFLUC.dll SFLOG.dll |
int __stdcall NDK_X13AS_ENV_CLEANUP | ( | void | ) |
Finalize the X13AS environment and release any resources allocated
NDK_SUCCESS | success |
NDK_FAILED | failed |
Requirement | Value |
---|---|
Target Platform | Windows |
Header | SFSDK.h (include Windows.h) |
Library | SFSDK.lib |
DLL | SFSDK.dll SFLUC.dll SFLOG.dll |
int __stdcall NDK_X13AS_FORE_SERIES | ( | LPCTSTR | szScenarioName, |
WORD | freq, | ||
LONG | dateSerial, | ||
WORD | retType, | ||
double * | pData ) |
Parse the forecast output file
[in] | szScenarioName | (Required) The scenario name or the model unique identifier. | ||||||||
[in] | freq | (Required) The sampling frequency per year (12=monthly, 4=Quarterly, 2=semi-annual, and 1=annual). | ||||||||
[in] | dateSerial | (Required) the serial date number of target date. | ||||||||
[in] | retType | (Required) the desired output of the X12a output:
| ||||||||
[out] | pData | (Required) A pointer to a variable to hold the output value. |
NDK_SUCCESS | success |
NDK_INVALID_ARG | failed (see remarks) |
NDK_LOW_LICENSE_ARG_LIMIT | failed (see remarks) |
NDK_FAILED | failed |
Requirement | Value |
---|---|
Target Platform | Windows |
Header | SFSDK.h (include Windows.h) |
Library | SFSDK.lib |
DLL | SFSDK.dll SFLUC.dll SFLOG.dll |
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).
[in] | szScenarioName | (Required) The scenario name or the model unique identifier. |
[in] | szkey | (Required) the key name (in a tree structure). |
[out] | szOutBuffer | (Required) A pointer to a buffer to hold the value of the meta data. |
[in,out] | pLen | (Required) A pointer to a variable that holds the size of the szOutBuffer . Upon return, this argument stores the actual number of elements copied/used. |
NDK_SUCCESS | success |
NDK_INVALID_ARG | failed (see remarks) |
NDK_LOW_LICENSE_ARG_LIMIT | failed (see remarks) |
NDK_FAILED | failed |
Requirement | Value |
---|---|
Target Platform | Windows |
Header | SFSDK.h (include Windows.h) |
Library | SFSDK.lib |
DLL | SFSDK.dll SFLUC.dll SFLOG.dll |
int __stdcall NDK_X13AS_GET_PROP | ( | LPCTSTR | szScenarioName, |
LPCTSTR | szProperty, | ||
LPTSTR | szOutBuffer, | ||
size_t * | pLen ) |
Return the model's option (given by a path: section.key).
[in] | szScenarioName | (Required) The scenario name or the model unique identifier. |
[in] | szProperty | (Required) the property name (in a tree structure). |
[out] | szOutBuffer | (Required) A pointer to a buffer to hold the output time series data (a one dimensional array). |
[in,out] | pLen | (Required) A pointer to a variable that holds the size of the szOutBuffer . Upon return, this argument stores the actual number of elements copied/used. |
NDK_SUCCESS | success |
NDK_INVALID_ARG | failed (see remarks) |
NDK_LOW_LICENSE_ARG_LIMIT | failed (see remarks) |
NDK_FAILED | failed |
Requirement | Value |
---|---|
Target Platform | Windows |
Header | SFSDK.h (include Windows.h) |
Library | SFSDK.lib |
DLL | SFSDK.dll SFLUC.dll SFLOG.dll |
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
[in] | szScenarioName | (Required) The scenario name or the model unique identifier. | ||||||||||
[in] | retType | (Required) A pointer to a variable that holds the status after running the batch file.
| ||||||||||
[out] | szOutFile | (Required) A pointer to a buffer to hold the file full path. | ||||||||||
[in,out] | nLen | (Required) A pointer to a variable that holds the length of the szOutFile . Upon return, this argument stores the actual number of characters used. | ||||||||||
[in] | OpenFileFlag | (Required) a switch to instruct the functiona whether it should open the file using system default editor (e.g.,notepad) |
NDK_SUCCESS | success |
NDK_INVALID_ARG | failed (see remarks) |
NDK_LOW_LICENSE_ARG_LIMIT | failed (see remarks) |
NDK_FAILED | failed |
Requirement | Value |
---|---|
Target Platform | Windows |
Header | SFSDK.h (include Windows.h) |
Library | SFSDK.lib |
DLL | SFSDK.dll SFLUC.dll SFLOG.dll |
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.
[in] | szScenarioName | (Required) The scenario name or the model unique identifier. | |||||||||||||||||||||||||||
[in] | szComponent | (Required) the desired output of the X12a output:
| |||||||||||||||||||||||||||
[in] | freq | (Required) The sampling frequency per year (12=monthly, 4=Quarterly, 2=semi-annual, and 1=annual). | |||||||||||||||||||||||||||
[out] | pData | (Required) A pointer to a buffer to hold the output time series data (a one dimensional array). | |||||||||||||||||||||||||||
[in,out] | nLen | (Required) A pointer to a variable that holds the size of the pData . Upon return, this argument stores the actual number of elements copied/used. | |||||||||||||||||||||||||||
[out] | startDate | (Required) the serial date number of the 1st observation in the series. |
NDK_SUCCESS | success |
NDK_INVALID_ARG | failed (see remarks) |
NDK_LOW_LICENSE_ARG_LIMIT | failed (see remarks) |
NDK_FAILED | failed |
Requirement | Value |
---|---|
Target Platform | Windows |
Header | SFSDK.h (include Windows.h) |
Library | SFSDK.lib |
DLL | SFSDK.dll SFLUC.dll SFLOG.dll |
int __stdcall NDK_X13AS_READ_DATA_FILE | ( | LPCTSTR | szScenarioName, |
LPCTSTR | szDataFileName, | ||
WORD | freq, | ||
double * | pData, | ||
size_t * | nLen, | ||
LONG * | startDate, | ||
WORD | fileType, | ||
size_t * | ulDataHash ) |
Read the scenario data file into the given data into an X12a formatted data file
[in] | szScenarioName | (Required) The scenario name or the model unique identifier. |
[in] | szDataFileName | (Required) The basefilename of the datafile in the scenario folder. |
[in] | freq | (Required) The sampling frequency per year (12=monthly, 4=Quarterly, 2=semi-annual, and 1=annual). |
[in] | pData | (Required) the univariate time series data (a one dimensional array). |
[in] | nLen | (Required) A pointer to a variable that holds size of buffer referenced by pData . Upon return, the variable will holds the number of elements copied. |
[in] | startDate | (Required) the serial date number of the 1st observation in the series. |
[in] | fileType | (Required) A reserved argument for future releases. must be set to 1 |
[out] | ulDataHash | (Optional) A pointer to a variable that holds the current CRC hash of the data file (tab delimated). |
NDK_SUCCESS | success |
NDK_INVALID_ARG | failed (see remarks) |
NDK_LOW_LICENSE_ARG_LIMIT | failed (see remarks) |
NDK_FAILED | failed |
Requirement | Value |
---|---|
Target Platform | Windows |
Header | SFSDK.h (include Windows.h) |
Library | SFSDK.lib |
DLL | SFSDK.dll SFLUC.dll SFLOG.dll |
int __stdcall NDK_X13AS_READ_FACTORS_FILE | ( | LPCTSTR | szScenarioName, |
LPCTSTR | szInputFile, | ||
double ** | pData, | ||
size_t | nLen, | ||
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
[in] | szScenarioName | (Required) The scenario name or the model unique identifier. |
[in] | szInputFile | (Required) the base filename (and extension) of the output data file in the scenario folder. |
[out] | pData | (Required) the independent (explanatory) variables data matrix, such that each column represents one variable. |
[in] | nLen | (Required) the number of observations (rows) in pData . |
[in] | nXVars | (Required) Tthe number of independent (explanatory) variables (columns) in pData . |
[in] | mask | (Required) A boolean array to choose the explanatory variables in the model. If missing, all variables in pData are included. |
[in] | nMaskLen | (Required) the number of elements in the mask . |
[out] | startdate | (Required) the serial date number of the 1st observation in the series. |
[in] | freq | (Required) The sampling frequency per year (12=monthly, 4=Quarterly, 2=semi-annual, and 1=annual). |
[in] | reserved | (Required) A reserved argument for future releases. must be set to 1 |
[in,out] | ulDataHash | (Optional) A pointer to a variable that holds the current CRC hash of the data file (tab delimated). |
NDK_SUCCESS | success |
NDK_INVALID_ARG | failed (see remarks) |
NDK_LOW_LICENSE_ARG_LIMIT | failed (see remarks) |
NDK_FAILED | failed |
Requirement | Value |
---|---|
Target Platform | Windows |
Header | SFSDK.h (include Windows.h) |
Library | SFSDK.lib |
DLL | SFSDK.dll SFLUC.dll SFLOG.dll |
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
[in] | szSPCFilename | (Required) A full path of an X13AS specification (.spc) file. |
[out] | szOptions | (Required) A Json data structure with all X13 model options. |
[in,out] | nLen | (Required) A pointer to a variable that holds size of buffer referenced by szOptions . Upon return, the variable will holds the number of characters copied. |
[in,out] | ulModelHash | (Required) A pointer to a variable that holds the current CRC hash of the models's spc file. |
NDK_SUCCESS | success |
NDK_INVALID_ARG | failed (see remarks) |
NDK_LOW_LICENSE_ARG_LIMIT | failed (see remarks) |
NDK_FAILED | failed |
Requirement | Value |
---|---|
Target Platform | Windows |
Header | SFSDK.h (include Windows.h) |
Library | SFSDK.lib |
DLL | SFSDK.dll SFLUC.dll SFLOG.dll |
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
[in] | szScenarioName | (Required) The scenario name or the model unique identifier. |
[in] | bValidateOnly | (Required) A switch to run X13 program in verify-mode or full-scale. |
NDK_SUCCESS | success |
NDK_INVALID_ARG | failed (see remarks) |
NDK_LOW_LICENSE_ARG_LIMIT | failed (see remarks) |
NDK_FAILED | failed |
Requirement | Value |
---|---|
Target Platform | Windows |
Header | SFSDK.h (include Windows.h) |
Library | SFSDK.lib |
DLL | SFSDK.dll SFLUC.dll SFLOG.dll |
int __stdcall NDK_X13AS_SCEN_CLEAUP | ( | LPCTSTR | szScenarioName | ) |
Finalize the given scenario/model and free allocated resources.
[in] | szScenarioName | (Required) The scenario name or the model unique identifier. |
NDK_SUCCESS | success |
NDK_INVALID_ARG | failed (see remarks) |
NDK_LOW_LICENSE_ARG_LIMIT | failed (see remarks) |
NDK_FAILED | failed |
Requirement | Value |
---|---|
Target Platform | Windows |
Header | SFSDK.h (include Windows.h) |
Library | SFSDK.lib |
DLL | SFSDK.dll SFLUC.dll SFLOG.dll |
int __stdcall NDK_X13AS_SCEN_ERROR_STATUS | ( | LPCTSTR | szScenarioName, |
LPTSTR | szStatus, | ||
size_t * | nLen ) |
Parse the error file in a given scenario for errors.
[in] | szScenarioName | (Required) The scenario name or the model unique identifier. |
[out] | szStatus | (Required) A pointer to a buffer that will hold the status message. |
[in,out] | nLen | (Required) A pointer to a variable that holds the size of buffer in szMsg . Upon return, the variable will holds the number of characters copied to szMsg . |
NDK_SUCCESS | success |
NDK_INVALID_ARG | failed (see remarks) |
NDK_LOW_LICENSE_ARG_LIMIT | failed (see remarks) |
NDK_FAILED | failed |
Requirement | Value |
---|---|
Target Platform | Windows |
Header | SFSDK.h (include Windows.h) |
Library | SFSDK.lib |
DLL | SFSDK.dll SFLUC.dll SFLOG.dll |
int __stdcall NDK_X13AS_SCEN_INIT | ( | LPCTSTR | szScenarioName, |
LPCTSTR | X13Options, | ||
size_t * | ulModelHash ) |
Initialize the required files for the given scenario/model
[in] | szScenarioName | (Required) The scenario name or the model unique identifier. |
[in] | X13Options | (Required) A Json data structure with all X13 model options. |
[in,out] | ulModelHash | (Required) A pointer to a variable that holds the current CRC hash of the models's spc file. |
NDK_SUCCESS | success |
NDK_INVALID_ARG | failed (see remarks) |
NDK_LOW_LICENSE_ARG_LIMIT | failed (see remarks) |
NDK_FAILED | failed |
Requirement | Value |
---|---|
Target Platform | Windows |
Header | SFSDK.h (include Windows.h) |
Library | SFSDK.lib |
DLL | SFSDK.dll SFLUC.dll SFLOG.dll |
int __stdcall NDK_X13AS_SCEN_PATH | ( | LPCTSTR | szScenarioName, |
LPTSTR | szOutBuffer, | ||
size_t * | pLen ) |
Returns the filesystem path for the scenario's different files
[in] | szScenarioName | (Required) The scenario name or the model unique identifier. |
[in] | szOutBuffer | (Required) A pointer to a buffer to hold the path of the spc file. |
[in,out] | pLen | (Required) A pointer to a variable that holds size of buffer referenced by szOutBuffer . Upon return, the variable will holds the number of characters copied. |
NDK_SUCCESS | success |
NDK_INVALID_ARG | failed (see remarks) |
NDK_LOW_LICENSE_ARG_LIMIT | failed (see remarks) |
NDK_FAILED | failed |
Requirement | Value |
---|---|
Target Platform | Windows |
Header | SFSDK.h (include Windows.h) |
Library | SFSDK.lib |
DLL | SFSDK.dll SFLUC.dll SFLOG.dll |
int __stdcall NDK_X13AS_SCEN_REFRESH | ( | LPCTSTR | szScenarioName | ) |
reconstruct the different (input/intermediate/output) files.
[in] | szScenarioName | (Required) The scenario name or the model unique identifier. |
NDK_SUCCESS | success |
NDK_INVALID_ARG | failed (see remarks) |
NDK_LOW_LICENSE_ARG_LIMIT | failed (see remarks) |
NDK_FAILED | failed |
Requirement | Value |
---|---|
Target Platform | Windows |
Header | SFSDK.h (include Windows.h) |
Library | SFSDK.lib |
DLL | SFSDK.dll SFLUC.dll SFLOG.dll |
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.
[in] | szScenarioName | (Required) The scenario name or the model unique identifier. |
[in] | szOutBuffer | (Required) A pointer to a buffer to hold the JSON data structure of the spc file. |
[in,out] | pLen | (Required) A pointer to a variable that holds size of buffer referenced by szOutBuffer . |
NDK_SUCCESS | success |
NDK_INVALID_ARG | failed (see remarks) |
NDK_LOW_LICENSE_ARG_LIMIT | failed (see remarks) |
NDK_FAILED | failed |
Requirement | Value |
---|---|
Target Platform | Windows |
Header | SFSDK.h (include Windows.h) |
Library | SFSDK.lib |
DLL | SFSDK.dll SFLUC.dll SFLOG.dll |
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).
[in] | szScenarioName | (Required) The scenario name or the model unique identifier. |
[in] | szkey | (Required) the key name (in a tree structure). |
[out] | szValue | (Required) the new value to associate the key with. |
NDK_SUCCESS | success |
NDK_INVALID_ARG | failed (see remarks) |
NDK_LOW_LICENSE_ARG_LIMIT | failed (see remarks) |
NDK_FAILED | failed |
Requirement | Value |
---|---|
Target Platform | Windows |
Header | SFSDK.h (include Windows.h) |
Library | SFSDK.lib |
DLL | SFSDK.dll SFLUC.dll SFLOG.dll |
int __stdcall NDK_X13AS_SET_PROP | ( | LPCTSTR | szScenarioName, |
LPCTSTR | szProperty, | ||
LPCTSTR | argValue ) |
Set (or reset) the value of a model's option (by path: section.key).
[in] | szScenarioName | (Required) The scenario name or the model unique identifier. |
[in] | szProperty | (Required) the property name (in a tree structure). |
[in] | argValue | (Required) the new value to associate with the property. |
NDK_SUCCESS | success |
NDK_INVALID_ARG | failed (see remarks) |
NDK_LOW_LICENSE_ARG_LIMIT | failed (see remarks) |
NDK_FAILED | failed |
Requirement | Value |
---|---|
Target Platform | Windows |
Header | SFSDK.h (include Windows.h) |
Library | SFSDK.lib |
DLL | SFSDK.dll SFLUC.dll SFLOG.dll |
int __stdcall NDK_X13AS_WRITE_DATA_FILE | ( | LPCTSTR | szScenarioName, |
LPCTSTR | szOutputFileName, | ||
double * | pData, | ||
size_t | nLen, | ||
WORD | freq, | ||
LONG | startDate, | ||
WORD | fileType, | ||
size_t * | ulDataHash ) |
Write the given data into an X13as formatted data file.
[in] | szScenarioName | (Required) The scenario name or the model unique identifier. |
[in] | szOutputFileName | (Required) The filename to write the data to. |
[in] | pData | (Required) A univariate time series data (a one dimensional array). |
[in] | nLen | (Required) The number of observations in pData . |
[in] | freq | (Required) The sampling frequency per year (12=monthly, 4=Quarterly, 2=semi-annual, and 1=annual). |
[in] | startDate | (Required) the serial date number of the 1st observation in the series. |
[in] | fileType | (Required) A reserved argument for future releases. must be set to 1 |
[out] | ulDataHash | (Optional) A pointer to a variable that holds the current CRC hash of the data file (tab delimated). |
NDK_SUCCESS | success |
NDK_INVALID_ARG | failed (see remarks) |
NDK_LOW_LICENSE_ARG_LIMIT | failed (see remarks) |
NDK_FAILED | failed |
Requirement | Value |
---|---|
Target Platform | Windows |
Header | SFSDK.h (include Windows.h) |
Library | SFSDK.lib |
DLL | SFSDK.dll SFLUC.dll SFLOG.dll |
int __stdcall NDK_X13AS_WRITE_FACTORS_FILE | ( | LPCTSTR | szScenarioName, |
LPCTSTR | szOutputFile, | ||
double ** | pData, | ||
size_t | nLen, | ||
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
[in] | szScenarioName | (Required) The scenario name or the model unique identifier. |
[in] | szOutputFile | (Required) The filename to write the data to. |
[in] | pData | (Required) the independent (explanatory) variables data matrix, such that each column represents one variable. |
[in] | nLen | (Required) the number of observations (rows) in pData . |
[in] | nXVars | (Required) Tthe number of independent (explanatory) variables (columns) in pData . |
[in] | mask | (Required) A boolean array to choose the explanatory variables in the model. If missing, all variables in pData are included. |
[in] | nMaskLen | (Required) the number of elements in the mask . |
[in] | freq | (Required) The sampling frequency per year (12=monthly, 4=Quarterly, 2=semi-annual, and 1=annual). |
[in] | startDate | (Required) the serial date number of the 1st observation in the series. |
[in] | reserved | (Required) A reserved argument for future releases. must be set to 1 |
[in,out] | ulDataHash | (Optional) A pointer to a variable that holds the current CRC hash of the data file (tab delimated). |
NDK_SUCCESS | success |
NDK_INVALID_ARG | failed (see remarks) |
NDK_LOW_LICENSE_ARG_LIMIT | failed (see remarks) |
NDK_FAILED | failed |
Requirement | Value |
---|---|
Target Platform | Windows |
Header | SFSDK.h (include Windows.h) |
Library | SFSDK.lib |
DLL | SFSDK.dll SFLUC.dll SFLOG.dll |
int __stdcall NDK_X13AS_WRITE_SPC_FILE | ( | LPCTSTR | szSPCFilename, |
LPCTSTR | szOptions, | ||
size_t * | ulModelHash ) |
Write an SPC file from a JSON formatted string
[in] | szSPCFilename | (Required) A full path of an X13AS specification (.spc) file. |
[in] | szOptions | (Required) A Json data structure with all X13 model options. |
[in,out] | ulModelHash | (Required) A pointer to a variable that holds the current CRC hash of the models's spc file. |
NDK_SUCCESS | success |
NDK_INVALID_ARG | failed (see remarks) |
NDK_LOW_LICENSE_ARG_LIMIT | failed (see remarks) |
NDK_FAILED | failed |
Requirement | Value |
---|---|
Target Platform | Windows |
Header | SFSDK.h (include Windows.h) |
Library | SFSDK.lib |
DLL | SFSDK.dll SFLUC.dll SFLOG.dll |