Demonstration of sorting and grouping data for reports with PROC PRINT.
View code
Reporting
Clinical Data Analysis and Aggregate Reports
This SAS script generates simulated clinical data, performs statistical aggregation by gender and patient group, and ...
View code
Statistical
Generation and Analysis of Simulated Clinical Data
The SAS script generates a simulated clinical dataset (`CLINICAL`) containing information on patients, visits, dates,...
View code
Statistical
Ratio Analysis for City Sizes with GLIMMIX and GENMOD
This SAS script performs a ratio analysis on city size data using GLIMMIX and GENMOD procedures to model count data w...
View code
Statistical
Analysis of Relative Risk and Rate Ratio in a Clinical Trial
This SAS script analyzes hypothetical data from a clinical trial to estimate the relative risk and rate ratio of adve...
View code
Statistical
Pump Reliability Analysis using Mixed Models
This SAS script analyzes the reliability of pumps in a pressurized water reactor nuclear power plant using generalize...
View code
ETL
Currency management and display
This SAS script illustrates the use of different formats for entering and displaying monetary values (dollar and euro...
View code
Data Manipulation
Using the ZIPCITY function
Script demonstrating the use of the ZIPCITY function to get a city name from a postal code.
View code
Reporting
Formatted Display of the SASHELP.CLASS Table
Generates a filtered and formatted report from the SASHELP.CLASS table.
View code
Data
Creation and Display of Instream Data
This SAS script creates a dataset named 'instream_mtcars' from data provided directly within the script (instream dat...
View code
Reporting
Example 4 - SAS and HTML Output Streaming
Demonstration script combining custom HTML code and SAS procedure outputs via ODS to _webout.
View code
Statistical
Ossification Data Analysis with PROC GENMOD
This script analyzes ossification study data using Generalized Estimating Equations (GEE) models with PROC GENMOD. It...
View code
ETL
Date Processing and Display
This SAS script demonstrates the creation of two datasets ('userinfo' and 'julinedata') using `datalines` and `cards`...
View code
Reporting
Visualization of Injection Site Reaction Incidence
Generation of simulated skin reaction data and creation of comparative graphs.
View code
ETL
Data Cleaning and Display (Duplicate Removal)
This SAS script creates a 'classtest' data table, cleans it by removing entirely duplicated rows using PROC SORT with...
View code
Reporting
One-Way Frequency Report
This program uses the TABLES statement options to control the statistics included in the one-way frequency report. Th...
View code
ETL
Creating and Sorting Class Data
This SAS script creates a student data table, then sorts it by subject in ascending order and by score in descending ...
View code
ETL
In-Stream Data Creation and Display
This SAS script creates a dataset named 'instream_mtcars' from data provided directly within the script via a CARDS s...
View code
Reporting
HTML Output Generation via DATA _NULL_ and CARDS4
This SAS script demonstrates a method to generate and stream HTML content directly to web output (_webout) using a DA...
View code
Statistical
Simulation and classification of white blood cell (WBC) counts
Generation of simulated data for white blood cells and comparison of classification methods (Data step vs Format).
View code
Data Manipulation
Date Manipulation with INTNX
Script illustrating the use of the INTNX function to calculate future dates based on regional conditions.
View code
ETL
Date manipulation with INTNX and INTCK
Demonstration of SAS INTNX and INTCK functions for manipulating and calculating date differences.
View code
Statistics
Advanced Statistical Analysis: GLIMMIX and NLMIXED
Data simulation script followed by comparisons of mixed models (linear and logistic) and non-linear modeling.
View code
Reporting
Simple extraction via PROC SQL
Selection of demographic columns from the SASHELP.CLASS table.
View code
ETL
Transposing the SASHELP.CLASS table
Simple example of transposing columns into rows using the CLASS table.
View code
Général
Sans titre
This SAS script creates an internal 'account' dataset from raw data, sorts it by town and company to create 'bytown',...
View code
Reporting
Simple HTML Stream Generation via Data Step
Example of creating a basic HTML stream sent directly to the web client.
View code
Macro
Documentation Generation and HTML Conversion
Script configuring and executing the code_diary macro to generate project documentation, followed by conversion to HTML.
View code
Statistics
Negative-Binomial Data Generation and Estimation
This SAS script generates data following a negative-binomial distribution, then estimates its parameters (Mu, Kappa) ...
View code
Statistics
Simulation of Hurdle Poisson and Negative-Binomial Models
Simulation script generating data for count models with excess zeros (Hurdle Models) based on Poisson and Negative-Bi...
View code
Macro
Test program for _getpgmdesc
Test program for the _getpgmdesc functionality using 'brief' documentation tags.
View code
ETL, Reporting, Statistics
Basic SAS DATA and PROC Examples
This SAS script illustrates the fundamental concepts of DATA and PROC steps, including creating new variables, filter...
View code
ETL
Creating and Displaying Instream Data
This SAS script creates a temporary dataset 'instream_mtcars' from instream data provided directly in the code, then ...
View code
Data Exploration and Reporting
Introduction to SAS Studio Examples
This SAS script showcases various SAS Studio functionalities for data exploration, transformation, and visualization.
View code
ETL
Quiz Score Creation and Analysis
This SAS script illustrates the creation of a quiz scores dataset using the in-line entry method (DATALINES) and perf...
View code
Général
Sans titre
SAS script performing the creation of internal datasets, their sorting, and conditional merging to analyze student re...
View code
ETL
Restructuring BMI data via Data Step and Arrays
Educational example demonstrating how to transform a 'wide' format dataset (multiple measurement columns per row) int...
View code
Général
Sans titre
This SAS script implements Tarone's (1979) two-sided Goodness-of-Fit (GOF) test. It evaluates the null hypothesis of ...
View code
ETL
String Manipulation
This SAS script demonstrates various string manipulation techniques, including substring extraction, reversal, compre...
View code
Statistical
Basic statistical analysis of internal data
This SAS script reads numerical data from datalines, then performs a basic statistical analysis (number of observatio...
View code
Statistics
Score Test Statistic, Dean (1992)
This SAS script calculates Dean's (1992) score test statistic to assess the adequacy of a binomial distribution again...
View code
Statistical
Goodness-of-Fit (GOF) Test for DataSet III
This SAS script performs Goodness-of-Fit tests and generates Q-Q plots to analyze residuals from a dataset by Haseman...
View code
Statistical
Basic Frequency Reports
This program generates frequency counts for each unique value in the columns of the SASHELP.CARS table.
View code
Data Manipulation
Creation and Sorting of the CLASSTEST Table
Creation of a 'classtest' dataset via internal data, followed by sorting by name and subject.
View code
ETL
Data Filtering and Display with DATA STEP and PROC PRINT
Creates a dataset from integrated raw data, filters records to include only women, and displays the results. This scr...
View code
ETL
Processing and Displaying Individual Data
The SAS script creates a dataset named 'prob12_4' using embedded raw data (datalines). It reads the variables NAME, A...
View code
ETL
Examples of using PROC TRANSPOSE
This SAS script illustrates various uses of the PROC TRANSPOSE procedure to transform data structure, pivoting rows i...
View code
ETL
Many-to-One Merge of SAS Tables
Practical example of merging SAS datasets with a many-to-one cardinality relationship.
View code
Statistical
Comparing PROC SUMMARY and PROC MEANS
This SAS script compares the PROC SUMMARY and PROC MEANS procedures, highlighting their main differences in terms of ...
View code
Macro
Utility macro library for table management and interface
Script defining utility macros to delete, copy, and inspect SAS tables, as well as an interface command for the old d...
View code
Derniers codes ajoutés
Boost Performance & Security: Creating Composite Indexes and Passwords with PROC DATASETS
This example illustrates the modification of two SAS data sets using the MODIFY statement and its sub-statements. It shows how to: modify SAS files, label a SAS data set, add a read password to a SAS data set, indicate the current sort order of a SAS data set, create an index for a SAS data set, assign informats and formats to variables, rename variables, and label variables in a SAS data set.
ETL
SAS Data Step Efficiency: When to Use Explicit OUTPUT vs. Implicit Rules
Writes the current observation to a SAS dataset.
Data ManipulationCAS
Stop Struggling with Data Ingestion: Efficiently Move CSVs to Memory with PROC CASUTIL
The CASUTIL procedure offers several table and caslib management functions, including displaying table metadata, deleting files, unloading and loading tables, promoting tables, and saving tables.
ETLCAS
Beyond the WORK Library: Mastering the 4 Default SAS Libraries You Must Know
This document describes the default SAS libraries: Work (temporary), User (user), Sashelp, and Sasuser. It explains their role and behavior within the SAS Viya 4 environment.
Data Access
Seamless Integration: How to Attach Data Step Outputs Directly to SAS Viya Jobs
The SAS Viya Platform File Service allows storing, retrieving, and deleting files kept in the SAS Infrastructure Data Server database repository. This repository is not considered a complete 'file system' but contains individual files directly accessible by their file identifier (UUID).
Administration
From SAS 9 to Viya: The Ultimate Guide to Migrating User-Defined Formats to CAS
In the SAS Viya platform, you can store user-defined formats in catalogs for use in a SAS session, or you can store them in a format library on the CAS server. Format libraries are associated with a CAS session, or they can be promoted to global scope to be available to all CAS sessions. User-defined formats in a format library are server-side formats that the server uses when an analysis is performed based on formatted values. You can migrate existing user-defined formats from SAS to the SAS Viya platform.
ToolsCAS
Instant Performance Boost: Creating Indexes on the Fly with the INDEX= Data Set Option
Defines one or more indexes for a new output SAS data set.
Général
Stop Bloating Your Datasets: The Definitive Guide to Variable Selection with KEEP
Specifies variables to include in output SAS data sets.
ETLCAS
Combine and Conquer: Mixing Physical Paths and Existing Librefs in One LIBNAME Statement
Explains the concept of SAS library concatenation, allowing several libraries to be logically grouped under a single reference (libref).
Data Access
Stop Importing, Start Connecting: A Master Class in SAS/ACCESS Engines and SQL Pass-Through
This document provides examples of using SAS engines to access and process various types of external data, including delimited files, Excel files, databases (DBMS), XML, and JSON.
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. WeAreCAS is an independent community site and is not affiliated with SAS Institute Inc.
This site uses technical and analytical cookies to improve your experience.
Read more.