• Print  |
  • Feedback  |

TEMPLATE Procedure: Plot Statements (Experimental)

Expressions


Specifies a selective, relational, or logical program structure that comprises an operand formed by some combination of constants, data columns, dynamic variables, functions, or other expressions.

Expressions can be used for conditional processing and on plot statements to calculate values that are not in the data. For example, an expression could be used on a LINEPARM statement to calculate the slope of the line that the statement produces.

For conditional processing, an expression is specified in parentheses on an IF statement. The following example illustrates where to specify an expression in an IF statement:

IF( expression )
       ODS-Graphs-statement(s);
ENDIF;

For calculating values that are needed on a plot statement, an expression is specified as the argument of an EVAL() construct on an appropriate plot argument or option. The following example illustrates where to specify an expression in a plot statement:

SLOPE = EVAL( expression )

An expression can be formed with constants, data columns, dynamic variables, functions, or other expressions. The following example illustrates an expression in which the dynamic variables Age, Height, and Weight are used:

(...)
dynamic Age Height Weight;
       (...)
EVAL( Age * Height + Weight ** 2 )

The following example illustrates an expression in which the column variable Time and the SGE functions MEAN and ACF are used:

EVAL( MEAN( Time ) + ACF( Time, NLags=10 ))

The following example shows the general form of an expression:

operand < operator-1 operand-1 ... operator-n operand-n >

An operand can be any of the following values:

constant

specifies a number or a string value. String values must be specified in quotes.

data column

specifies a data column.

dynamic variable

specifies a symbol that references a value or a column that is provided by the procedure at the time the graph is being created.

expression

specifies a nested expression. To control processing, the nested expression can use parentheses to determine the order of operations.

functions

specifies a function in the DATA step; SGE function, computation supported by the Statistical Graphics Engine; or ODS graphics function. When names collide, the number of function arguments is used to clarify the context. If there is more than one argument, it is assumed to be a SAS DATA step function. The following ODS Graphics functions are available:

Autocorrelation Functions for Time Series Analysis

numeric-column= function-name (numeric-column, NLags= integer)
Function Name Description
ACF Autocorrelation Function
ACFSTD Autocorrelation Function Standard Errors
ACFNORM Autocorrelation Function Normalized Statistics
ACFPROB Autocorrelation Function Significance Probabilities
ACFLPROB Autocorrelation Function Log Significance Probabilities
IACF Inverse Autocorrelation
IACFSTD Inverse Autocorrelation Standard Errors
IACFNORM Inverse Autocorrelation Normalized Statistics
IACFPROB Inverse Autocorrelation Significance Probabilities
IACFLPROB Inverse Autocorrelation Log Significance Probabilities
PACF Partial Autocorrelation
PACFSTD Partial Autocorrelation Standard Errors
PACFNORM Partial Autocorrelation Normalized Statistics
PACFPROB Partial Autocorrelation Significance Probabilities
PACFLPROB Partial Autocorrelation Log Significance Probabilities
WN White Noise Test
WNPROB White Noise Significance Probabilities
WNLPROB White Noise Log Significance Probabilities

Decomposition Functions for Forecasting and Time Series Analysis

numeric-column= function-name (numeric-column, Seasonality= integer)
Function Name Description
CC Cycle-Component
DCOMP Seasonal Decomposition
IC Irregular Component
SA Seasonal Adjusted
SC Seasonal Component
SIC Seasonal-Irregular Component
TC Trend Component
TCC Trend-Cycle Component
TCS Trend-Cycle-Seasonal Component

Miscellaneous Functions

integer= function-name( column )
Function Name Description
EXISTS 1 if specified column exists, 0 otherwise

Sorting Functions

column= function-name( column )
Function Name Description
ARANK Ascending Rank
ASORT Ascending Sort
DRANK Descending Rank
DSORT Descending Sort
INDEX Ascending Indices
RANK Ascending Rank
SORT Ascending Sort

Statistical Functions

Statistical functions operate as the DATA step functions of the same name.

number= function-name( numeric-column )
Function Name Description
CSS Corrected Sum of Squares
CV Coefficient of Variation
KURTOSIS Kurtosis
LCLM Confidence Limit Below the Mean
MAX Largest (Maximum) Value
MEAN Mean
MEDIAN Median (50th Percentile)
MIN Smallest (Minimum) Value
N Number of Non-Missing Values
NMISS Number of Missing Values
P1 First Percentile
P5 Fifth Percentile
P25 Twenty-fifth Percentile
P50 Fiftieth Percentile
P75 Seventy-fifth Percentile
P90 Ninetieth Percentile
P95 Ninety-fifth Percentile
P99 Ninety-ninth Percentile
PROBT p-value for T Statistic of a Student
Q1 First Quartile
Q3 Third Quartile
QRANGE Interquartile Range
RANGE Range
SKEWNESS Skewness
STDDEV Standard Deviation
STDERR Standard Error of the Mean
SUM Sum
SUMWGT Sum of Weights
T T Statistic of a Student
UCLM Confidence Limit Above the Mean
USS Uncorrected Sum of Squares
VAR Variance

operators

specifies a standard SAS WHERE clause operator, or operators.


Previous Page | Next Page | Top of Page