TMODEL Procedure

Multithreaded Calculations

PROC TMODEL uses concurrent computation threads to reduce the time it takes to perform estimation and simulation tasks. Because the characteristics of the input data, model program, and task can vary, PROC TMODEL uses different strategies for breaking its calculations into pieces that can be executed concurrently. For example, when you are estimating a simple model by using a data set with many observations, the most efficient multithreading strategy is to partition the observations and to evaluate the objective function concurrently across the partitions. However, for a highly nonlinear estimation problem with many parameters and fewer observations, the best strategy might be to execute the minimization problem concurrently for multiple regions of the parameter space and then choose the region that yields the optimal estimates.

PROC TMODEL automatically determines which threading strategy to use for each estimation or simulation modeling task by default. Alternatively, you can specify the threading strategy manually by specifying priority options in the PERFORMANCE statement. For each modeling task, the threading strategy is determined by the number of threads allocated to each job in the task. A job is an aspect or dimension of the task that can be executed concurrently with another job. The total number of threads that are used to complete each modeling task is determined as follows,

n Superscript asterisk Baseline equals product Underscript i element-of upper J Endscripts normal c normal e normal i normal l left-parenthesis n Superscript StartFraction p Super Subscript i Superscript Over p Super Subscript normal t normal o normal t Superscript EndFraction Baseline right-parenthesis for reverse-solidus p Subscript normal t normal o normal t Baseline equals sigma-summation Underscript k element-of upper J Endscripts p Subscript k Baseline

where n Superscript asterisk is the actual number of threads used, n is the number of threads specified, p Subscript i Baseline equals max left-parenthesis priority Subscript i Baseline comma 10 Superscript negative 8 Baseline right-parenthesis, priority Subscript i Baseline element-of left-bracket 0 comma 1 right-bracket is the priority specified for the ith job, and J is the set of all jobs in the modeling task. The allocation of threads to jobs in modeling tasks creates the same number or more threads than the number specified in the PERFORMANCE statement and CPUCOUNT= system option.

Multithreading Estimation Calculations

The following jobs in estimation tasks can be executed currently:

  • BY-group processing

  • grid search for optimal parameters specified using the START= option in the FIT statement, or multistart global optimization specified by the MULTISTART suboption of the OPTIMIZER= option in the FIT statement

  • evaluation of the objective function across partitions of the DATA= data set

For model programs that use lagging functions, the observations in the DATA= data set must be processed sequentially to compute the objective function. In these cases, multithreading across partitions of the data is not possible unless you specify a CROSSSECTION statement or a RANDOM statement. The priority of each estimation job can be specified in the PERFORMANCE statement. When no priorities are specified, PROC TMODEL assigns jobs priorities based on the number of BY groups in the input data set, the number of observations in the input data set, the presence of a START= or MULTISTART option in the FIT statement, and the lag length of the model program.

Multithreading Simulation Calculations

The following jobs in simulation tasks can be executed concurrently:

  • BY-group processing

  • processing repetitions in Monte Carlo simulations that are specified using the RANDOM= option in the SOLVE statement

The priority of each simulation job can be specified in the PERFORMANCE statement. When no priorities are specified, PROC TMODEL assigns jobs priorities based on the number of BY groups in the input data set, the presence of a RANDOM= option, and the lag length of the model program.

Last updated: June 19, 2025