Strengthen your programming skills with tips and techniques from the experts
Leonid Batkhan shows you how to automate and improve a sometimes onerous hands-on process of creating Excel workbooks.
Strengthen your programming skills with tips and techniques from the experts
Leonid Batkhan shows you how to automate and improve a sometimes onerous hands-on process of creating Excel workbooks.
A palindrome is a sequence of letters that is the same when read forward and backward. In brief, if you reverse the sequence of letters, the word is unchanged. For example, 'mom' and 'racecar' are palindromes. You can extend the definition to phrases by removing all spaces and punctuation marks
There are several alternatives to writing to a Microsoft Word file when you use the SAS® Output Delivery System (ODS). The RTF, TAGSETS.RTF and TAGSETS.RTF_SAMPLE destinations create an RTF formatted file. The WORD destination, which is still considered preproduction, creates a DOCX formatted file. The destinations provide many of the same functions, although some features are unique to each one. The destination that you choose might vary depending on your desired final output.
SAS can generate animations in GIF or SVG format. The SAS system option ANIMDURATION can specify the duration of a frame corresponding to the appropriate FPS.
A common question on SAS discussion forums is how to randomly assign observations to groups. An application of this problem is assigning patients to cohorts in a clinical trial. For example, you might have 137 patients that you want to randomly assign to three groups: a control group, a group
If you use formatted variables in a CLASS statement in procedures such as MEANS or UNIVARIATE, SAS will use the formatted values of those variables and not the internal values. For example, consider you have a data set (Health) with variables Subj, Age, Weight, and Height. You want to see
Many modern statistical techniques incorporate randomness: simulation, bootstrapping, random forests, and so forth. To use the technique, you need to specify a seed value, which determines pseudorandom numbers that are used in the algorithm. Consequently, the seed value also determines the results of the algorithm. In theory, if you know
SAS ViyaではCData JDBC Driverを使って下記のソーシャルメディア・ファイルストレージサービスにシームレスにかつ、素早く連結できます。 ・Facebook ・Google Analytics ・Google Drive ・Microsoft OneDrive ・Odata ・Twitter ・YouTube Analytics 本日はCData JDBCドライバーを使ってTwitterと連携し、「天気」に関するツイートを取得してみたいと思います。順番通り説明しますので、最後までお読みいただき、皆さんも是非ご活用ください。 1. Twitter API利用申請 Twitter Developer PlatformにてTwitter APIの利用申請を行います。申請にあたり、名前と住んでいる地域、利用目的などの情報を提供する必要がありますので、事前に用意しておいてください。また、利用申請の承認はTwitter側で数日かかる場合がありますのでご了承ください。 Twitter APIの利用申請が終わったら、申請完了のメールが届きます。 また、申請の検討が終わり、Twitter APIが利用できる状態になりましたら、「Account Application Approved」というメールが届きます。 2. CData Twitter JDBC Driverインストール インストールにはSASの契約とは別途、CData社との契約が必要ですが、30日間トライアルで使うことも可能ですので、ご紹介します。 まず、CData Twitter JDBC Driverインストールページにアクセスします。 次に、Downloadクリックします。 Download Trialをクリックします。 適切なOSを選択してDownloadをクリックします。今回はWindowsを選択しました。 ダウンロードされたTwitterJDBCDriver.exeファイルを開き、画面に表示されるステップに従ってインストールを完了します。 3. Connection String生成
In categorical data analysis, it is common to analyze tables of counts. For example, a researcher might gather data for 18 boys and 12 girls who apply for a summer enrichment program. The researcher might be interested in whether the proportion of boys that are admitted is different from the
In The Essential Guide to Bootstrapping in SAS, I note that there are many SAS procedures that support bootstrap estimates without requiring the analyst to write a program. I have previously written about using bootstrap options in the TTEST procedure. This article discusses the NLIN procedure, which can fit nonlinear
Recently, I wrote about Bartlett's test for sphericity. The purpose of this hypothesis test is to determine whether the variables in the data are uncorrelated. It works by testing whether the sample correlation matrix is close to the identity matrix. Often statistics textbooks or articles include a statement such as
To a numerical analyst, numerical integration has two meanings. Numerical integration often means solving a definite integral such as $$int_{a}^b f(s) , ds$$. Numerical integration is also called quadrature because it computes areas. The other meaning applies to solving ordinary differential equations (ODEs). My article about new methods for solving
Recently, I showed how to use a heat map to visualize measurements over time for a set of patients in a longitudinal study. The visualization is sometimes called a lasagna plot because it presents an alternative to the usual spaghetti plot. A reader asked whether a similar visualization can be
Welcome back to my SAS Users blog series CAS Action! - a series on fundamentals. This post builds upon CAS-Action! Create Columns in CAS Tables - Part 1 by showing how to add formats and modify the length of computed columns. I'll start by building off the following code where I
SASPy and the SAS kernel for Jupyter Notebook enable you to connect to SAS® 9.4 and the SAS® Viya® compute server from your client machine. You can then interact with SAS and SAS Viya via Python. If you are not familiar with SASPy and the SAS kernel, this article provides an introduction.
Welcome back to my SAS Users blog series CAS Action! - a series on fundamentals. I've broken the series into logical, consumable parts. If you'd like to start by learning a little more about what CAS Actions are, please see CAS Actions and Action Sets - a brief intro. Or if you'd
Welcome back to my SAS Users blog series CAS Action! - a series on fundamentals. I've broken the series into logical, consumable parts. If you'd like to start by learning a little more about what CAS Actions are, please see CAS Actions and Action Sets - a brief intro. Or if you'd
The graph to the right is the quantile function for the standard normal distribution, which is sometimes called the probit function. Given any probability, p, the quantile function gives the value, x, such that the area under the normal density curve to the left of x is exactly p. This
Have you ever heard something referred to as the bee’s knees? Most likely the person uttering that expression meant that it was truly amazing and extraordinary. Maybe you stopped and pondered the origin of the phrase. Well wonder no more! In the 1920s in the United States, people were obsessed
Oh, no! Your boss just told you to change the way that SAS displays certain features in graphs, such as missing values. But you have a library of hundreds of SAS programs! Do you need to modify all of your previous programs? Fortunately, the answer is no. SAS provides ODS
In an article about how to visualize missing data in a heat map, I noted that the SAS SG procedures (such as PROC SGPLOT) use the GraphMissing style element to color a bar or tile that represents a missing value. In the HTMLBlue ODS style, the color for missing values
Longitudinal data are measurements for a set of subjects at multiple points in time. Also called "panel data" or "repeated measures data," this kind of data is common in clinical trials in which patients are tracked over time. Recently, a SAS programmer asked how to visualize missing values in a
This article shows how to compute properties of a discrete probability distribution from basic definitions. You can use the definitions to compute the mean, variance, and median of a discrete probability distribution when there is no simple formula for those quantities. This article is motivated by two computational questions about
In my previous blog, you saw how to create a Beale cipher. In this blog, you will see a program that can decode a Beale cipher. As a reminder, here is a list of numbers that you can use as a substitute for a letter when creating your cipher. Now,
Statistical programmers need to access numerical constants that help us to write robust and accurate programs. Specifically, it is necessary to know when it is safe to perform numerical operations such as raising a number to a power without exceeding the largest number that is representable in finite-precision arithmetic. This
One approach to creating the Wordle game in the SAS programming language. Ready to play?
A previous article showed how to use SAS to compute finite-difference derivatives of smooth vector-valued multivariate functions. The article uses the NLPFDD subroutine in SAS/IML to compute the finite-difference derivatives. The article states that the third output argument of the NLPFDD subroutine "contains the matrix product J`*J, where J is
On this Pi Day, let's explore the "πth roots of unity." (Pi Day is celebrated in the US on 3/14 to celebrate π ≈ 3.14159....) It's okay if you've never heard of the πth roots of unity. This article starts by reviewing the better-known nth roots of unity. It then
For Pi Day, veteran SAS user Leonid Batkhan reveals a pi paradox.
Did you know that you can use π to partition the positive integers into two disjoint groups? It's not hard. One group is generated by the integer portions of multiples of π. The FLOOR function gives the integer portion of a positive number, so you can write integer that are