Transforming data using the stack/unstack function

Goal of this tutorial

We have obtained results from an experiment with one column per group. We wish to run a one-way Analysis of variance on these results. The data has to be transformed so that an ANOVA can be applied.

Dataset for stacking variables

An Excel sheet with both the data and the results can be downloaded by clicking here. In this tutorial we show how to stack variables in order to run an analysis of variance.

The dataset contains three columns, each one attached to a group of patients.

Stacking variables

After opening XLSTAT, select the XLSTAT / Preparing data / Data Management command, or click on the corresponding button of the Preparing data menu (see below).

Menu filter

Once you've clicked on the relevant button, the dialog box appears. Select the method, we use stack. Select the data you want the stack function to be applied to in the data field.

Stack dialog box 

 Once you have clicked on the OK button, the results are displayed on a new sheet.

Results of the stacking process

The only result that is displayed is the transformed dataset. Instead of having 3 columns, it contains 2 columns, the first one indicating the group and the second one the value of the transformed variable.

 Stack result

You can now apply a one-way ANOVA on the obtained dataset. Here is a detailed tutorial on one-way analysis of variance.

Click here for other tutorials.

About KCS

Kovach Computing Services (KCS) was founded in 1993 by Dr. Warren Kovach. The company specializes in the development and marketing of inexpensive and easy-to-use statistical software for scientists, as well as in data analysis consulting.

Mailing list Join our mailing list

Home | Order | MVSP | Oriana | XLStat
QDA Miner | Accent Composer | Stats Books
Stats Links | Anglesey

Share: FacebookFacebook TwitterTwitter RedditReddit
Del.icio.usDel.icio.us Stumble UponStumble Upon

 

Like us on Facebook

Get in Touch

  • Email:
    sales@kovcomp.com
  • Address:
    85 Nant y Felin
    Pentraeth, Isle of Anglesey
    LL75 8UY
    United Kingdom
  • Phone:
    (UK): 01248-450414
    (Intl.): +44-1248-450414