Getting Started with SAS Viya Copilot for SAS Visual Analytics
Recent Library Articles
Turn data into insights faster with AI-powered summaries, translations, and more. This post covers how SAS Visual Analytics leverages copilot and walks through its capabilities and interface, best practices for writing prompts, as well as some tips on responsible use.
SAS Forward: Real Stories, Live Demos and AI Innovation
Ask the Expert
Join us November 4-5 for SAS Forward, a virtual event exploring modern analytics, AI and intelligent decisioning. Discover real-world success stories, explore emerging trends, and see the latest SAS innovations in action through expert-led sessions and live demonstrations.
The Curiosity Cup is a global competition where students use data, analytics and AI to explore questions they care about. Whether your students build on coursework or pursue a new idea, you can adapt the competition to fit your course. Wondering what that flexibility looks like in practice? Explore answers to common questions from educators.
How can I fit the Curiosity Cup into my academic calendar?
Projects do not need to begin and end during the official registration and submission period (see below). Students can start exploring topics, conducting research, and developing their analysis earlier in the term, then use the competition period to complete and submit their work.
Registration runs from Dec. 1, 2026, to Jan. 31, 2027.
Papers can be submitted between Dec. 15, 2026, and Feb. 21, 2027.
Can I incorporate the Curiosity Cup into an existing course or project?
Absolutely! The Curiosity Cup can be integrated into coursework, capstone projects, independent studies, research projects, student organizations, or other enrichment activities.
How much time do educators need to commit?
Faculty involvement is flexible. Some educators integrate the competition into a course, while others provide occasional guidance, answer questions, or check in periodically. You can choose the level of support that works best for your students and your schedule.
What is the role of the faculty adviser?
Faculty advisers serve as mentors and coaches, like the role of a major professor guiding a master's student. Advisers may offer suggestions, feedback, critiques, and project guidance, but all project work must be completed by the students. Faculty advisers may advise multiple teams.
Do students need advanced analytics, AI, or SAS skills to participate?
No, students do not need to be experts to participate. Free SAS software, courses, and learning resources are available to help learners build skills as they develop their projects, making the competition accessible to students with a wide range of experience levels.
Can students use a project they have already started?
Yes. Students can build on work from a class, research project, independent study, or personal area of interest. The competition provides an opportunity to further develop, refine, and showcase that work.
Why should I encourage my students to participate?
The Curiosity Cup gives students an opportunity to apply their skills beyond the classroom while gaining experience that can support their academic and career goals. Participants can:
Create portfolio-ready work for résumés, applications, and professional profiles.
Strengthen data analysis, critical thinking, and problem-solving skills.
Gain experience communicating insights and presenting results.
Connect their learning to real-world challenges.
Earn recognition, digital badges, and prizes showcase their accomplishments.
Apply analytics to a topic they are passionate about.
How can I learn more?
Visit the Curiosity Cup webpage for more details and see examples of winning papers and video submissions. Be sure to add your name to the interest list so that you’ll be notified when registration opens.
... View more
I am performing an ordinal regression analysis with 10 predictors, reduced from an original set of 50. Sample size: N = 380. One of these predictors is the primary predictor of interest (Safety Hazards [SH], a continuous variable). The rest are potential confounders of the primary predictor or contributors to the model.
My primary outcome is Job Satisfaction (JS).
I distilled the 10 candidates from the original 50 by running ordinal bivariate regressions on each candidate.
a) A crude model [JS <-- (beta)*SH]
b) 49 adjusted models: [JS <-- (beta)*SH + any of the 49 predictors].
1. If any of the bivariate regressions produced a CIE of 10% or more for the primary predictor, SH, it made the list of 10, regardless of its p- value.
2. If any of the 50 candidates had a p- value of <= 0.1, regardless of its CIE value, it made it to the list of 10 as well.
I sort the list of 10 by CIE value and use that order to determine which variable to test next in the model.
I then begin the final fitting process to extract the most plausible confounders of SH and true model contributors from the 10 predictors. I use 2 different regression methods: Forward Stepwise Regression (FSR) and Backward Stepwise Regression (BSR).
The conditions to stay in the model are: "If the p-value > 0.1 and CIE <10%, then reject from the model; otherwise, retain."
In FSR, I start with a sparse (crude) model and sequentially add a predictor, then test whether it meets the retention criteria. If so, I retain it, add the next predictor to the new model, and apply the same retention/rejection criteria until all predictors have been tested.
In BSR, I start with a full model and sequentially remove predictors, one at a time, and perform similar rejection/retention tests as in FSR until all predictors have been tested.
However, I find that the FSR and BSR algorithms retain and reject different variables. To be clear, about 60% of variables are common to both algorithms.
My question is: why do FSR and BSR algorithms produce different results?
What is different about starting with a full model (BSR) versus a sparse model (FSR)?
What is different about starting with a sparse model (FSR) versus a full model (BSR)?
Please try to give an explanation that does not involve the term 'variance', as I tried to explain to my PI, only to be told that is the wrong way to explain it.
Thanks
David
... View more
Hi SAS DevTeam!
The DOPEN() and DNUM() functions do not show hidden files in a directory what leads to confusion and "inconsistent" results.
I know the bahavior of the DOPEN() and DNUM() is not a bug but rather a featur, but...
Imagine the following scenario:
User has 5 files in a directory, some of them are hidden, some are not (see Figure 1.).
User copies files form Windows machine to a network drive (on samba).
User runs code collecting files under local Windows folder, gets result X (see Figure 2. and 3., and Snippet 1.).
User runs code collecting files on the network drive, gets resylt Y.
X and Y are different... (see Figure 2.)
User is confused.
The issue grows fast when we are talking not about a single directory, but a whole tree of directories...
Solution: allow DOPEN() and DNUM() to list all files including hidden.
This could be delivered multiple ways:
1) create functions DOPENhidden() and DNUMhidden() that list hidden files,
2) add additional argument to DOPEN() and DNUM() that indicates hidden files listing, or
3) create an option LISTHIDDENFIELS that alters behavior of DOPEN() and DNUM().
All the best
Bart
Figure 1. Files under Windows (C:\test) , their copy on the network drive (TEST), and a view form console on that location (ls - a and ls).
Under Windows files test2.sas and test5.sas are hidden and .test1.sas is not, after copying (because of OSes behavior) test2.sas and test5.sas are no longer hidden, but .test1.sas starts to be.
Figure2.Execution of the file listing code on local (C:\TEST) and the network drive (H:\TEST). DOPEN() and DNUM() return different number of files depending on the location.
Figure 3.Execution of the same code under Linux SAS in SAS studio. (Just for bigger perspective)
Snippet 1. Code collecting files in a directory (parameter path).
%macro test123(path);
%put &=sysvlong4.;
data _null_;
fname="__F__";
rc1=filename(fname,"&path.");
rc1txt=sysmsg();
put rc1= rc1txt=;
rcf = FILEREF(fname);
rcftxt = sysmsg();
put rcf= rcftxt=;
rc2=dopen(fname);
put rc2=;
do i=1 to dnum(rc2) ;
fn=dread(rc2,i) ;
put i= " &path. " fn=;
end ;
rc3=dclose(rc2);
rc1=filename(fname);
run;
%mend test123;
... View more
Creating custom graphics can be daunting. Join this webinar to learn how you can create a truly custom graph step by step.
Watch the Webinar
In this webinar, you will learn to:
Start with a plot created with SG procedures and use TMPOUT to help generate GTL code.
Combine different graphs into one graph using GTL.
Understand what is meant by “gutter” in a multi-cell graph.
The questions from the Q&A segment held at the end of the webinar are listed below and the slides from the webinar are attached.
1. What is the type of chart applied to pre-summarized data?
If I am working with pre-summarized data in PROC SGPLOT, I use the plot statements that end in PARM, such as VBARPARM or HBARPARM. In GTL, the corresponding statement is BARCHARTPARM.
2. If I want to edit or update my colleague's/company-standard template in SAS, how can I do that? For example, I'd like to change the color of a line plot while keeping all the existing template settings.
I can retrieve the existing template code using PROC TEMPLATE and the SOURCE statement. Once I have the template source code, I can modify specific attributes, such as line colors, fonts, or styles, while preserving the rest of the template's settings.
3. For the side-by-side plot, how do you set up the same color patterns for different panels?
There are several ways to control color consistency across panels in GTL. Rather than relying on a single technique, I recommend reviewing my paper, What's Your Favorite Color? Controlling the Appearance of a Graph, which discusses multiple approaches for controlling graph appearance, color assignments, and style customizations.
4. Where is the TMPLOUT file written?
The TMPLOUT= option writes the file wherever I tell SAS to write it. I must specify the full path and filename when using the option.
5. Is the data for the latitude and longitude of the states publicly available, and where do I get it?
Yes. Publicly available geographic data is available from sources such as the U.S. Census Bureau's TIGER/Line files. SAS also provides map data and centroid information through SAS-supplied map data sets. If I have a licensed copy of SAS/GRAPH, I have access to additional SAS-provided maps. For custom geographic boundaries or third-party maps, I can use PROC MAPIMPORT to bring external data into SAS.
6. How can we add a break to the Y axis?
For example, 1-100 and then 500-900? In GTL, I can use the LINEAROPTS option within the axis options. Using INCLUDERANGES=, I can specify the ranges I want displayed on the axis and create the effect of a broken axis.
7. Can I also visualize time series data, for example financial markets data?
Yes. GTL supports a wide variety of plot types, including those used for time series and financial market data. It can also be used to create animated and interactive visualizations. For a complete list of available plot statements, I recommend reviewing the SAS documentation for both PROC SGPLOT and GTL.
8. What if you have two very different data sources and need one plot?
I typically stack the data into a single data set. This often results in some variables being populated only for specific plot elements, while other observations contain missing values. SAS uses the variables required for each plot statement and ignores the rest.
For an example of this technique, see my paper Great Time to Learn GTL: A Step-by-Step Approach to Creating the Impossible, which demonstrates how multiple sources can be combined to create a single complex visualization.
9. Does the SAS U.S. map contain Connecticut's new planning regions, or does it still use county FIPS codes?
For smaller geographic areas, SAS-supplied maps typically use standard geographic divisions such as counties. For planning regions, municipal districts, ZIP-code-level boundaries, or other specialized geographies, I recommend obtaining external map sources and importing them with PROC MAPIMPORT. Sources such as Esri shapefiles, Census TIGER/Line files, and KML files can be particularly useful.
10. What is the advantage of using LATTICE over GRIDDED?
The primary advantage of LATTICE is flexibility. While GRIDDED creates cells of equal size, LATTICE allows me to control row and column weights, adjust gutters, and create more complex nested layouts. This provides greater control over the appearance and proportions of the final output, which can be especially important when combining different graph types, such as maps and charts, in a single visualization.
Recommended Resources are at the end of the attached slide deck.
... View more
I would appreciate advice on moving an existing SAS simulation to a virtual machine and investigating a temporary-file failure. Program 08 ( 08_BOOTSTRAP_INDEPENDENT_LINK.sas ) is the independent-linking bootstrap component of a psychometric Monte Carlo study. It uses synthetic continuous scores with correlated latent variables and measurement error; this module does not use student records. The main statistical question is how uncertainty in the linking sample affects inference about the difference between the cut scores. A joint two-sample bootstrap resamples both the evaluation and linking samples. A comparison method holds the estimated linking cut score fixed. Outputs include bias, RMSE, bootstrap standard errors, and 95% percentile confidence-interval coverage and width. The full workload is: Six prespecified scenarios, varying correlation, prevalence, reliability, and sample size. 200 Monte Carlo replications per scenario: 1,200 result rows in total. 500 bootstrap resamples from each independent sample per replication. Sample sizes of 500, 2,000, or 5,000 in each sample. At n=5,000, one set of 500 resamples contains 2.5 million observations. The program uses SAS macros, DATA steps, PROC SQL, SORT, SUMMARY/MEANS, CORR, UNIVARIATE, and SURVEYSELECT with unrestricted sampling and OUTHITS. Validation fixtures also use PROC GENMOD. The interactive runner loads shared study modules and checks fixtures, dataset schemas, bootstrap counts, and expected results. Moving it would require the shared source files and updated folder paths. The current environment is Windows with SAS 9.4 TS1M7. SAS options include MEMSIZE=2 GiB, SORTSIZE=1 GiB, and CPUCOUNT=4. Related WORK-file failures have occurred in batch and interactive runs. The latest interactive run passed its initial fixtures but stopped after approximately 86 minutes, with 838 of 1,200 Monte Carlo result rows completed. The log reported Windows error 225 while opening WORK._RR_BC, a temporary .sas7bdat file: “Operation did not complete successfully because the file contains a virus or potentially unwanted software.” An I/O error followed. The SAS log does not identify the security product or establish whether the detection was a false positive. I am considering a SAS 9.4 VM test using the same scientific code, random seeds, full run settings, and validation checks, with the VM’s approved security configuration. I would welcome advice on VM sizing, SAS WORK storage, SAS maintenance level and required components, and experience investigating security-related blocks on temporary SAS datasets.
... View more