Statistical
Weighted Data Analysis: How to Calculate Qualification Rates in SAS CA

This example demonstrates how to use an IF-THEN statement to count credit-qualified individuals, and then how to crea...

View code
Data Manipulation
Mastering SAS CAS: How to Dynamically Alter Table Labels and Formats with PROC CAS

This example applies labels and formats to columns of a CAS table using the ALTERTABLE action, then displays the form...

View code
Statistics
Processing Millions of Rows with SAS PROC ASSESS

This documentation explains how to use the ASSESS procedure to evaluate the performance of binary classification mode...

View code
Data Manipulation
Scalable Data Pipelines: Appending CAS Tables without Full Reloads via PROC CAS

This action allows you to append the rows of a source table to the end of an existing target table in a SAS Cloud Ana...

View code
Data Manipulation
Smart Partitioning: How to Filter and Append Large-Scale CAS Tables in One Step

This feature allows adding rows from a source table to an existing target table in CAS, using the 'WHERE' parameter t...

View code
Data Access
Streamline Your Data Pipeline: How to Create Global Oracle Caslibs for Distributed Analytics

This feature allows adding a caslib to connect to an Oracle database in SAS Viya 4, making data accessible in memory ...

View code
Data Access
Beyond the Work Library: Mounting Server Directories in CAS using table.addCaslib

This feature allows adding a caslib (CAS library) based on a file system path, facilitating access to data stored on ...

View code
Data Manipulation
SAS Viya Data Lifecycle: How to Upload, Persist, and Drop CAS Tables with PROC CAS

This script illustrates the actions of the 'table' action set in SAS Viya 4 for managing in-memory tables. It covers ...

View code
Data Manipulation
Stop Deleting Observations! How to Fix Missing Values in SAS without Biasing Your Model

This script illustrates the use of the MI procedure to perform multiple imputation on a dataset containing missing va...

View code
Statistics
The Pro Way to Fix Missing Data Bias: Parameter Estimation via PROC MI EM Action

This SAS script illustrates the use of the PROC MI procedure to calculate EM (Expectation-Maximization) algorithm est...

View code
Statistical
Realistic Data Imputation: How to Use SAS PROC MI to Fill Gaps without Distorting Your Distribution

This script illustrates the use of the MI procedure to impute missing values in a fish dataset, using a regression me...

View code
Statistical
Fixing Missing Data in SAS: A Guide to Multiple Imputation with PROC MI and MCMC

This script performs multiple imputation on a fitness dataset containing missing values, using the MI procedure with ...

View code
Statistical
Don’t Delete Your Data! How to Use SAS PROC MI to Fix Missing Values Fast

This script illustrates the use of the MI (Multiple Imputation) procedure to impute missing values in a fitness datas...

View code
Statistical
Analyzing Stability Studies: How to Model Batch-to-Batch Variation Using SAS PROC MIXED

Analysis of a random coefficients model using the MIXED procedure to simulate pharmaceutical stability data.

View code
Statistical
The Ultimate SAS MIXED Model Template: Analyzing Crop Yields under Variable Irrigation Levels

This SAS script analyzes data from a sprinkler irrigation experiment using a linear mixed model (PROC MIXED) to evalu...

View code
Macro
SAS Macro Programming: How to Extract the Last Word from Any Delimited String

The LASTWORD macro returns the last word from a delimited list of words. This is useful for some generic forms of BY ...

View code
Macro
Building Interactive SAS Applications: Using %WINDOW and PROC PMENU for Dynamic Data Reporting

Interactive SAS macro that uses a series of windows to allow the user to specify a data set, variables, and options t...

View code
Statistical
Bayesian Breakpoint Analysis: Detecting Structural Changes in SAS with PROC MCMC

Analyzes a dataset to detect a change point using Bayesian modeling with the MCMC procedure.

View code
Statistical
Stop Fearing Censored Data! The Essential Guide to Bayesian Normal Regression in SAS

This SAS script uses PROC MCMC to perform normal regression with interval censoring.

View code
Statistic
The Ultimate Guide to Growth Curve Modeling: Estimating Individual Slopes via PROC MCMC

Example of PROC MCMC to fit a Bayesian multivariate normal random-effects model, modeling the weight of rats over time.

View code
Statistical
Beyond Imputation: Accounting for Missing Data Uncertainty with SAS PROC MIANALYZE

This script illustrates regression analysis on a dataset with missing values, using multiple imputation (PROC MI) and...

View code
Statistics
The Ultimate Guide to Model Selection: How to Find the Perfect K-Components in SAS

This script uses the HPFMM procedure to analyze the distribution of galaxy velocities, by fitting normal mixture mode...

View code
Statistical
High-Performance Logistic Regression: Mastering Binomial Modeling in SAS PROC HPGENSELECT

Example of using PROC HPGENSELECT to model data with a binomial distribution, using the events/trials syntax.

View code
Statistical
Mastering Decision Trees in SAS: A High-Performance Guide to PROC HPSPLIT

Creates a decision tree using the HPSPLIT procedure on randomly generated data to model a binary variable.

View code
ETL
Beyond Mock Data: Building a Statistical Test Matrix for Complex SAS Simulations

This SAS script generates a synthetic dataset simulating electronic component tests for different vendors, then expor...

View code
Data Access
Parsing JSON at Scale: Building a Dynamic SAS Macro for Multi-Year API Extractions

Macro script to extract statistical data from the Korean public API (KOSIS), transform it, and save it as SAS tables.

View code
Statistical
Mastering Fractional Factorial Designs: Analyzing Aliasing and Confounding in SAS PROC GLM

SAS library example illustrating the use of PROC GLM for the analysis of a screening design (fractional factorial exp...

View code
Statistical
The Ultimate Signal Smoothing Hack: Recovering the Bumps Function using PROC GLMSELECT

This script illustrates the use of PROC GLMSELECT to fit a model with spline effects, using Donoho and Johnstone's 'B...

View code
Statistics
The Ultimate SAS Model Tuning Guide: How to Automate Regressor Selection with PROC GLMSELECT

Example of model selection with the GLMSELECT procedure, using LASSO and Group LASSO methods on simulated data.

View code
Statistics
Mastering Diallel Analysis in SAS: Using PROC GLIMMIX for Multi-Member Random Effects

This SAS script implements a mixed linear model analysis on data from a diallel cross experiment, using the GLIMMIX p...

View code
Statistical
Optimizing Multilevel Logistic Models in SAS: Mastering Quadrature and the FASTQUAD Option

This SAS example illustrates the use of the GLIMMIX procedure for the analysis of generalized mixed models with the q...

View code
Statistical
High-Performance Count Data: Accelerate Your Bayesian Mixture Models in SAS Viya

Example of using the HPFMM procedure to model count data with an excess of zeros (Zero-Inflated) via Poisson regressi...

View code
Administration
Auditing SAS 9 Metadata: How to Automate Database Library and Connection Inventories

This script extracts information about database management system (DBMS) type libraries defined in a SAS 9 metadata s...

View code
Administration
Beyond the Management Console: Automating SAS Deployment Reports with Metadata Functions

This SAS script extracts the list of deployment directories defined in SAS metadata, along with associated files and ...

View code
Macro
Auditing the SASAUTOS Library: How to Map and Resolve Macro Autocall Paths

SAS macro to parse the SASAUTOS system option and extract the list of macro search paths.

View code
Reporting
Automating SAS Graphics: How to Build a Dynamic GIF Export Macro with Custom GOPTIONS

SAS macro to configure GOPTIONS graphic options for generating files in GIF format.

View code
Statistical
Beyond Basic Poisson: How to Solve the "Excess Zeros" Problem Using SAS Mixture Models

Analysis of count data exhibiting an excess of zeros, using the FMM procedure to fit Poisson regression models, zero-...

View code
Statistical
When One Bell Curve Isn't Enough: Modeling Multimodal Data with SAS PROC FMM

This script performs a statistical analysis on galaxy velocity data using the FMM (Finite Mixture Models) procedure t...

View code
Statistical
Stop Copy-Pasting: Automate PROC FREQ Across Multiple Datasets with One SAS Macro

This SAS script creates two tables (males and females) and uses a macro to perform a frequency analysis (PROC FREQ) o...

View code
Statistical
Comparison of Regression Models with PROC GLM and Macros

This SAS script defines and uses two macros to perform a regression analysis. It creates a dataset, then uses the GLM...

View code
ETL
SAS Data Step Logic: A Guide to Calculated Columns, Range Comparisons, and Conditional Grading

This SAS script illustrates different ways to calculate averages, assign grades based on thresholds, and use logical ...

View code
Data Manipulation
String Manipulation in SAS: How to Split File Paths Without Hardcoding

Macro-program to decompose an absolute file path into file name and parent path.

View code
Général
Automate Your Environment: A Smart Script to Dynamically Load SAS Macro Libraries

Utility macro to dynamically add a path or fileref to the autocall macro search list (SASAUTOS system option).

View code
Statistics
SAS PROC GLM Guide: Mastering the Transition from ANOVA to ANCOVA

This SAS script performs several statistical analyses, mainly ANOVA and ANCOVA, on various datasets. Data are created...

View code
Statistical
Survival Analysis in SAS: A Complete Guide to PROC LIFETEST, Kaplan-Meier, and Life Tables

This SAS script demonstrates several survival analysis techniques using the LIFETEST procedure. It covers the life-ta...

View code
Statistical
Distributional Analysis and Empirical Cumulative Distribution Function (ECDF)

This SAS script defines and uses two macros to analyze and visualize the distribution and the empirical cumulative di...

View code
Macro
Stop Copy-Pasting: A Universal SAS Macro to Automate Repetitive List Operation

Function-style macro that allows editing a list of space-delimited items by applying a modification string to each item.

View code
Administration
Unlock System Metadata: Using the SAS PIPE Engine to Read OS-Level Commands

Macro to write system and user environment variables to a SAS dataset.

View code
Statistic
Mastering Medication Adherence: A Complete SAS Guide to Calculating PDC (Percent of Days Covered)

Calculates the Percent of Days Covered (PDC) for patients over defined time intervals, based on medication dispensing...

View code
Macro
Dynamic Graph Generation by Stock

This script uses a SAS macro to dynamically generate a distinct PDF report for each stock present in the SASHELP.STOC...

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 Manipulation CAS
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.
ETL CAS
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.
Tools CAS
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.
ETL CAS
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.
Data Access