15.3 C
London
Sunday, August 17, 2025

SAS

How to Use the INDEX Function in SAS (With Examples)

You can use the INDEX function in SAS to return the position of the first occurrence of a string within another character string. This function...

How to Use the COMPRESS Function in SAS (With Examples)

You can use the COMPRESS function in SAS to remove specific characters from a string. This function uses the following basic syntax: COMPRESS(String, characters to be...

How to Use the SCAN Function in SAS (With Examples)

You can use the SCAN function in SAS to extract the nth word from a string. This function uses the following basic syntax: SCAN(string, count) where: string: The...

How to Calculate a Cumulative Sum in SAS (With Example)

You can use the following basic syntax to calculate a cumulative sum in SAS: data new_data; set original_data; retain...

How to Calculate a Moving Average in SAS

In statistics, a moving average represents the average of the previous n values in a dataset. The easiest way to calculate a moving average in...

How to Calculate Z-Scores in SAS

In statistics, a z-score tells us how many standard deviations away a value is from the mean. We use the following formula to calculate a...

SAS: How to Convert Numeric Variable to Date

You can use the following basic syntax to convert a numeric variable to a date variable in SAS: date_var = input(put(numeric_var, 8.), MMDDYY10.); format date_var MMDDYY10.; The...

Subscribe

- Never miss a story with notifications

- Gain full access to our premium content

- Browse free from up to 5 devices at once

Must read