Macro Programs
SAS Macro Compilation and Usage with MCOMPILENOTE

This script illustrates the process of compiling SAS macros and using the `MCOMPILENOTE=ALL` system option to get com...

View code
Macro
SAS Macro Definition and Verification

This script illustrates the definition of a simple SAS macro and the verification of its registration in the temporar...

View code
Général
Sans titre

This script illustrates calling a SAS macro (`%puttime`) to display the current time in the log, demonstrating macro ...

View code
Administration
Automatic Launch of Excel via DDE

Script checking if Excel is open via DDE protocol and launching it via Windows system commands if necessary.

View code
Data Manipulation
Removing left spaces with the LEFT function

Script illustrating the use of the LEFT function to remove leading spaces from a character string.

View code
Data Processing and Reporting
Date calculations and late payment detection

This SAS script performs temporal calculations using the INTCK function, generates random payment data, and identifie...

View code
ETL
CASL and FedSQL Join Examples

This SAS script demonstrates different methods for performing joins on baseball data within the SAS Viya 4 environmen...

View code
Macro
Using %EVAL and %SYSEVALF Functions

Demonstrates the use of the %EVAL and %SYSEVALF macro functions to perform arithmetic calculations on macro variables...

View code
Macro
Using the %INDEX macro function

This SAS script illustrates the use of the %INDEX macro function to search for a substring within a string, and highl...

View code
Macro
Using the %SYSEVALF Macro Function

This SAS script demonstrates the use of the %SYSEVALF macro function to evaluate arithmetic and logical expressions, ...

View code
Macro
Definition of the Prtlast macro

This script defines a utility macro named %prtlast that displays data from the most recently created table in the SAS...

View code
ETL
Data Filtering with the IN operator

Creating a data subset by filtering on the age variable using the IN operator.

View code
Statistical
Example Documentation for PROC INBREED

This script illustrates the use of PROC INBREED to calculate inbreeding and covariance coefficients in non-overlappin...

View code
Général
Sans titre

This SAS script calculates inbreeding and relationship coefficients for a swine population and identifies the least r...

View code
Data Preparation
Custom INVALUE Format Definition

Defines a custom INVALUE format 'infNum' to map specific character strings to numerical values, including handling 'o...

View code
Administration
Environment Configuration and Dependency Loading

Configuration script defining the working directory, initializing a library, and loading several external utility mac...

View code
ETL
Format Management and Data Transformation

This SAS script defines and uses formats to standardize and transform date data as well as categorical text responses.

View code
Statistical
Example 1 for PROC ICPHREG

This script is an introductory example to the ICPHREG procedure, illustrating interval-censored survival data analysi...

View code
Macro
Using the IFC macro function for OS detection

Example of using the `ifc` function via `%sysfunc` to execute immediate conditional logic in the macro language.

View code
Général
Sans titre

Defines and uses an 'ifelse' utility macro for conditional evaluation of character strings.

View code
Development
Mastering Conditional Logic: SAS IF-THEN-ELSE Structures

Generic example of an IF-THEN-ELSE conditional structure in SAS for execution flow control.

View code
ETL
CSV Data Import and Verification

This SAS script imports an external CSV file (`np_traffic.csv`) into a SAS table named `traffic`, then displays the m...

View code
Macro
Macro Import - Dependency Management

Fundamental utility macro for intelligent import and dependency management of SAS macro files.

View code
Statistical
Interval-Censored Survival Analysis with PROC ICLIFETEST

This SAS script illustrates the use of the ICLIFETEST procedure to perform non-parametric survival analysis on interv...

View code
Statistical
Example 4 for PROC ICLIFETEST

Analysis of interval-censored survival data comparing two treatments (RT and RCT) using imputed scores and a permutat...

View code
Statistical
Introduction Example for PROC ICLIFETEST (ICLFTGS1)

This script is the first introductory example for the ICLIFETEST procedure (Interval Censored Life Test). It analyzes...

View code
Statistical
Convergence Status Example with PROC MIXED

This SAS script illustrates how to monitor and capture the convergence status of iterative statistical models using t...

View code
Statistical
Unbalanced Variance Analysis with EFFECTPLOT (ICOMEP2)

Example of unbalanced two-factor variance analysis using PROC GENMOD and the EFFECTPLOT statement for visualization.

View code
Statistical
Example Documentation for PROC ICPHREG

This script is an example of using the ICPHREG procedure to fit a proportional hazards regression model on interval-c...

View code
Statistical
Interval-censored survival analysis using PROC ICPHREG

Example of fitting a proportional hazards model to interval-censored data using cubic splines for the baseline hazard...

View code
Statistical
Example Documentation 3 for PROC ICPHREG

Example of fitting a proportional hazards model with interval censoring using cubic splines for the baseline hazard.

View code
Statistical
Analysis with PROC HPSPLIT

This script illustrates the use of PROC HPSPLIT for statistical modeling on baseball data and displaying the results.

View code
Statistical
Getting Started Example for PROC HPSPLIT - Wine Classification

Example script illustrating the creation of classification trees to predict wine cultivars.

View code
Data Integration
HTTP POST Request and JSON Processing

This script performs an HTTP POST request to an external URL and processes the received JSON response.

View code
Général
Sans titre

This script illustrates the use of PROC CALIS for Structural Equation Models (SEM) analysis, with several model speci...

View code
Statistical
Example Documentation 1 for SEM Introduction

This SAS script demonstrates the use of the CALIS procedure for Structural Equation Modeling (SEM) analysis, focusing...

View code
Statistical
Example 1 for PROC ICLIFETEST (Interval-Censored Data)

This SAS script illustrates the use of the ICLIFETEST procedure for the analysis of duration data with interval censo...

View code
Statistical
Example 2 PROC ICLIFETEST - Cosmetic Data

Example of using the ICLIFETEST procedure for the analysis of interval-censored survival data, comparing two treatments.

View code
Statistical
Example Detail Section for PROC HPQUANTSELECT

This SAS script demonstrates the use of PROC HPQUANTSELECT with examples of class variables and model selection.

View code
Statistical
Example 1 for PROC HPQUANTSELECT

This SAS script simulates data and uses the PROC HPQUANTSELECT procedure to perform quantile regression model selecti...

View code
Statistical
Example of Details Section for PROC HPREG

This SAS script generates a synthetic dataset and then uses the HPREG procedure to perform high-performance regressio...

View code
Statistical
Regression Analysis with PROC HPREG on Simulated Data

This script simulates a dataset and applies the HPREG procedure for regression analysis with ForwardSwap model select...

View code
Général
Sans titre

Analysis of Major League Baseball (MLB) player salaries from 1986 using the HPREG procedure for model selection.

View code
Statistical
Decision Tree Model with PROC HPSPLIT

This script uses the PROC HPSPLIT procedure to build and evaluate decision tree models using cross-validation and cos...

View code
Statistical
Getting Started Example for PROC HPNLMOD

Estimating Parameters Using Maximum Likelihood

View code
Statistical
Comparison of methods for PROC HPPLS

This SAS script compares the results of three multivariate regression analysis methods (RRR, PCR, PLS) using the HPPL...

View code
Statistical
Example 4 PROC HPGENSELECT: LASSO Model Selection

This script illustrates the use of the HPGENSELECT procedure to perform LASSO model selection on simulated data.

View code
Statistical
Getting Started Example for PROC HPLMIXED

This SAS script generates a synthetic dataset named 'SchoolSample' and then applies a generalized mixed models analys...

View code
Statistical
Example 2 for PROC HPMIXED

This SAS script compares the use and results of HPMIXED and MIXED procedures for mixed linear model analysis.

View code
Statistical
Example 3 PROC HPMIXED: Joint use with PROC GLIMMIX

Demonstration of using PROC HPMIXED to estimate parameters on a large simulated dataset, then transferring these esti...

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