Data Munging in 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...
Data Munging in SAS
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...
Data Munging in SAS
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...
Descriptive Statistics in SAS
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...
Descriptive Statistics in SAS
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...
Descriptive Statistics in SAS
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...
Data Munging in SAS
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