class: inverse layout: true --- #Descriptive Statistics ### with group variable
See Also
`Descriptive Statistics (unstacked data)`
.footer[ .half-col[
Return to the manual
] .half-col[ Click or tap to continue ] ] --- ### Group variable This command is a version of the
`Descriptive Statistics`
command that uses different input data layout: observations are in a single column with another column (group variable) indicating which sub-group they belong to. A group variable must have the same number of cases (rows) as the variable with observations. ### Data layout .row[ .col-1-6[ ] .col-1-3[ .center[ `Descriptive Statistics`
`with group variable`
.smaller[ *Values of the group variable `Gender` define the sub-groups for observations.* ] ] ] .col-1-3[ .center[ `Descriptive Statistics`
.smaller[ *Each row is an observation and each column is a sub-group.* ] ] ] ] --- ### When to use For example, if you have an annual salary survey results with additional information about a respondent - gender and the highest level of education completed, you may be interested to get a summary of the salary differences *between males and females*, and *between respodents with different education level*. So to use the `Descriptive Statistics` command for raw data (each row represents a respondent) you are required to *unstack* the `Salary` variable by `Gender` and by `Education`. With a group variable you can quickly recalculate statistics with a different grouping. >
>Data from the
`Stacked and unstacked data`
workbook, `Data2` sheet. --- .left-column[ ## Data Input Group variable ] .right-column[ - Open the
`Stacked and unstacked data`
workbook.
.smaller[
How to open a dataset with example. ]
- Run the command: > .code-grey[Statistics→] `Basic Statistics→Descriptive Statistics (with group variable)` - Select the `Mortality rate` column as `Variable`. - Select the `Income` column as `Group`.
- Under the `Advanced Options`: - Select the `Single Table` value for the `Report` option. - Click the `OK` button. ] --- .left-column[ ## Results ] .right-column[ The produced report is identical to the one we got using the `Descriptive Statistics` command for unstacked data. See the
`Descriptive Statistics`
command tutorial to know more about the report options. >
] --- # Thanks for watching! >
Return to the manual
>
Repeat the slideshow
Related topics: >
`Descriptive Statistics`
Still have questions? >
Contact us