How to stack variables in Statistica?

How to stack variables in Statistica?

book

Article ID: KB0074123

calendar_today

Updated On:

Products Versions
Spotfire Statistica 13.1 and higher

Description

This article gives an example of how to stack variables in a Statistica workspace. The stacking example in the interactive module is explained here

Issue/Introduction

How to stack variables in Statistica?

Environment

Windows

Resolution

1. When Statistica is open , click "File | Open Examples | Datasets" and open "Cat Clinic.sta" spreadsheet.

2. Under "Home" tab, click "Add to Workspace" to add the data into a new workspace.

3. Under "Data" tab, click "Stack | Stacking" to insert Stacking node into the workspace. (Note: you can also search the node name through "Feature Finder" on top right corner.)

4. Connect the input data node with the Stacking node and click "Edit Parameters" icon (or double click the node) to configure the node.

5. When the node configuration dialog is open, click "Variables" to select stacking variables: Weight(1998), Weight(1999) and Weight(2000) and click "OK" after selection.

6. In the "Destination variable name" edit box, type Weight; this will be the name of the new variable in which all of the weight variables will be stacked.

In the "Code variable name" edit box, type Year; this will be the variable next to the new stacked variable that helps categorize the stacked values.

7. Clear the "Omit cases where selected variables contain missing data" option. (Note: this is to include the data from Emma Lu, that has missing data for two of the three weight variables. For explanation of all those options, click "?" on top right of the dialog).

8. Click "OK" in the configuration dialog.

9. Click the green arrow icon to run the node. And the final data should look like below: