This tutorial will have some very simple examples that are not complex but simple enough that they should be easy to follow. These examples will include some definitions, how to get data into a table format, how to add and remove cells, and finally a report that will present the results for all the analysis that was performed. It will also include the process of creating a table that will allow us to make comparisons between various variables.
The first example will compare a very simple type design, with many rows and columns of numbers, with a nested type design. For this type of design we want to know how much weight each cell has. The numeric variable is in a column and the column variable is in a row. We would like to know the number of cells that have a value and how many have a value that is equal to or less than the numeric value in the first cell.
Let’s say we have six cells and we want to compare them to each other. Using a relational database, we could combine them by using a null value as the comparison criteria. We would then group all the cells and then do a count on the group. The result would be the count of the cells that have a value that is greater than zero.
In this example we would like to compare the column value with the numeric value. We would also like to know how many cells have a value of two. Again we would use a relational database to group the cells and then subtract the numeric value from the column value.
The next example will use a simple wrapper table for our first two variables. The wrapper table is a table with columns for the two variables. We will group the cells by the name of the column and then calculate the average values for those cells.
The next example will look at how to use the data type that is used for our SAS functions. We want to know how many cells have a numeric value. Then we want to know how many cells have a text value. We also want to know the median. We can compute these variables by doing the division of the text values and the numeric values.
The next example is the formula to use the grouping and counting functions. We will group the rows and then apply the count function to all the cells in the group. We will then use the median function to get the median. We want to do this in one operation. We want to do this in a single expression.
The next example uses the data types to determine the number of elements in the series. We will use the group and count functions and then use the series type. We want to compute the total number of elements in the series and the sum of the series. This would give us the number of elements in the series that satisfy the condition.
The next example will use the sample x notation to calculate the mean and standard deviation of a series. We will do the same thing as the previous example except we will do it in a single expression. We will use the mean of the series and the standard deviation of the series to get the mean and standard deviation of the series.
This final example will use the summation in two ways. Wewill use the sum of the previous example and the difference of the previous example. We will use the average of the previous example and the product of the previous example.
The final example will use two variables that represent group averages. One variable will be the mean of the whole group and the other variable will be the sum of the group averages. We will use a join procedure to join the group averages to the actual group averages.