Posts Tagged ‘ Getting Started ’

The sweep operator: A fundamental operation in regression

April 18, 2018
By
The sweep operator: A fundamental operation in regression

The sweep operator performs elementary row operations on a system of linear equations. The sweep operator enables you to build regression models by "sweeping in" or "sweeping out" particular rows of the X`X matrix. As you do so, the estimates for the regression coefficients, the error sum of squares, and

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on The sweep operator: A fundamental operation in regression

The chi-square test: An example of working with rows and columns in SAS

April 2, 2018
By
The chi-square test: An example of working with rows and columns in SAS

As a general rule, when SAS programmers want to manipulate data row by row, they reach for the SAS DATA step. When the computation requires column statistics, the SQL procedure is also useful. When both row and column operations are required, the SAS/IML language is a powerful addition to a

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on The chi-square test: An example of working with rows and columns in SAS

How to use FIRST.variable and LAST.variable in a BY-group analysis in SAS

February 26, 2018
By
How to use FIRST.variable and LAST.variable in a BY-group analysis in SAS

My article about the difference between CLASS variables and BY variables in SAS focused on SAS analytical procedures. However, the BY statement is also useful in the SAS DATA step where it is used to merge data sets and to analyze data at the group level. When you use the

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on How to use FIRST.variable and LAST.variable in a BY-group analysis in SAS

The difference between CLASS statements and BY statements in SAS

February 14, 2018
By
The difference between CLASS statements and BY statements in SAS

When I first learned to program in SAS, I remember being confused about the difference between CLASS statements and BY statements. A novice SAS programmer recently asked when to use one instead of the other, so this article explains the difference between the CLASS statement and BY variables in SAS

The post Read more »

Tags: , , ,
Posted in SAS | Comments Off on The difference between CLASS statements and BY statements in SAS

What is rank correlation?

August 14, 2017
By

When someone refers to the correlation between two variables, they are probably referring to the Pearson correlation, which is the standard statistic that is taught in elementary statistics courses. Elementary courses do not usually mention that there are other measures of correlation. Why would anyone want a different estimate of

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on What is rank correlation?

The IFN function versus the IF-THEN/ELSE statement in SAS

June 7, 2017
By

I have previously discussed how to define functions that safely evaluate their arguments and return a missing value if the argument is not in the domain of the function. The canonical example is the LOG function, which is defined only for positive arguments. For example, to evaluate the LOG function

The post Read more »

Tags: ,
Posted in SAS | Comments Off on The IFN function versus the IF-THEN/ELSE statement in SAS

A simple trick to construct symmetric intervals

April 10, 2017
By

Many intervals in statistics have the form p ± δ, where p is a point estimate and δ is the radius (or half-width) of the interval. (For example, many two-sided confidence intervals have this form, where δ is proportional to the standard error.) Many years ago I wrote an article

The post Read more »

Tags: , , ,
Posted in SAS | Comments Off on A simple trick to construct symmetric intervals

LEAVE and CONTINUE: Two ways to control the flow in a SAS DO loop

March 15, 2017
By

SAS programmers who have experience with other programming languages sometimes wonder whether the SAS language supports statements that are equivalent to the "break" and "continue" statements in other languages. The answer is yes. The LEAVE statement in the SAS DATA step is equivalent to the "break" statement. It provides a

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on LEAVE and CONTINUE: Two ways to control the flow in a SAS DO loop

Welcome!

SAS-X.com offers news and tutorials about the various SAS® software packages, contributed by bloggers. You are welcome to subscribe to e-mail updates, or add your SAS-blog to the site.

Sponsors







Dear readers, proc-x is looking for sponsors who would be willing to support the site in exchange for banner ads in the right sidebar of the site. If you are interested, please e-mail me at: tal.galili@gmail.com
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.