Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
tasktuesdays
MakeData.sas
README.md
repository.html
repository.xml

README.md

Custom Task Tuesday Examples

alt tag

The examples here are part of a SAS Communities article series called #CustomTaskTuesday. For more background on the series, Custom Tasks, or SAS Studio in general, check out the post introducing the series on the communities.

Descriptions of each task are located below, beginning with the most recent. Clicking the titles will lead you to the blog post on that task which will have step-by-step instructions on creating the task yourself. Tasks in this series include easy examples as well as more complex ones, so you'll be able to find something on your level whether you are just getting started or already know what you're doing.

Accessing this SAS Studio Repository

  1. In SAS Studio go to the main menu and select Preferences.
  2. On the Repositories tab of the Preferences dialog click the Add (+) button.
  3. On the Add Repository dialog in the Name field specify the name (Ex. Custom Task Tuesday Tasks) you would like to appear in the Tasks and Utilities tree. In the URL field specify https://sassoftware.github.io/sas-studio-tasks/contributed/tasktuesdays/repository.html for the URL.
  4. Save the definition.
  5. An icon with the name that you specified in the defintion (Ex. Custom Task Tuesday Tasks) will show up in your Tasks and Utilities panel. In the folder you will see sample SAS Studio tasks.

Additional Resources for writing SAS Studio Custom Tasks can be found here:

Task Tuesday Example List

Viya & V9 Data Summaries

This task combines the output from PROC MEANS (V9) and PROC CARDINALITY (Viya). The task will output CAS tables from both PROCs and then merge them into one summary CAS-table. For measures that are available in both PROC MEANS and PROC CARDINALITY, the PROC CARDINALITY measure was used (but they will be the same :) )

Viya Clustering & V9 Graphing

This task is an altered version of the built-in Viya Clustering task. It has added options for V9 histograms and correlations of interval variable and bar charts of nominal variables. Adding these options creates an end-to-end analytic task that allows users to investigate their input variables before examining the clustering output.

CAS Action Examples

This task allows the user to select from 3 types of information to output about their input CAS table, that will generate PROC CAS/CAS Action code: table information (tables.tableinfo), column information (tables.columninfo), and summary about data set (simple.summary).

One Click Load to CAS

This task is a modification of a previous task (Reducing Data Size Quickly Task), with an added check-box for an easy "one-click" load to CAS of the output data set. In the article, code is provided for both the DATA Step and the PROC CASUTIL approaches for loading data.

Customizing Report Options

The Report Options task allows the user to customize certain options for their report that will show up in your report of their results. The user will be able to change the title, color of the title, and add "text decoration" (underline, strike-through, etc) to the title of their report, which will all show up in the output window as well as in the PDF version of the report. It also allows to user to decide whether or not they want dates and page numbers, which will show up in the PDF version of the report.

Power and Sample Size Calculations for One Way Anova

SAS Studio has several built-in tasks for power and sample size calculations for different types of analyses, including pearson correlation, multiple regression, confidence intervals, t-tests, and more. However, there are a few other test options under proc power that are not covered under these built-in tasks, including the onewayanova option. This task is an extensively modified version of the built-in Pearson Correlation task that allows the user to calculate power and sample size for a one way anova test.

SAS Global Forum Paper: PROC IRT

This post will describes three custom tasks developed for PROC IRT (MyIRT, MyIRTModel, and MyIRTSurvey) from a SAS Global Forum paper written by my colleague Elliot Inman and I titled “Developing Your Own SAS Studio Custom Tasks for Advanced Analytics." It starts with a basic task, and builds up to a task that is more complex. The SAS Program "MakeData.sas" also goes along with this post.

Improvements on the Point Estimate Calculator Task

The Point Estimate Calculator 2.0 will allow the user to be able to select 2 variables for which to calculate estimates. The user will also be able to round their estimates to their desired decimal place, as well as be able to specify a where clause to subset their data.

Point Estimate Calculator Task

The Point Estimate Calculator task will allow the user to create row level Point Estimates for their dataset. The user can select any summary statistics they want to be included, and those will be combined back in with the row level data of the original dataset.

Itsy Bitsy Data Analysis Task

The Itsy Bitsy Data Analysis Task allows the user to do data analysis on their “itsy bitsy” dataset, using Fisher's Exact Test.

Text Analysis Task

The Text Analysis task performs a basic frequency analysis on text from Project Gutenberg. It will allow the user to input their own text URL from Project Gutenberg, or use one of the built in example texts.

Reducing Data Size Quickly Task

The Data Size Reduction task allows the user to delete variables from their dataset as well as delete duplicate records (across all variables, or by chosen by-variable) and outputs a new dataset with their specified name.

Creating a State Map Task

The Create State Map Task allows the user to create their own map of a State, and upload a dataset containing latitude and longitude coordinates to be put on the map.

Three-panel Visualization of a Distribution

The Three-Panel Visualization task puts a simple front end on this useful example from Rick Wicklin: A three-panel visualization of a distribution.

United Nations API Call Task

The UN API Task allows the user to download data from the public United Nations Comtrade API for specific reporting countries, partnering countries, and time periods. Then the task will output a trade flow analysis of the data.

Modifying the Existing Binning Data Task

The edited version of the built-in Bin Continuous Data Task will allow the user to output the scoring data code with the code file= statement for proc hpbin.

Dataset Directory Search Task

The dataset directory search task allows the user to input the name of their SAS library and the key word they want to search for, and then outputs a list of datasets that contain the keyword in their name, and a list of datasets that contain the keyword in their variable names.

Macro Proc Execution Task

The Macro Proc Execution allows the user to select a dataset and select any number of procs from a list to run on the chosen dataset.